Comments for customizations of UserChangeForm.
This commit is contained in:
		@@ -39,8 +39,10 @@ class ExplorerUserChangeForm(UserChangeForm):
 | 
				
			|||||||
    class Meta:
 | 
					    class Meta:
 | 
				
			||||||
        model = User
 | 
					        model = User
 | 
				
			||||||
        fields = [ 'username', 'first_name', 'last_name', 'email' ]
 | 
					        fields = [ 'username', 'first_name', 'last_name', 'email' ]
 | 
				
			||||||
 | 
					    ''' Hide password hint.'''
 | 
				
			||||||
    password = None
 | 
					    password = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ''' Display username, but make it uneditable and not required. '''
 | 
				
			||||||
    def __init__(self, *args, **kwargs):
 | 
					    def __init__(self, *args, **kwargs):
 | 
				
			||||||
        super().__init__(*args, **kwargs)
 | 
					        super().__init__(*args, **kwargs)
 | 
				
			||||||
        self.fields['username'].required = False
 | 
					        self.fields['username'].required = False
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user