Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/weblinks/urls.py Mon Dec 14 20:42:20 2015 -0600 +++ b/weblinks/urls.py Tue Dec 15 21:01:07 2015 -0600 @@ -1,19 +1,22 @@ """urls for the weblinks application""" -from django.conf.urls import patterns, url +from django.conf.urls import url -urlpatterns = patterns('weblinks.views', - url(r'^$', 'link_index', name='weblinks-main'), - url(r'^add/$', 'add_link', name='weblinks-add_link'), - url(r'^add/thanks/$', 'add_thanks', name='weblinks-add_thanks'), - url(r'^category/(?P<slug>[\w\d-]+)/(?P<sort>title|date|rating|hits)/$', - 'view_links', +import weblinks.views as wv + + +urlpatterns = [ + url(r'^$', wv.link_index, name='weblinks-main'), + url(r'^add/$', wv.add_link, name='weblinks-add_link'), + url(r'^add/thanks/$', wv.add_thanks, name='weblinks-add_thanks'), + url(r'^category/(?P<slug>[\w\d-]+)/(?P<sort>title|date|rating|hits)/$', + wv.view_links, name='weblinks-view_links'), - url(r'^detail/(\d+)/$', - 'link_detail', + url(r'^detail/(\d+)/$', + wv.link_detail, name='weblinks-link_detail'), - url(r'^new/$', 'new_links', name='weblinks-new_links'), - url(r'^popular/$', 'popular_links', name='weblinks-popular_links'), - url(r'^random/$', 'random_link', name='weblinks-random_link'), - url(r'^report/(\d+)/$', 'report_link', name='weblinks-report_link'), - url(r'^visit/(\d+)/$', 'visit', name="weblinks-visit"), -) + url(r'^new/$', wv.new_links, name='weblinks-new_links'), + url(r'^popular/$', wv.popular_links, name='weblinks-popular_links'), + url(r'^random/$', wv.random_link, name='weblinks-random_link'), + url(r'^report/(\d+)/$', wv.report_link, name='weblinks-report_link'), + url(r'^visit/(\d+)/$', wv.visit, name="weblinks-visit"), +]