Closed philippeowagner closed 8 years ago
based on https://github.com/mysociety/mapit/blob/master/mapit/djangopatch.py#L4-L12
""" Django 1.8 changed how templates operate. """ import django if django.get_version() >= '1.8': from django.template.loader import render_to_string else: from django.template import loader, RequestContext def render_to_string(template_name, context=None, request=None): context_instance = RequestContext(request) if request else None return loader.render_to_string(template_name, context, context_instance
+1
based on https://github.com/mysociety/mapit/blob/master/mapit/djangopatch.py#L4-L12