annotate downloads/urls.py @ 629:f4c043cf55ac

Wiki integration. Requests don't always have sessions. In particular this occurs when a request is made without a trailing slash. The Common middleware redirects when this happens, and the middleware process_request() processing stops before a session can get added. So just set an attribute on the request object for each operation. This seemed weird to me at first, but there are plenty of examples of this in the Django code base already.
author Brian Neal <bgneal@gmail.com>
date Tue, 13 Nov 2012 13:50:06 -0600
parents ee87ea74d46b
children 5ba2508939f7
rev   line source
gremmie@1 1 """
gremmie@1 2 URLs for the downloads application.
gremmie@1 3 """
bgneal@574 4 from django.conf.urls import patterns, url
gremmie@1 5
gremmie@1 6 urlpatterns = patterns('downloads.views',
gremmie@1 7 url(r'^$', 'index', name='downloads-index'),
gremmie@1 8 url(r'^add/$', 'add', name='downloads-add'),
bgneal@241 9 url(r'^category/(?P<slug>[\w\d-]+)/(?P<sort>title|date|rating|hits)/$',
gremmie@1 10 'category',
gremmie@1 11 name='downloads-category'),
bgneal@23 12 url(r'^details/(\d+)/$', 'details', name='downloads-details'),
gremmie@1 13 url(r'^new/$', 'new', name='downloads-new'),
gremmie@1 14 url(r'^popular/$', 'popular', name='downloads-popular'),
bgneal@404 15 url(r'^request/$', 'request_download', name='downloads-request_download'),
gremmie@1 16 url(r'^rate/$', 'rate_download', name='downloads-rate'),
gremmie@1 17 url(r'^rating/$', 'rating', name='downloads-rating'),
gremmie@1 18 url(r'^thanks/$', 'thanks', name='downloads-add_thanks'),
gremmie@1 19 )