removing deprecated direct_to_template
authorBryan <btbonval@gmail.com>
Sun, 12 Jan 2014 05:34:06 +0000 (05:34 +0000)
committerBryan <btbonval@gmail.com>
Sun, 12 Jan 2014 05:34:06 +0000 (05:34 +0000)
karmaworld/urls.py

index 1718cfc9b7646ab88abbb573ace4a571a6ed656a..30cc7a75d0714cfa7974916a4cc1cb6d8972b246 100644 (file)
@@ -6,7 +6,7 @@
 from django.contrib import admin
 from django.conf import settings
 from django.conf.urls.defaults import patterns, include, url
-from django.views.generic.simple import direct_to_template
+from django.views.generic.base import TemplateView
 
 from karmaworld.apps.courses.models import Course
 from karmaworld.apps.courses.views import AboutView, flag_course
@@ -59,7 +59,7 @@ urlpatterns = patterns('',
     url(r'^moderator/', include(moderator.site.urls)),
 
     ## Single-serving page URLpatterns
-    url(r'^terms/$', direct_to_template, { 'template': 'terms.html' }, name='terms'),
+    url(r'^terms/$', TemplateView.as_view(template_name='terms.html'), name='terms'),
     url(r'^about/$', AboutView.as_view(), name='about'),
 
     # All Auth