1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.5.x] Fixed #18697 -- Made values accepted for two customizable admin templates consistent.

Thanks and at cloverfastfood dot com for the report.

b64d30405a from master.
This commit is contained in:
Ramiro Morales
2012-12-03 20:39:03 -03:00
parent b6f67bd50e
commit 6a098aa6f2
5 changed files with 28 additions and 8 deletions

View File

@@ -389,9 +389,9 @@ class AdminSite(object):
'app_list': app_list,
}
context.update(extra_context or {})
return TemplateResponse(request, [
self.index_template or 'admin/index.html',
], context, current_app=self.name)
return TemplateResponse(request, self.index_template or
'admin/index.html', context,
current_app=self.name)
def app_index(self, request, app_label, extra_context=None):
user = request.user

View File

@@ -148,10 +148,10 @@ class UserAdmin(admin.ModelAdmin):
'save_as': False,
'show_save': True,
}
return TemplateResponse(request, [
return TemplateResponse(request,
self.change_user_password_template or
'admin/auth/user/change_password.html'
], context, current_app=self.admin_site.name)
'admin/auth/user/change_password.html',
context, current_app=self.admin_site.name)
def response_add(self, request, obj, **kwargs):
"""