Make DRF compatible with multi template engine in Django 1.8

This commit is contained in:
Xavier Ordoquy 2015-11-25 07:37:01 +01:00
parent ff0eeaf77a
commit d6c326623f

View File

@ -221,7 +221,7 @@ def template_render(template, context=None, request=None):
:param request: Request instance :param request: Request instance
:return: rendered template as SafeText instance :return: rendered template as SafeText instance
""" """
if django.VERSION < (1, 9) or isinstance(template, Template): if django.VERSION < (1, 8) or isinstance(template, Template):
if request: if request:
context = RequestContext(request, context) context = RequestContext(request, context)
else: else: