Mercurial > public > sg101
comparison gpp/polls/urls.py @ 574:ddd69a8e07c7
For Django 1.4, use django.conf.urls instead of django.conf.urls.defaults.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 03 May 2012 20:45:16 -0500 |
parents | 8f46ba2f1b81 |
children |
comparison
equal
deleted
inserted
replaced
573:bcc4e8cf841b | 574:ddd69a8e07c7 |
---|---|
1 """urls for the polls application""" | 1 """urls for the polls application""" |
2 from django.conf.urls.defaults import * | 2 from django.conf.urls import patterns, url |
3 | 3 |
4 urlpatterns = patterns('polls.views', | 4 urlpatterns = patterns('polls.views', |
5 url(r'^$', 'poll_index', name='polls-main'), | 5 url(r'^$', 'poll_index', name='polls-main'), |
6 url(r'^(?P<poll_id>\d+)/$', 'poll_detail', name='polls-detail'), | 6 url(r'^(?P<poll_id>\d+)/$', 'poll_detail', name='polls-detail'), |
7 url(r'^(?P<poll_id>\d+)/vote/$', 'poll_vote', name='polls-vote'), | 7 url(r'^(?P<poll_id>\d+)/vote/$', 'poll_vote', name='polls-vote'), |