summaryrefslogtreecommitdiffstats
path: root/polls/urls.py
blob: 81c2bbd4b7163376865782af7b081f6036405e20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.conf.urls.defaults import *
from infopoint.polls.models import Poll

info_dict = {
	'queryset': Poll.objects.all(),
}

urlpatterns = patterns('',
	(r'^$', 'django.views.generic.list_detail.object_list', info_dict),
	url(r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html'), 'poll_results'),
	(r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_list', dict(info_dict, template_name='polls/poll_list.html'), 'poll_results'),
	(r'^(?P<poll_id>\d+)/vote/$', 'infopoint.polls.views.vote'),
)