lkd-planet/DJAGEN/branches/oguz/djagen/collector/wrappers.py

14 lines
385 B
Python
Raw Normal View History

2010-07-06 19:25:42 +03:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.template import RequestContext
def render_response(req, *args, **kwargs):
"""
Wrapper function that automatically adds "context_instance" to render_to_response
"""
kwargs['context_instance'] = RequestContext(req)
return render_to_response(*args, **kwargs)