Commits

eamonnfaherty  committed b1580ba

django 1.5 ready

  • Participants
  • Parent commits 27bccd1

Comments (0)

Files changed (3)

File registration/backends/default/urls.py

 
 
 from django.conf.urls.defaults import *
-from django.views.generic.simple import direct_to_template
+from django.views.generic.base import TemplateView
 
 from registration.views import activate
 from registration.views import register
 
 urlpatterns = patterns('',
                        url(r'^activate/complete/$',
-                           direct_to_template,
-                           {'template': 'registration/activation_complete.html'},
+                           TemplateView({'template': 'registration/activation_complete.html'}),
                            name='registration_activation_complete'),
                        # Activation keys get matched by \w+ instead of the more specific
                        # [a-fA-F0-9]{40} because a bad activation key should still get to the view;
                            {'backend': 'registration.backends.default.DefaultBackend'},
                            name='registration_register'),
                        url(r'^register/complete/$',
-                           direct_to_template,
-                           {'template': 'registration/registration_complete.html'},
+                           TemplateView({'template': 'registration/registration_complete.html'}),
                            name='registration_complete'),
                        url(r'^register/closed/$',
-                           direct_to_template,
-                           {'template': 'registration/registration_closed.html'},
+                           TemplateView({'template': 'registration/registration_closed.html'}),
                            name='registration_disallowed'),
                        (r'', include('registration.auth_urls')),
                        )

File registration/backends/simple/urls.py

 
 
 from django.conf.urls.defaults import *
-from django.views.generic.simple import direct_to_template
+from django.views.generic.base import TemplateView
 
 from registration.views import activate
 from registration.views import register
                            {'backend': 'registration.backends.simple.SimpleBackend'},
                            name='registration_register'),
                        url(r'^register/closed/$',
-                           direct_to_template,
-                           {'template': 'registration/registration_closed.html'},
+                           TemplateView({'template': 'registration/registration_closed.html'}),
                            name='registration_disallowed'),
                        (r'', include('registration.auth_urls')),
                        )

File registration/tests/urls.py

 """
 
 from django.conf.urls.defaults import *
-from django.views.generic.simple import direct_to_template
+from django.views.generic.base import TemplateView
 
 from registration.views import activate
 from registration.views import register
                        # Set up a pattern which will correspond to the
                        # custom 'disallowed_url' above.
                        url(r'^custom-disallowed/$',
-                           direct_to_template,
-                           {'template': 'registration/registration_closed.html'},
+                           TemplateView({'template': 'registration/registration_closed.html'}),
                            name='registration_test_custom_disallowed'),
                        # Test the 'register' view with custom redirect
                        # on successful registration.
                            ),
                        # Pattern for custom redirect set above.
                        url(r'^custom-success/$',
-                           direct_to_template,
-                           {'template': 'registration/test_template_name.html'},
+                           TemplateView({'template': 'registration/test_template_name.html'}),
                            name='registration_test_custom_success_url'),
                        (r'', include('registration.backends.default.urls')),
                        )