summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media/arch.css11
-rw-r--r--news/views.py8
-rw-r--r--templates/news/add.html2
3 files changed, 15 insertions, 6 deletions
diff --git a/media/arch.css b/media/arch.css
index 07d2638c..9b4759d3 100644
--- a/media/arch.css
+++ b/media/arch.css
@@ -410,4 +410,13 @@ textarea.vLargeTextField {
.pkgr2 {
background-color: #eee4cb;
}
-
+form#newsform table {
+ width: 100%;
+ max-width: 1024px;
+}
+form#newsform input[type=text] {
+ width: 100%;
+}
+form#newsform textarea {
+ width: 100%;
+}
diff --git a/news/views.py b/news/views.py
index 7aa78c46..d876f0be 100644
--- a/news/views.py
+++ b/news/views.py
@@ -1,9 +1,9 @@
from django import forms
from django.contrib.auth.decorators import permission_required
-from main.models import News
-
from django.views.generic import list_detail, create_update
+from main.models import News
+
def view(request, newsid):
return list_detail.object_detail(request, News.objects.all(), newsid,
template_name="news/view.html",
@@ -37,9 +37,9 @@ def delete(request, newsid):
@permission_required('main.change_news')
def edit(request, newsid):
- return create_update.update_object(request, object_id=newsid,
+ return create_update.update_object(request,
+ object_id=newsid,
form_class=NewsForm,
template_name="news/add.html")
# vim: set ts=4 sw=4 et:
-
diff --git a/templates/news/add.html b/templates/news/add.html
index 80fccc3d..daa75871 100644
--- a/templates/news/add.html
+++ b/templates/news/add.html
@@ -7,7 +7,7 @@
{% else %}
<h2 class="title">Add News</h2>
{% endif %}
- <form method="post" action=".">
+ <form method="post" id="newsform" action=".">
<table>
{{form}}
<tr>