annotate gpp/messages/urls.py @ 322:c3d3d7114749

Fix #148; Django now requires AJAX posts to present the CSRF token. Added code suggested by Django docs to shoutbox.js. Since shoutbox.js is on every page, it should cover all cases.
author Brian Neal <bgneal@gmail.com>
date Sat, 12 Feb 2011 21:37:17 +0000
parents b1c39788e511
children 76ba9478ebbd
rev   line source
gremmie@1 1 """urls for the Messages application"""
gremmie@1 2 from django.conf.urls.defaults import *
bgneal@311 3 from django.views.generic import RedirectView
gremmie@1 4
gremmie@1 5 urlpatterns = patterns('messages.views',
gremmie@1 6 url(r'^inbox/$', 'inbox', name='messages-inbox'),
gremmie@1 7 url(r'^outbox/$', 'outbox', name='messages-outbox'),
gremmie@1 8 url(r'^trash/$', 'trash', name='messages-trash'),
gremmie@1 9 url(r'^view/(\d+)/$', 'view', name='messages-view'),
gremmie@1 10 url(r'^reply/(\d+)/$', 'reply', name='messages-reply'),
gremmie@1 11 url(r'^compose/$', 'compose', name='messages-compose'),
bgneal@289 12 url(r'^compose/([\w.@+-]{1,30})/$', 'compose', name='messages-compose_to'),
gremmie@1 13 url(r'^delete/$', 'delete_bulk', name='messages-delete_bulk'),
gremmie@1 14 url(r'^delete/(\d+)/$', 'delete', name='messages-delete'),
gremmie@1 15 url(r'^undelete/$', 'undelete_bulk', name='messages-undelete_bulk'),
gremmie@1 16 url(r'^undelete/(\d+)/$', 'undelete', name='messages-undelete'),
gremmie@1 17 url(r'^options/$', 'options', name='messages-options'),
gremmie@1 18 )
gremmie@1 19
bgneal@311 20 urlpatterns += patterns('',
bgneal@311 21 (r'^$', RedirectView.as_view(url='inbox/')),
gremmie@1 22 )
gremmie@1 23