1
# urls.py:  
url(r'^search$', TemplateView.as_view(template_name="home/search.html")),

How would I pass a variable, such as {'update_time': update_time} to a TemplateView.as_view?

David542
  • 104,438
  • 178
  • 489
  • 842
  • https://docs.djangoproject.com/en/1.3/topics/generic-views-migration/#extra-context – karthikr May 20 '13 at 18:49
  • Looks like the only way is to subclass from `TemplateView` and add extra context in `get_context_data` method – stalk May 20 '13 at 19:14

0 Answers0