Fix #1296 -- Show last_login in user admin

This commit is contained in:
Raphael Michel
2019-05-28 09:49:28 +02:00
parent 77be4d835b
commit eb8ea6d477
2 changed files with 4 additions and 1 deletions

View File

@@ -48,12 +48,14 @@ class UserEditForm(forms.ModelForm):
'email',
'require_2fa',
'is_active',
'is_staff'
'is_staff',
'last_login'
]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['email'].required = True
self.fields['last_login'].disabled = True
def clean_email(self):
email = self.cleaned_data['email']