urls.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from django.conf.urls import url

from . import views

urlpatterns = [
	url(r'^$', views.IndexView.as_view(), name='index'),
	url(r'^(?P<pk>[0-9]+)/$', views.DetailView.as_view(), name='detail'),
	url(r'^(?P<pk>[0-9]+)/results/$', views.ResultsView.as_view(), name='results'),
	url(r'^(?P<idea_id>[0-9]+)/vote/$', views.vote, name='vote'),
]

Click here to get the full source code on Github.