Line | |
---|
1 | from django.conf.urls.defaults import *
|
---|
2 | from django.views.generic.simple import direct_to_template
|
---|
3 | from django.views.generic.base import TemplateView
|
---|
4 | from django.conf import settings
|
---|
5 |
|
---|
6 | urlpatterns = patterns('',
|
---|
7 | ('^about/$', TemplateView.as_view(template_name='about.html'))
|
---|
8 | )
|
---|
9 |
|
---|
10 | class 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 |
|
---|
17 | urlpatterns = patterns('home.views',
|
---|
18 | ('^$', GoogleTemplateView.as_view(template_name='home.html'))
|
---|
19 | )
|
---|
Note:
See
TracBrowser
for help on using the repository browser.