~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlpoll/urls.py

  • Committer: Holger Rapp
  • Date: 2009-02-19 15:31:42 UTC
  • Revision ID: sirver@h566336-20090219153142-dc8xuabldnw5t395
Initial commit of new widelands homepage

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python -tt
2
 
# encoding: utf-8
3
 
#
4
 
 
5
 
from models import Poll
6
 
from django.conf.urls import *
7
 
from . import views
8
 
from django.views.generic.dates import ArchiveIndexView
9
 
 
10
 
# delete this
11
 
info_dict = {
12
 
    'queryset': Poll.objects.all()
13
 
}
14
 
 
15
 
urlpatterns = [
16
 
    url(r'^$', ArchiveIndexView.as_view(model=Poll, date_field='pub_date',
17
 
                                        template_name='wlpoll/poll_list.html'), name='wlpoll_archive'),
18
 
    url(r'^(?P<pk>[0-9]+)/$', views.DetailView.as_view(),
19
 
        name='wlpoll_detail'),
20
 
    url(r'(?P<object_id>\d+)/vote/$', views.vote, name='wlpoll_vote'),
21
 
]