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:
@@ -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}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user