Compare commits
2 Commits
c71fe4cf2d
...
871acd1dce
Author | SHA1 | Date | |
---|---|---|---|
871acd1dce | |||
14ca45d111 |
@ -39,8 +39,10 @@ class ExplorerUserChangeForm(UserChangeForm):
|
||||
class Meta:
|
||||
model = User
|
||||
fields = [ 'username', 'first_name', 'last_name', 'email' ]
|
||||
''' Hide password hint.'''
|
||||
password = None
|
||||
|
||||
''' Display username, but make it uneditable and not required. '''
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['username'].required = False
|
||||
|
@ -31,8 +31,9 @@ def generate_profile_image_filename(instance, filename):
|
||||
|
||||
class Explorer(models.Model):
|
||||
"""
|
||||
Profile that is linked to the a User.
|
||||
Profile that is linked to the Django user.
|
||||
Every user has a profile.
|
||||
Provides additional attributes for user profile.
|
||||
"""
|
||||
|
||||
user = models.OneToOneField(
|
||||
|
Loading…
Reference in New Issue
Block a user