summaryrefslogtreecommitdiffstats
path: root/polls/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'polls/urls.py')
-rwxr-xr-xpolls/urls.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/polls/urls.py b/polls/urls.py
new file mode 100755
index 0000000..81c2bbd
--- /dev/null
+++ b/polls/urls.py
@@ -0,0 +1,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'),
+)
+