Refactor user management app

Add keyword arguments.

Update view resolutions and URL parameters to the '_id' form.

Remove code from create and edit subclasses and user
the super class error checking.

Cache the view object instead of using .get_object()
every time.

Movernize tests.

Update views to comply with MERCs 5 and 6.

Split UserTestMixin into mixins for Groups and Users tests.

Add super delete and detail tests.

Remove redundant superuser filtering from views.

Add transactions to views that also commit events.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-01-29 13:35:10 -04:00
parent 3bd33db023
commit f65f363361
20 changed files with 886 additions and 551 deletions

View File

@@ -4,4 +4,6 @@ from django.shortcuts import reverse
def method_get_absolute_url(self):
return reverse(viewname='user_management:user_details', args=(self.pk,))
return reverse(
viewname='user_management:user_details', kwargs={'user_id': self.pk}
)