diff --git a/django/views/generic/simple.py b/django/views/generic/simple.py index 69a494931e..9d7efdc6c4 100644 --- a/django/views/generic/simple.py +++ b/django/views/generic/simple.py @@ -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):