Skip to content

Commit 98f6061

Browse files
author
Jaap Roes
authored
Use configured success_url
Restore the ability to override the success_url in urls.py
1 parent 864d696 commit 98f6061

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

two_factor/views/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ class SetupView(RedirectURLMixin, IdempotentSessionWizardView):
446446
# https://github.com/django/django/blob/58df8aa40fe88f753ba79e091a52f236246260b3/django/contrib/auth/views.py#L63
447447
def get_success_url(self):
448448
url = self.get_redirect_url()
449-
return url or reverse('two_factor:setup_complete')
449+
return url or reverse(self.success_url)
450450

451451
# Copied from django.contrib.auth.views.LoginView (Branch: stable/1.11.x)
452452
# https://github.com/django/django/blob/58df8aa40fe88f753ba79e091a52f236246260b3/django/contrib/auth/views.py#L67

0 commit comments

Comments
 (0)