Mercurial > public > sg101
diff contests/urls.py @ 1028:5ba2508939f7
Django 1.8 changes; first batch.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 15 Dec 2015 21:01:07 -0600 |
parents | 5977b43499f7 |
children | 16e190fa6ef8 |
line wrap: on
line diff
--- a/contests/urls.py Mon Dec 14 20:42:20 2015 -0600 +++ b/contests/urls.py Tue Dec 15 21:01:07 2015 -0600 @@ -2,13 +2,14 @@ Url patterns for the contests application. """ -from django.conf.urls import patterns, url +from django.conf.urls import url from django.views.generic import DetailView, ListView from contests.models import Contest +import contests.views -urlpatterns = patterns('', +urlpatterns = [ url(r'^$', ListView.as_view( context_object_name='contests', @@ -16,7 +17,7 @@ name='contests-index'), url(r'^enter/$', - 'contests.views.enter', + contests.views.enter, name='contests-enter'), url(r'^c/(?P<slug>[\w-]+)/$', @@ -24,4 +25,4 @@ context_object_name='contest', queryset=Contest.public_objects.all().prefetch_related('winners')), name='contests-contest'), -) +]