From abf316da9e2d6f85107b87237781443bbfa1eb77 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 13 Feb 2018 03:33:27 +0100 Subject: [PATCH] Add Change password functinality while editing a user via admin site --- membership/admin.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/membership/admin.py b/membership/admin.py index 1e8d2ba8..a4265e5e 100644 --- a/membership/admin.py +++ b/membership/admin.py @@ -75,7 +75,15 @@ class CustomUserAdmin(BaseUserAdmin): ) list_filter = () fieldsets = ( - (None, {'fields': ('email', 'password')}), + (None, {'fields': ('email',)}), + ('Change Password', + {'fields': ('password',), + 'description': "Raw passwords are not stored, so there is no way to " + "see this user's password, but you can change the " + "password using this " + "form." + } + ), ('Permissions', {'fields': ('is_admin', 'user_permissions', 'groups')}), )