Mercurial > public > sg101
comparison ygroup/urls.py @ 581:ee87ea74d46b
For Django 1.4, rearranged project structure for new manage.py.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 May 2012 17:10:48 -0500 |
parents | gpp/ygroup/urls.py@ddd69a8e07c7 |
children | 5ba2508939f7 |
comparison
equal
deleted
inserted
replaced
580:c525f3e0b5d0 | 581:ee87ea74d46b |
---|---|
1 """ | |
2 urls.py - URLs for the ygroup application. | |
3 | |
4 """ | |
5 from django.conf.urls import patterns, url | |
6 from django.views.generic import DetailView | |
7 | |
8 from ygroup.models import Post | |
9 from ygroup.views import ThreadIndexView, ThreadView | |
10 | |
11 | |
12 urlpatterns = patterns('', | |
13 url(r'^threads/$', | |
14 ThreadIndexView.as_view(), | |
15 name='ygroup-thread_index'), | |
16 url(r'^thread/(\d+)/$', | |
17 ThreadView.as_view(), | |
18 name='ygroup-thread_view'), | |
19 url(r'^post/(?P<pk>\d+)/$', | |
20 DetailView.as_view(model=Post, context_object_name='post'), | |
21 name='ygroup-post_view'), | |
22 ) | |
23 |