Commits

John Paulett  committed 6ef686c

Add render_response as a RequestContext wrapper for render_to_response.

  • Participants
  • Parent commits 202c9cd

Comments (0)

Files changed (1)

File beehat/shortcuts.py

+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2010 John Paulett (john -at- paulett.org)
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution.
+
+from django.shortcuts import render_to_response
+
+def render_response(request, *args, **kwargs):
+    """Adds the RequestContext tp django.shortcuts.render_to_response."""
+    kwargs['context_instance'] = RequestContext(request)
+    return render_to_response(*args, **kwargs)