stop annoying people
[prawokultury.git] / questions / urls.py
1 # -*- coding: utf-8 -*-
2 # This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 #
5 from django.conf.urls import patterns, url
6 from django.views.generic import DetailView, TemplateView
7 from .models import Question
8 from .views import QuestionFormView, QuestionListView
9
10 urlpatterns = patterns('',
11     url(r'^$',
12         QuestionListView.as_view(),
13         name="questions"
14     ),
15     url(r'^(?P<pk>\d+)/$',
16         DetailView.as_view(queryset=Question.objects.filter(published=True)),
17         name="questions_question"),
18     url(r'^pytanie/$',
19         QuestionFormView.as_view(),
20         name="questions_form",
21     ),
22     url(r'^pytanie/dziekujemy/$',
23         TemplateView.as_view(
24             template_name="questions/question_thanks.html",
25         ),
26         name="questions_thanks"
27     ),
28 )