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