1. meehow
  2. django-registration

Commits

meehow  committed c0d129d

translatable urls

  • Participants
  • Parent commits fad7080
  • Branches default

Comments (0)

Files changed (1)

File registration/backends/default/urls.py

View file
 
 
 from django.conf.urls.defaults import *
+from django.utils.translation import ugettext_lazy as _
 from django.views.generic.simple import direct_to_template
 
 from registration.views import activate
 
 
 urlpatterns = patterns('',
-                       url(r'^activate/complete/$',
+                       url(_(r'^activate/complete/$'),
                            direct_to_template,
                            {'template': 'registration/activation_complete.html'},
                            name='registration_activation_complete'),
                        # [a-fA-F0-9]{40} because a bad activation key should still get to the view;
                        # that way it can return a sensible "invalid key" message instead of a
                        # confusing 404.
-                       url(r'^activate/(?P<activation_key>\w+)/$',
+                       url(_(r'^activate/(?P<activation_key>\w+)/$'),
                            activate,
                            {'backend': 'registration.backends.default.DefaultBackend'},
                            name='registration_activate'),
-                       url(r'^register/$',
+                       url(_(r'^register/$'),
                            register,
                            {'backend': 'registration.backends.default.DefaultBackend'},
                            name='registration_register'),
-                       url(r'^register/complete/$',
+                       url(_(r'^register/complete/$'),
                            direct_to_template,
                            {'template': 'registration/registration_complete.html'},
                            name='registration_complete'),
-                       url(r'^register/closed/$',
+                       url(_(r'^register/closed/$'),
                            direct_to_template,
                            {'template': 'registration/registration_closed.html'},
                            name='registration_disallowed'),