Commits

Ales Zabala Alava  committed 4fef395

use class based generic list view, now works on django 1.5

  • Participants
  • Parent commits 11ec090

Comments (0)

Files changed (1)

File sphinxdoc/urls.py

 
 """
 from django.conf.urls.defaults import patterns, url
-from django.views.generic import list_detail
+from django.views.generic import ListView
 
 from sphinxdoc import models
 from sphinxdoc.views import ProjectSearchView
 
 
-project_info = {
-    'queryset': models.Project.objects.all().order_by('name'),
-    'template_object_name': 'project',
-}
-
 urlpatterns = patterns('sphinxdoc.views',
     url(
         r'^$',
-        list_detail.object_list,
-        project_info,
+        ListView.as_view(queryset=models.Project.objects.all().order_by('name'),
+                         context_object_name='project'),
     ),
     url(
         r'^(?P<slug>[\w-]+)/search/$',