Commits

Anonymous committed 48a0893 Draft

Fixed use of CBV

  • Participants
  • Parent commits 3b16e60

Comments (0)

Files changed (1)

File gnocchi/faq/urls.py

 from django.views.generic import DetailView
 
 urlpatterns = patterns('',
-    ('^(?P<pk>\d+)/$', DetailView(model=Category)),
-    ('^(?P<slug>[-\w]+)/$', DetailView(model=Category, slug_field='slug')),
+    ('^(?P<pk>\d+)/$', DetailView(model=Category).as_view()),
+    ('^(?P<slug>[-\w]+)/$', DetailView(model=Category, slug_field='slug').as_view()),
 )