diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py
index 0be93a2..aea856a 100644
a
|
b
|
class AdminSite(object):
|
33 | 33 | index_template = None |
34 | 34 | login_template = None |
35 | 35 | app_index_template = None |
| 36 | logout_template = None |
| 37 | password_change_template = None |
| 38 | password_change_done_template = None |
36 | 39 | |
37 | 40 | def __init__(self): |
38 | 41 | self._registry = {} # model_class class -> admin_class instance |
… |
… |
class AdminSite(object):
|
183 | 186 | """ |
184 | 187 | from django.contrib.auth.views import password_change |
185 | 188 | return password_change(request, |
186 | | post_change_redirect='%spassword_change/done/' % self.root_path) |
| 189 | template_name=self.password_change_template or 'registration/password_change_form.html', |
| 190 | post_change_redirect='%spassword_change/done/' % self.root_path |
| 191 | ) |
187 | 192 | |
188 | 193 | def password_change_done(self, request): |
189 | 194 | """ |
190 | 195 | Displays the "success" page after a password change. |
191 | 196 | """ |
192 | 197 | from django.contrib.auth.views import password_change_done |
193 | | return password_change_done(request) |
| 198 | return password_change_done(request, |
| 199 | template_name=self.password_change_done_template or 'registration/password_change_done.html' |
| 200 | ) |
194 | 201 | |
195 | 202 | def i18n_javascript(self, request): |
196 | 203 | """ |
… |
… |
class AdminSite(object):
|
212 | 219 | This should *not* assume the user is already logged in. |
213 | 220 | """ |
214 | 221 | from django.contrib.auth.views import logout |
215 | | return logout(request) |
| 222 | return logout(request, |
| 223 | template_name=self.logout_template or 'registration/logged_out.html' |
| 224 | ) |
216 | 225 | logout = never_cache(logout) |
217 | 226 | |
218 | 227 | def login(self, request): |
diff --git a/django/contrib/auth/admin.py b/django/contrib/auth/admin.py
index 1e4c480..a38b748 100644
a
|
b
|
class GroupAdmin(admin.ModelAdmin):
|
16 | 16 | filter_horizontal = ('permissions',) |
17 | 17 | |
18 | 18 | class UserAdmin(admin.ModelAdmin): |
| 19 | add_form_template = None |
| 20 | change_user_password_template = None |
19 | 21 | fieldsets = ( |
20 | 22 | (None, {'fields': ('username', 'password')}), |
21 | 23 | (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}), |
… |
… |
class UserAdmin(admin.ModelAdmin):
|
60 | 62 | return HttpResponseRedirect('../%s/' % new_user.id) |
61 | 63 | else: |
62 | 64 | form = self.add_form() |
63 | | return render_to_response('admin/auth/user/add_form.html', { |
| 65 | return render_to_response(self.add_form_template or 'admin/auth/user/add_form.html', { |
64 | 66 | 'title': _('Add user'), |
65 | 67 | 'form': form, |
66 | 68 | 'is_popup': '_popup' in request.REQUEST, |
… |
… |
class UserAdmin(admin.ModelAdmin):
|
92 | 94 | return HttpResponseRedirect('..') |
93 | 95 | else: |
94 | 96 | form = self.change_password_form(user) |
95 | | return render_to_response('admin/auth/user/change_password.html', { |
| 97 | return render_to_response(self.change_user_password_template or 'admin/auth/user/change_password.html', { |
96 | 98 | 'title': _('Change password: %s') % escape(user.username), |
97 | 99 | 'form': form, |
98 | 100 | 'is_popup': '_popup' in request.REQUEST, |