comparison news/urls.py @ 71:e2868ad47a1e

For Django 1.4, using the new manage.py.
author Brian Neal <bgneal@gmail.com>
date Sat, 14 Apr 2012 16:40:29 -0500
parents madeira/news/urls.py@9b9daefba97a
children 312f198e8958
comparison
equal deleted inserted replaced
70:f26cdda0ad8b 71:e2868ad47a1e
1 """
2 Urls for the news application.
3
4 """
5 from django.conf.urls import patterns, url
6 from django.views.generic import DetailView, ListView
7
8 from news.models import News
9
10
11 urlpatterns = patterns('',
12 url(r'^$',
13 ListView.as_view(
14 model=News,
15 paginate_by=10,
16 context_object_name='news_list'),
17 name='news-index'),
18 url(r'^story/(?P<pk>\d+)/$',
19 DetailView.as_view(model=News, context_object_name='story'),
20 name='news-item')
21 )