mirror of https://github.com/django/django.git
Fixed #5468 -- Fixed the handling of the context argument in direct_to_template generic views. Thanks, durdinator.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7a6abfdd3b
commit
b361947745
|
@ -2,11 +2,12 @@ from django.shortcuts import render_to_response
|
|||
from django.template import loader, RequestContext
|
||||
from django.http import HttpResponse, HttpResponsePermanentRedirect, HttpResponseGone
|
||||
|
||||
def direct_to_template(request, template, extra_context={}, mimetype=None, **kwargs):
|
||||
def direct_to_template(request, template, extra_context=None, mimetype=None, **kwargs):
|
||||
"""
|
||||
Render a given template with any extra URL parameters in the context as
|
||||
``{{ params }}``.
|
||||
"""
|
||||
if extra_context is None: extra_context = {}
|
||||
dictionary = {'params': kwargs}
|
||||
for key, value in extra_context.items():
|
||||
if callable(value):
|
||||
|
|
Loading…
Reference in New Issue