'''
Created on Dec 8, 2010

@author: jtk
'''
from django.conf.urls.defaults import patterns, url
from models import Poll

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

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