From 825db6ef15b9f4d11456f5950a19969e7319534f Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Thu, 28 Jun 2018 16:56:40 +0530 Subject: [PATCH] users: Redirect to users list on successful user creation - Closes #1316 Signed-off-by: Joseph Nuthalapati Reviewed-by: James Valleroy --- plinth/modules/users/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plinth/modules/users/views.py b/plinth/modules/users/views.py index c2904a56c..bc96e7366 100644 --- a/plinth/modules/users/views.py +++ b/plinth/modules/users/views.py @@ -67,6 +67,10 @@ class UserCreate(ContextMixin, SuccessMessageMixin, CreateView): kwargs['request'] = self.request return kwargs + def get_success_url(self): + """Return the URL to redirect to in case of successful updation.""" + return reverse('users:index') + class UserList(ContextMixin, django.views.generic.ListView): """View to list users."""