Skip to content


Browse files Browse the repository at this point in the history
[Django Upgrade] ImportError: cannot import name 'render_to_response'…
… from 'django.shortcuts'
  • Loading branch information
agl29 committed Feb 15, 2021
1 parent 6791022 commit f9bcaec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions desktop/core/src/desktop/lib/
Expand Up @@ -31,7 +31,7 @@
from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from django.http import QueryDict, HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response as django_render_to_response
from django.shortcuts import render as django_render
from django.template.context import RequestContext
from django.template.loader import render_to_string as django_render_to_string
from django.urls import reverse
Expand Down Expand Up @@ -150,7 +150,7 @@ def _render_to_response(template, request, *args, **kwargs):
template_lib = _get_template_lib(template, kwargs)
if template_lib == DJANGO:
return django_render_to_response(template, *args, **kwargs)
return django_render(request, template, *args, **kwargs)
elif template_lib == MAKO:
return django_mako.render_to_response(template, *args, **kwargs)
Expand Down

0 comments on commit f9bcaec

Please sign in to comment.