Mercurial > public > sg101
comparison weblinks/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 |
comparison
equal
deleted
inserted
replaced
1027:cd4db27c90e3 | 1028:5ba2508939f7 |
---|---|
1 """urls for the weblinks application""" | 1 """urls for the weblinks application""" |
2 from django.conf.urls import patterns, url | 2 from django.conf.urls import url |
3 | 3 |
4 urlpatterns = patterns('weblinks.views', | 4 import weblinks.views as wv |
5 url(r'^$', 'link_index', name='weblinks-main'), | 5 |
6 url(r'^add/$', 'add_link', name='weblinks-add_link'), | 6 |
7 url(r'^add/thanks/$', 'add_thanks', name='weblinks-add_thanks'), | 7 urlpatterns = [ |
8 url(r'^category/(?P<slug>[\w\d-]+)/(?P<sort>title|date|rating|hits)/$', | 8 url(r'^$', wv.link_index, name='weblinks-main'), |
9 'view_links', | 9 url(r'^add/$', wv.add_link, name='weblinks-add_link'), |
10 url(r'^add/thanks/$', wv.add_thanks, name='weblinks-add_thanks'), | |
11 url(r'^category/(?P<slug>[\w\d-]+)/(?P<sort>title|date|rating|hits)/$', | |
12 wv.view_links, | |
10 name='weblinks-view_links'), | 13 name='weblinks-view_links'), |
11 url(r'^detail/(\d+)/$', | 14 url(r'^detail/(\d+)/$', |
12 'link_detail', | 15 wv.link_detail, |
13 name='weblinks-link_detail'), | 16 name='weblinks-link_detail'), |
14 url(r'^new/$', 'new_links', name='weblinks-new_links'), | 17 url(r'^new/$', wv.new_links, name='weblinks-new_links'), |
15 url(r'^popular/$', 'popular_links', name='weblinks-popular_links'), | 18 url(r'^popular/$', wv.popular_links, name='weblinks-popular_links'), |
16 url(r'^random/$', 'random_link', name='weblinks-random_link'), | 19 url(r'^random/$', wv.random_link, name='weblinks-random_link'), |
17 url(r'^report/(\d+)/$', 'report_link', name='weblinks-report_link'), | 20 url(r'^report/(\d+)/$', wv.report_link, name='weblinks-report_link'), |
18 url(r'^visit/(\d+)/$', 'visit', name="weblinks-visit"), | 21 url(r'^visit/(\d+)/$', wv.visit, name="weblinks-visit"), |
19 ) | 22 ] |