Add Change password functinality while editing a user via admin
site
This commit is contained in:
		
					parent
					
						
							
								16add66ed8
							
						
					
				
			
			
				commit
				
					
						abf316da9e
					
				
			
		
					 1 changed files with 9 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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 <a href=\"../password/\">this "
 | 
			
		||||
                         "form</a>."
 | 
			
		||||
         }
 | 
			
		||||
        ),
 | 
			
		||||
        ('Permissions', {'fields': ('is_admin', 'user_permissions',
 | 
			
		||||
                                    'groups')}),
 | 
			
		||||
    )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue