comparison articles/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/articles/urls.py@9b9daefba97a
children 312f198e8958
comparison
equal deleted inserted replaced
70:f26cdda0ad8b 71:e2868ad47a1e
1 """
2 Urls for the articles application.
3
4 """
5 from django.conf.urls import patterns, url
6 from django.views.generic import DetailView, ListView
7
8 from articles.models import Article
9
10
11 urlpatterns = patterns('',
12 url(r'^$',
13 ListView.as_view(
14 model=Article,
15 context_object_name='article_list'),
16 name='articles-index'),
17 url(r'^(?P<pk>\d+)/$',
18 DetailView.as_view(model=Article, context_object_name='article'),
19 name='articles-item')
20 )