comparison news/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 e2c3d7ecfa30
children 97f92a589de7
comparison
equal deleted inserted replaced
1027:cd4db27c90e3 1028:5ba2508939f7
1 """urls for the News application""" 1 """urls for the News application"""
2 from django.conf.urls import patterns, url 2 from django.conf.urls import url
3 3
4 urlpatterns = patterns('news.views', 4 import news.views
5 url(r'^date/$', 'index', name='news-index_page'), 5
6 url(r'^archive/$', 'archive_index', name='news-archive_index'), 6
7 urlpatterns = [
8 url(r'^date/$', news.views.index, name='news-index_page'),
9 url(r'^archive/$', news.views.archive_index, name='news-archive_index'),
7 url(r'^archive/(?P<year>\d{4})/(?P<month>\d\d?)/$', 10 url(r'^archive/(?P<year>\d{4})/(?P<month>\d\d?)/$',
8 'archive', 11 news.views.archive,
9 name='news-archive_page'), 12 name='news-archive_page'),
10 url(r'^categories/$', 'category_index', name='news-category_index'), 13 url(r'^categories/$', news.views.category_index, name='news-category_index'),
11 url(r'^category/(?P<slug>[\w\d-]+)/$', 'category', name='news-category'), 14 url(r'^category/(?P<slug>[\w\d-]+)/$', news.views.category, name='news-category'),
12 url(r'^email/(\d+)/$', 'email_story', name='news-email_story'), 15 url(r'^email/(\d+)/$', news.views.email_story, name='news-email_story'),
13 url(r'^email/thanks/$', 'email_thanks', name='news-email_thanks'), 16 url(r'^email/thanks/$', news.views.email_thanks, name='news-email_thanks'),
14 url(r'^story/(\d+)/$', 'story', name='news-story'), 17 url(r'^story/(\d+)/$', news.views.story, name='news-story'),
15 url(r'^submit/$', 'submit', name='news-submit'), 18 url(r'^submit/$', news.views.submit, name='news-submit'),
16 url(r'^submit/thanks/$', 'submit_thanks', name='news-submit_thanks'), 19 url(r'^submit/thanks/$', news.views.submit_thanks, name='news-submit_thanks'),
17 url(r'^tags/$', 'tags', name='news-tag_index'), 20 url(r'^tags/$', news.views.tags, name='news-tag_index'),
18 url(r'^tag/(?P<tag_name>[^/]+)/$', 'tag', name='news-tag_page'), 21 url(r'^tag/(?P<tag_name>[^/]+)/$', news.views.tag, name='news-tag_page'),
19 ) 22 ]