source: src/django_gheat/samples/persisted/home/urls.py@ 9060

Last change on this file since 9060 was 9046, checked in by rick, 14 years ago

Get rid of the warnings, migrate to class based views:

http://docs.djangoproject.com/en/1.3/topics/generic-views-migration/

File size: 624 bytes
Line 
1from django.conf.urls.defaults import *
2from django.views.generic.simple import direct_to_template
3from django.views.generic.base import TemplateView
4from django.conf import settings
5
6urlpatterns = patterns('',
7 ('^about/$', TemplateView.as_view(template_name='about.html'))
8)
9
10class GoogleTemplateView(TemplateView):
11 def get_context_data(self, **kwargs):
12 context = super(GoogleTemplateView, self).get_context_data(**kwargs)
13 context.update({ 'google_key': settings.GOOGLE_MAPS_KEY })
14 return context
15
16
17urlpatterns = patterns('home.views',
18 ('^$', GoogleTemplateView.as_view(template_name='home.html'))
19)
Note: See TracBrowser for help on using the repository browser.