diff --git a/umap/views.py b/umap/views.py index 8736c1dd..01fb4c48 100644 --- a/umap/views.py +++ b/umap/views.py @@ -23,9 +23,8 @@ from django.http import ( ) from django.middleware.gzip import re_accepts_gzip from django.shortcuts import get_object_or_404 -from django.template.loader import render_to_string from django.urls import reverse, reverse_lazy -from django.utils.encoding import force_bytes, smart_bytes +from django.utils.encoding import smart_bytes from django.utils.http import http_date from django.utils.translation import gettext as _ from django.utils.translation import to_locale @@ -329,15 +328,6 @@ def _urls_for_js(urls=None): return urls -def render_to_json(templates, context, request): - """ - Generate a JSON HttpResponse with rendered template HTML. - """ - html = render_to_string(templates, context=context, request=request) - _json = json.dumps({"html": html}) - return HttpResponse(_json) - - def simple_json_response(**kwargs): return HttpResponse(json.dumps(kwargs))