summaryrefslogtreecommitdiffstats
path: root/templates/news
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2008-10-06 03:06:00 +0200
committerDusty Phillips <buchuki@gmail.com>2008-10-06 03:06:00 +0200
commita00f85e1332ca973cec807693e383accd9cdc864 (patch)
tree6c99f0ccf8177a0c88f67c5689d837d85aeb633c /templates/news
parent06963130c85f8632b898a2d98e7931951c7735a4 (diff)
downloadarchweb-a00f85e1332ca973cec807693e383accd9cdc864.tar.gz
archweb-a00f85e1332ca973cec807693e383accd9cdc864.tar.xz
port news to django 1.0 using generic views
Diffstat (limited to 'templates/news')
-rw-r--r--templates/news/add.html9
-rw-r--r--templates/news/delete.html11
-rw-r--r--templates/news/list.html2
3 files changed, 8 insertions, 14 deletions
diff --git a/templates/news/add.html b/templates/news/add.html
index 702d7ab..80fccc3 100644
--- a/templates/news/add.html
+++ b/templates/news/add.html
@@ -2,20 +2,15 @@
{% block content %}
<div class="greybox">
- {% if news %}
+ {% if form.instance.id %}
<h2 class="title">Edit News</h2>
{% else %}
<h2 class="title">Add News</h2>
{% endif %}
<form method="post" action=".">
<table>
+ {{form}}
<tr>
- <td>Title:</td>
- <td>{{ form.title }}</td>
- </tr><tr>
- <td style="vertical-align:top">Content:</td>
- <td>{{ form.content }}</td>
- </tr><tr>
<td colspan="2" align="right">
<input type="submit" value=" Save " />
</td>
diff --git a/templates/news/delete.html b/templates/news/delete.html
index 7ac5e25..0f48f8b 100644
--- a/templates/news/delete.html
+++ b/templates/news/delete.html
@@ -4,13 +4,12 @@
<div class="greybox">
<h2>Confirm Delete</h2>
<hr />
+ You are about to delete the news item '{{news}}'.
+ <br /><br />
+ Are you sure?
+ <br /><br />
<form method="post" action=".">
- <table>
- <tr>
- <td>Are You Sure?</td>
- <td>&nbsp; &nbsp; <input name="delete" type="submit" value=" Yes " /></td>
- </tr>
- </table>
+ <td>&nbsp; &nbsp; <input name="delete" type="submit" value=" Yes " />
</form>
</div>
{% endblock %}
diff --git a/templates/news/list.html b/templates/news/list.html
index 8627766..0edaae1 100644
--- a/templates/news/list.html
+++ b/templates/news/list.html
@@ -9,7 +9,7 @@
{% endif %}
<h2 class="title">News Updates</h2>
<table class="results" width="100%">
- {% for item in news %}
+ {% for item in news_list %}
<tr class="{% cycle pkgr2,pkgr1 %}">
<td>{{ item.postdate }}</td>
<td><a href="{{ item.get_absolute_url }}">{{ item.title }}</a></td>