Changed django.contrib.admin.views.main to use template.loader instead of template_loader
git-svn-id: http://code.djangoproject.com/svn/django/trunk@930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
15fb988dbc
commit
c2ffd62d89
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue