view contests/urls.py @ 861:e4f8d87c3d30

Configure Markdown logger to reduce noise in logs. Markdown is logging at the INFO level whenever it loads an extension. This looks like it has been fixed in master at GitHub. But until then we will explicitly configure the MARKDOWN logger to log at WARNING or higher.
author Brian Neal <bgneal@gmail.com>
date Mon, 01 Dec 2014 18:36:27 -0600
parents 5977b43499f7
children 5ba2508939f7
line wrap: on
line source
"""
Url patterns for the contests application.

"""
from django.conf.urls 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().prefetch_related('winners')),
       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().prefetch_related('winners')),
       name='contests-contest'),
)