diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 5379c8efb5b..d4503db634f 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -1,6 +1,7 @@ # Generic admin views, with admin templates created dynamically at runtime. -from django.core import formfields, meta, template_loader +from django.core import formfields, meta +from django.core.template import loader from django.core.exceptions import Http404, ObjectDoesNotExist, PermissionDenied from django.core.extensions import DjangoContext as Context from django.core.extensions import get_object_or_404, render_to_response @@ -486,7 +487,7 @@ def change_list(request, app_label, module_name): raw_template.append('\n') raw_template.append('{% endblock %}\n') - t = template_loader.get_template_from_string(''.join(raw_template)) + t = loader.get_template_from_string(''.join(raw_template)) c = Context(request, { 'title': (is_popup and 'Select %s' % opts.verbose_name or 'Select %s to change' % opts.verbose_name), 'is_popup': is_popup, @@ -850,7 +851,7 @@ def add_stage(request, app_label, module_name, show_delete=False, form_url='', p c['object_id'] = object_id_override raw_template = _get_template(opts, app_label, add=True, show_delete=show_delete, form_url=form_url) # return HttpResponse(raw_template, mimetype='text/plain') - t = template_loader.get_template_from_string(raw_template) + t = loader.get_template_from_string(raw_template) return HttpResponse(t.render(c)) def change_stage(request, app_label, module_name, object_id): @@ -975,7 +976,7 @@ def change_stage(request, app_label, module_name, object_id): }) raw_template = _get_template(opts, app_label, change=True) # return HttpResponse(raw_template, mimetype='text/plain') - t = template_loader.get_template_from_string(raw_template) + t = loader.get_template_from_string(raw_template) return HttpResponse(t.render(c)) def _nest_help(obj, depth, val):