annotate articles/urls.py @ 129:fa4ef22f3f24
For Django 1.6: BoundField.label_tag now includes label_suffix.
Remove addition of ':' since Django is now including this in the
subscribe form template.
author |
Brian Neal <bgneal@gmail.com> |
date |
Tue, 24 Dec 2013 15:04:26 -0600 |
parents |
e2868ad47a1e |
children |
312f198e8958 |
rev |
line source |
bgneal@47
|
1 """
|
bgneal@47
|
2 Urls for the articles application.
|
bgneal@47
|
3
|
bgneal@47
|
4 """
|
bgneal@66
|
5 from django.conf.urls import patterns, url
|
bgneal@47
|
6 from django.views.generic import DetailView, ListView
|
bgneal@47
|
7
|
bgneal@47
|
8 from articles.models import Article
|
bgneal@47
|
9
|
bgneal@47
|
10
|
bgneal@47
|
11 urlpatterns = patterns('',
|
bgneal@47
|
12 url(r'^$',
|
bgneal@47
|
13 ListView.as_view(
|
bgneal@47
|
14 model=Article,
|
bgneal@47
|
15 context_object_name='article_list'),
|
bgneal@47
|
16 name='articles-index'),
|
bgneal@47
|
17 url(r'^(?P<pk>\d+)/$',
|
bgneal@47
|
18 DetailView.as_view(model=Article, context_object_name='article'),
|
bgneal@47
|
19 name='articles-item')
|
bgneal@47
|
20 )
|