Ticket #1504: __init__.py.diff

File __init__.py.diff, 662 bytes (added by James Wheare <django@…>, 8 years ago)
  • shortcuts/__init__.py

     
    66from django.http import HttpResponse, Http404
    77from django.db.models.manager import Manager
    88
    9 def render_to_response(*args, **kwargs):
    10     return HttpResponse(loader.render_to_string(*args, **kwargs))
     9def render_to_response(mimetype=None, *args, **kwargs):
     10    return HttpResponse(loader.render_to_string(*args, **kwargs), mimetype=mimetype)
    1111load_and_render = render_to_response # For backwards compatibility.
    1212
    1313def get_object_or_404(klass, *args, **kwargs):
Back to Top