summaryrefslogtreecommitdiff
path: root/sublab_project/news/urls.py
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2011-12-30 02:19:39 +0100
committerChristian Franke <nobody@nowhere.ws>2011-12-30 02:19:59 +0100
commit5b2c404d2955599bb50635b05d9191cb4bd6e34d (patch)
treea4bca5293c8036e3e3c0efc06c7af7e1f98f86b4 /sublab_project/news/urls.py
parentcc2bb825e50a4de96dbdf191ccfbda9d6397feb8 (diff)
Improve ListView for news
Diffstat (limited to 'sublab_project/news/urls.py')
-rw-r--r--sublab_project/news/urls.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sublab_project/news/urls.py b/sublab_project/news/urls.py
index c26d12d..fe682ad 100644
--- a/sublab_project/news/urls.py
+++ b/sublab_project/news/urls.py
@@ -1,9 +1,10 @@
from django.conf.urls.defaults import patterns, include, url
-from django.views.generic import ListView, DetailView
+from django.views.generic import DetailView
from news.models import News
+from news.views import NewsListView
urlpatterns = patterns('',
- url(r'^$', ListView.as_view(model=News, paginate_by=8), name='news_list'),
+ url(r'^$', NewsListView.as_view(), name='news_list'),
url(r'^news/(?P<slug>[-\w]+)/$', DetailView.as_view(model=News), name='news_detail'),
)