comparison ygroup/urls.py @ 1028:5ba2508939f7

Django 1.8 changes; first batch.
author Brian Neal <bgneal@gmail.com>
date Tue, 15 Dec 2015 21:01:07 -0600
parents ee87ea74d46b
children 5d208c3321ce
comparison
equal deleted inserted replaced
1027:cd4db27c90e3 1028:5ba2508939f7
1 """ 1 """
2 urls.py - URLs for the ygroup application. 2 urls.py - URLs for the ygroup application.
3 3
4 """ 4 """
5 from django.conf.urls import patterns, url 5 from django.conf.urls import url
6 from django.views.generic import DetailView 6 from django.views.generic import DetailView
7 7
8 from ygroup.models import Post 8 from ygroup.models import Post
9 from ygroup.views import ThreadIndexView, ThreadView 9 from ygroup.views import ThreadIndexView, ThreadView
10 10
11 11
12 urlpatterns = patterns('', 12 urlpatterns = [
13 url(r'^threads/$', 13 url(r'^threads/$',
14 ThreadIndexView.as_view(), 14 ThreadIndexView.as_view(),
15 name='ygroup-thread_index'), 15 name='ygroup-thread_index'),
16 url(r'^thread/(\d+)/$', 16 url(r'^thread/(\d+)/$',
17 ThreadView.as_view(), 17 ThreadView.as_view(),
18 name='ygroup-thread_view'), 18 name='ygroup-thread_view'),
19 url(r'^post/(?P<pk>\d+)/$', 19 url(r'^post/(?P<pk>\d+)/$',
20 DetailView.as_view(model=Post, context_object_name='post'), 20 DetailView.as_view(model=Post, context_object_name='post'),
21 name='ygroup-post_view'), 21 name='ygroup-post_view'),
22 ) 22 ]
23