users: Redirect to users list on successful user creation

- Closes #1316

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-06-28 16:56:40 +05:30 committed by James Valleroy
parent 09bfb07255
commit 825db6ef15
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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."""