Move current user views and add user events

Move the current user detail and edit views from the common app
to the user_management app. Add the user created and edited events.
Add an user detail view.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-24 04:21:25 -04:00
parent 931b17a447
commit fd7e937cef
15 changed files with 185 additions and 116 deletions

View File

@@ -159,24 +159,3 @@ class PackagesLicensesForm(FileDisplayForm):
self.fields['text'].initial = '\n\n'.join(
['{}\n{}'.format(package.label, package.license_text) for package in Package.get_all()]
)
class UserForm(forms.ModelForm):
"""
Form used to edit an user's mininal fields by the user himself
"""
class Meta:
fields = ('username', 'first_name', 'last_name', 'email')
model = get_user_model()
class UserForm_view(DetailForm):
"""
Form used to display an user's public details
"""
class Meta:
fields = (
'username', 'first_name', 'last_name', 'email', 'last_login',
'date_joined', 'groups'
)
model = get_user_model()