Andrei Kavaleu avatar Andrei Kavaleu committed 539b0a1

tweaks to work with django 1.5: direct_to_template changed to TemplateView.as_view

Comments (0)

Files changed (1)

django_authopenid/urls.py

 # limitations under the License.
 
 from django.conf.urls.defaults import patterns, url
-from django.views.generic.simple import direct_to_template
+from django.views.generic import TemplateView
 
 # views
 from django.contrib.auth import views as auth_views
 urlpatterns = patterns('',
     # django registration activate
     url(r'^activate/complete/$',
-        direct_to_template,
-        {'template': 'registration/activation_complete.html'},
+        TemplateView.as_view(template_name='registration/activation_complete.html'),
         name='registration_activation_complete'),
     url(r'^activate/(?P<activation_key>\w+)/$',
         reg_views.activate,
         reg_views.register,
         {'backend': 'registration.backends.default.DefaultBackend'},
         name='registration_register'),
-    url(r'^signup/complete/$',direct_to_template, 
-        {'template': 'registration/registration_complete.html'},
+    url(r'^signup/complete/$',
+        TemplateView.as_view(template_name='registration/registration_complete.html'),
         name='registration_complete'),
     url(r'^signup/closed/$',
-        direct_to_template,
-        {'template': 'registration/registration_closed.html'},
+        TemplateView.as_view(template_name='registration/registration_closed.html'),
         name='registration_disallowed'),
 
     # yadis uri
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.