Package madrona :: Package common :: Package registration_backend :: Module urls
[hide private]

Source Code for Module madrona.common.registration_backend.urls

 1  """ 
 2  URLconf for registration and activation, using django-registration's 
 3  default backend. 
 4  """ 
 5  from django.conf.urls.defaults import * 
 6  from django.views.generic.base import TemplateView 
 7  from registration.views import activate 
 8  from registration.views import register 
 9  from django.conf import settings 
10   
11  urlpatterns = patterns('', 
12      url(r'^activate/complete/$', 
13          TemplateView.as_view(template_name='registration/activation_complete.html'), 
14          {'extra_context': {'group_request_email': settings.GROUP_REQUEST_EMAIL}}, 
15          name='registration_activation_complete'), 
16      # Activation keys get matched by \w+ instead of the more specific 
17      # [a-fA-F0-9]{40} because a bad activation key should still get to the view; 
18      # that way it can return a sensible "invalid key" message instead of a 
19      # confusing 404. 
20      url(r'^activate/(?P<activation_key>\w+)/$', 
21          activate, 
22          {'backend': 'madrona.common.registration_backend.LingcodBackend'}, 
23          name='registration_activate'), 
24      url(r'^register/$', 
25          register, 
26          {'backend': 'madrona.common.registration_backend.LingcodBackend'}, 
27          name='registration_register'), 
28      url(r'^register/complete/$', 
29          TemplateView.as_view(template_name='registration/registration_complete.html'), 
30          name='registration_complete'), 
31      url(r'^register/closed/$', 
32          TemplateView.as_view(template_name='registration/registration_closed.html'), 
33          name='registration_disallowed'), 
34      (r'', include('registration.auth_urls')), 
35  ) 
36