aboutsummaryrefslogtreecommitdiffstats
path: root/example/urls.py
diff options
context:
space:
mode:
authorJannis Leidel2013-03-02 05:13:12 -0800
committerJannis Leidel2013-03-02 05:13:12 -0800
commitee1996ef4365c1b7d1759d77f4f7ab72c3ca774b (patch)
tree645e92cfe5a5f51309da0dcbb0a573474048d014 /example/urls.py
parentfb412f7f0079f616256d3de4a96c3da879c00c56 (diff)
parent37fd3cc7f406d79f522b0831a7e1b7c4ffd37654 (diff)
downloaddjango-debug-toolbar-ee1996ef4365c1b7d1759d77f4f7ab72c3ca774b.tar.bz2
Merge pull request #355 from AMeng/patch-1
Updated example to use class-based generic views
Diffstat (limited to 'example/urls.py')
-rw-r--r--example/urls.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/example/urls.py b/example/urls.py
index 25acc31..d8bed27 100644
--- a/example/urls.py
+++ b/example/urls.py
@@ -1,15 +1,15 @@
from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
-from django.views.generic.simple import direct_to_template
+from django.views.generic import TemplateView
admin.autodiscover()
urlpatterns = patterns('',
- (r'^$', direct_to_template, {'template': 'index.html'}),
- (r'^jquery/index/$', direct_to_template, {'template': 'jquery/index.html'}),
- (r'^mootools/index/$', direct_to_template, {'template': 'mootools/index.html'}),
- (r'^prototype/index/$', direct_to_template, {'template': 'prototype/index.html'}),
+ (r'^$', TemplateView.as_view(template_name='index.html')),
+ (r'^jquery/index/$', TemplateView.as_view(template_name='jquery/index.html')),
+ (r'^mootools/index/$', TemplateView.as_view(template_name='mootools/index.html')),
+ (r'^prototype/index/$', TemplateView.as_view(template_name='prototype/index.html')),
(r'^admin/', include(admin.site.urls)),
)