annotate messages/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 6bbd1473d48e
rev   line source
gremmie@1 1 """urls for the Messages application"""
bgneal@574 2 from django.conf.urls import patterns, url
bgneal@425 3
gremmie@1 4 urlpatterns = patterns('messages.views',
bgneal@429 5 url(r'^$',
bgneal@429 6 'index',
bgneal@429 7 name='messages-index'),
bgneal@429 8 url(r'^(inbox|compose|outbox|trash|options)/$',
bgneal@429 9 'index',
bgneal@429 10 name='messages-index_named'),
bgneal@441 11 url(r'^options/$',
bgneal@441 12 'index',
bgneal@441 13 kwargs={'tab': 'options'},
bgneal@441 14 name='messages-options_tab'),
bgneal@441 15 url(r'^compose/([\w.@+-]{1,30})/$',
bgneal@441 16 'compose_to',
bgneal@429 17 name='messages-compose_to'),
bgneal@429 18 url(r'^inbox-tab/$',
bgneal@429 19 'inbox',
bgneal@429 20 name='messages-inbox'),
bgneal@429 21 url(r'^outbox-tab/$',
bgneal@429 22 'outbox',
bgneal@429 23 name='messages-outbox'),
bgneal@429 24 url(r'^trash-tab/$',
bgneal@429 25 'trash',
bgneal@429 26 name='messages-trash'),
bgneal@429 27 url(r'^message/$',
bgneal@429 28 'message',
bgneal@429 29 name='messages-message'),
bgneal@429 30 url(r'^options-tab/$',
bgneal@429 31 'options',
bgneal@429 32 name='messages-options'),
bgneal@429 33 url(r'^compose-tab/$',
bgneal@429 34 'compose',
bgneal@429 35 name='messages-compose'),
bgneal@429 36 url(r'^bulk/$',
bgneal@429 37 'bulk',
bgneal@429 38 name='messages-bulk'),
gremmie@1 39 )