fnp
/
prawokultury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update
[prawokultury.git]
/
questions
/
urls.py
diff --git
a/questions/urls.py
b/questions/urls.py
index
9930956
..
ca1ec8a
100755
(executable)
--- a/
questions/urls.py
+++ b/
questions/urls.py
@@
-2,19
+2,18
@@
# This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
# 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.conf.urls import url
+from django.views.generic import DetailView, TemplateView
from .models import Question
from .models import Question
-from .views import QuestionFormView
+from .views import QuestionFormView
, QuestionListView
-urlpatterns =
patterns('',
+urlpatterns =
[
url(r'^$',
url(r'^$',
- ListView.as_view(queryset=Question.objects.filter(published=True
- ).order_by('-published_at')),
+ QuestionListView.as_view(),
name="questions"
),
url(r'^(?P<pk>\d+)/$',
name="questions"
),
url(r'^(?P<pk>\d+)/$',
- DetailView.as_view(
model=Question
),
+ DetailView.as_view(
queryset=Question.objects.filter(published=True)
),
name="questions_question"),
url(r'^pytanie/$',
QuestionFormView.as_view(),
name="questions_question"),
url(r'^pytanie/$',
QuestionFormView.as_view(),
@@
-26,4
+25,4
@@
urlpatterns = patterns('',
),
name="questions_thanks"
),
),
name="questions_thanks"
),
-)
+]