X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/548d9fe735b1c4f04c296f01a3bf73149f627005..07a2af1298f38f30273ac7a097b33ebcffc3938b:/questions/urls.py?ds=inline diff --git a/questions/urls.py b/questions/urls.py index 9930956..3073290 100755 --- a/questions/urls.py +++ b/questions/urls.py @@ -3,18 +3,17 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.conf.urls import patterns, url -from django.views.generic import DetailView, ListView, TemplateView +from django.views.generic import DetailView, TemplateView from .models import Question -from .views import QuestionFormView +from .views import QuestionFormView, QuestionListView urlpatterns = patterns('', url(r'^$', - ListView.as_view(queryset=Question.objects.filter(published=True - ).order_by('-published_at')), + QuestionListView.as_view(), name="questions" ), url(r'^(?P\d+)/$', - DetailView.as_view(model=Question), + DetailView.as_view(queryset=Question.objects.filter(published=True)), name="questions_question"), url(r'^pytanie/$', QuestionFormView.as_view(),