Mercurial > public > sg101
diff contests/urls.py @ 1085:16e190fa6ef8
Port contests app to V3 design.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 02 May 2016 20:03:18 -0500 |
parents | 5ba2508939f7 |
children |
line wrap: on
line diff
--- a/contests/urls.py Wed Apr 27 20:04:05 2016 -0500 +++ b/contests/urls.py Mon May 02 20:03:18 2016 -0500 @@ -3,17 +3,13 @@ """ from django.conf.urls import url -from django.views.generic import DetailView, ListView -from contests.models import Contest import contests.views urlpatterns = [ url(r'^$', - ListView.as_view( - context_object_name='contests', - queryset=Contest.public_objects.all().prefetch_related('winners')), + contests.views.ContestListView.as_view(), name='contests-index'), url(r'^enter/$', @@ -21,8 +17,6 @@ name='contests-enter'), url(r'^c/(?P<slug>[\w-]+)/$', - DetailView.as_view( - context_object_name='contest', - queryset=Contest.public_objects.all().prefetch_related('winners')), + contests.views.ContestDetailView.as_view(), name='contests-contest'), ]