1. Curtis Maloney
  2. gnocchi-faq

Commits

funkybob  committed 0cb0c4a Draft

Added category list view to urls

  • Participants
  • Parent commits b8f2bfe
  • Branches default

Comments (0)

Files changed (1)

File gnocchi/faq/urls.py

View file
  • Ignore whitespace
 from django.conf.urls.defaults import patterns
 
 from gnocchi.faq.models import Category
-from django.views.generic import DetailView
+from django.views.generic import DetailView, ListView
 
 urlpatterns = patterns('',
+    ('^$', ListView.as_view(model=Category)),
     ('^(?P<pk>\d+)/$', DetailView.as_view(model=Category)),
     ('^(?P<slug>[-\w]+)/$', DetailView.as_view(model=Category, slug_field='slug')),
 )