Ticket #5468: patch_5468.diff

File patch_5468.diff, 861 bytes (added by durdinator, 17 years ago)

Fix

  • django/views/generic/simple.py

     
    22from django.template import loader, RequestContext
    33from django.http import HttpResponse, HttpResponsePermanentRedirect, HttpResponseGone
    44
    5 def direct_to_template(request, template, extra_context={}, mimetype=None, **kwargs):
     5def direct_to_template(request, template, extra_context=None, mimetype=None, **kwargs):
    66    """
    77    Render a given template with any extra URL parameters in the context as
    88    ``{{ params }}``.
    99    """
    1010    dictionary = {'params': kwargs}
     11    if extra_context is None: extra_context = {}
    1112    for key, value in extra_context.items():
    1213        if callable(value):
    1314            dictionary[key] = value()
Back to Top