summaryrefslogtreecommitdiff
path: root/sublab_project/news
diff options
context:
space:
mode:
authorMarkus Zapke-Grùˆndemann <info@keimlink.de>2011-12-30 00:44:46 +0100
committerMarkus Zapke-Grùˆndemann <info@keimlink.de>2011-12-30 00:44:46 +0100
commitf74e27519337446b928431f28aaa677454861a08 (patch)
treedc9994f1facd272e148f11b73eaa27d6c9bb6f0e /sublab_project/news
parent0edd939a90b15d4d7c722df23231f18f21e1e127 (diff)
parent4010503557051aabaa5b9f82c4cb29cf849e0a54 (diff)
Merge branch 'master' of sublab.org:subweb
Conflicts: requirements.txt
Diffstat (limited to 'sublab_project/news')
-rw-r--r--sublab_project/news/templates/news/news_list.html10
-rw-r--r--sublab_project/news/urls.py8
2 files changed, 18 insertions, 0 deletions
diff --git a/sublab_project/news/templates/news/news_list.html b/sublab_project/news/templates/news/news_list.html
new file mode 100644
index 0000000..ab998e8
--- /dev/null
+++ b/sublab_project/news/templates/news/news_list.html
@@ -0,0 +1,10 @@
+{% extends 'base.html' %}
+
+{%block content %}
+ {% for post in news_list %}
+ <h3 id="{{ post.slug }}">
+ <a>{{ post.date_updated|date }} - {{ post.title }}</a>
+ </h3>
+ <p>{{ post.content }}</p>
+ {% endfor %}
+{% endblock content %}
diff --git a/sublab_project/news/urls.py b/sublab_project/news/urls.py
new file mode 100644
index 0000000..a1c5c0a
--- /dev/null
+++ b/sublab_project/news/urls.py
@@ -0,0 +1,8 @@
+from django.conf.urls.defaults import patterns, include, url
+from django.views.generic import ListView, DetailView
+
+from news.models import News
+
+urlpatterns = patterns('',
+ url(r'^$', ListView.as_view(model=News, paginate_by=8), name='news_list')
+)