Mercurial > public > sg101
diff polls/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/polls/urls.py Mon Dec 14 20:42:20 2015 -0600 +++ b/polls/urls.py Tue Dec 15 21:01:07 2015 -0600 @@ -1,9 +1,12 @@ """urls for the polls application""" -from django.conf.urls import patterns, url +from django.conf.urls import url -urlpatterns = patterns('polls.views', - url(r'^$', 'poll_index', name='polls-main'), - url(r'^(?P<poll_id>\d+)/$', 'poll_detail', name='polls-detail'), - url(r'^(?P<poll_id>\d+)/vote/$', 'poll_vote', name='polls-vote'), - url(r'^delete_vote/$', 'poll_delete_vote', name='polls-delete_vote'), -) +import polls.views + + +urlpatterns = [ + url(r'^$', polls.views.poll_index, name='polls-main'), + url(r'^(?P<poll_id>\d+)/$', polls.views.poll_detail, name='polls-detail'), + url(r'^(?P<poll_id>\d+)/vote/$', polls.views.poll_vote, name='polls-vote'), + url(r'^delete_vote/$', polls.views.poll_delete_vote, name='polls-delete_vote'), +]