Compare commits
No commits in common. "871acd1dcecd3c75c8729a933765718104075017" and "c71fe4cf2dc6ff39cd343bf164648050357528a8" have entirely different histories.
871acd1dce
...
c71fe4cf2d
@ -39,10 +39,8 @@ 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
|
||||||
|
@ -31,9 +31,8 @@ def generate_profile_image_filename(instance, filename):
|
|||||||
|
|
||||||
class Explorer(models.Model):
|
class Explorer(models.Model):
|
||||||
"""
|
"""
|
||||||
Profile that is linked to the Django user.
|
Profile that is linked to the a User.
|
||||||
Every user has a profile.
|
Every user has a profile.
|
||||||
Provides additional attributes for user profile.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
user = models.OneToOneField(
|
user = models.OneToOneField(
|
||||||
|
Loading…
Reference in New Issue
Block a user