Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed django.contrib.admin.views.main to use template.loader instea…

…d of template_loader

git-svn-id: http://code.djangoproject.com/svn/django/trunk@930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c2ffd62d89f191f615cf3d187a59590d9e10dacd 1 parent 15fb988
@adrianholovaty adrianholovaty authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 django/contrib/admin/views/main.py
View
9 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('</div>\n</div>')
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):
Please sign in to comment.
Something went wrong with that request. Please try again.