Mercurial > public > sg101
view gpp/contests/urls.py @ 563:93f049a241ff
For bitbucket issue #4, deactivate users for spam when accepting flagged user
profiles. Also use raw_id_fields on UserProfileFlagAdmin.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 09 Feb 2012 19:38:03 -0600 |
parents | 51fa1e0ca218 |
children | 0a8e6a9ccf53 |
line wrap: on
line source
""" Url patterns for the contests application. """ from django.conf.urls.defaults import patterns, url from django.views.generic import DetailView, ListView from contests.models import Contest urlpatterns = patterns('', url(r'^$', ListView.as_view( context_object_name='contests', queryset=Contest.public_objects.all()), name='contests-index'), url(r'^enter/$', 'contests.views.enter', name='contests-enter'), url(r'^c/(?P<slug>[\w-]+)/$', DetailView.as_view( context_object_name='contest', queryset=Contest.public_objects.all().select_related('winner')), name='contests-contest'), )