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.
5 from django.conf.urls import patterns, url
6 from django.views.generic import DetailView, ListView, TemplateView
7 from .models import Question
8 from .views import QuestionFormView
10 urlpatterns = patterns('',
12 ListView.as_view(queryset=Question.objects.filter(published=True
13 ).order_by('-published_at')),
16 url(r'^(?P<pk>\d+)/$',
17 DetailView.as_view(model=Question),
18 name="questions_question"),
20 QuestionFormView.as_view(),
21 name="questions_form",
23 url(r'^pytanie/dziekujemy/$',
25 template_name="questions/question_thanks.html",
27 name="questions_thanks"