summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/todolists/public_list.html18
-rw-r--r--todolists/views.py5
-rw-r--r--urls.py1
3 files changed, 24 insertions, 0 deletions
diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html
new file mode 100644
index 0000000..78e5b51
--- /dev/null
+++ b/templates/todolists/public_list.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+{% block title %}Arch Linux - Todo Lists{% endblock %}
+
+{% block content %}
+ <div id="read_only_todo_lists">
+ {% for list in todo_lists %}
+ <h2>{{list.name}}</h2>
+ <div class="todo_list">
+ <p>{{list.description}}</p>
+ <ul>
+ {% for pkg in list.packages %}
+ <li>{{pkg.pkg.pkgname}}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endfor %}
+ </div>
+{% endblock %}
diff --git a/todolists/views.py b/todolists/views.py
index 83dd87d..6f1c6ed 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -154,5 +154,10 @@ def send_todolist_email(todo):
[m.email for m in maints],
fail_silently=True)
+def public_list(request):
+ todo_lists = Todolist.objects.incomplete()
+ return render_to_response("todolists/public_list.html",
+ RequestContext(request, {"todo_lists": todo_lists}))
+
# vim: set ts=4 sw=4 et:
diff --git a/urls.py b/urls.py
index 3de1d9c..74c439f 100644
--- a/urls.py
+++ b/urls.py
@@ -56,6 +56,7 @@ urlpatterns = patterns('',
(r'^todo/delete/(?P<object_id>\d+)/$',
'todolists.views.delete_todolist'),
(r'^todo/$', 'todolists.views.list'),
+ (r'^todolists/$', 'todolists.views.public_list'),
(r'^news/(\d+)/$', 'news.views.view'),
(r'^news/add/$', 'news.views.add'),