diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-10-18 05:18:50 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-10-18 05:18:50 +0000 |
| commit | c2ffd62d89f191f615cf3d187a59590d9e10dacd (patch) | |
| tree | 4cd88be951f5336eae277f8f63cf79360f54b7c7 | |
| parent | 15fb988dbc9f25e9e04eeb098370476c0bee1363 (diff) | |
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
| -rw-r--r-- | django/contrib/admin/views/main.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 5379c8efb5..d4503db634 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('</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): |
