diff --git a/two_factor/views/core.py b/two_factor/views/core.py index ab9cff04f..5506748d6 100644 --- a/two_factor/views/core.py +++ b/two_factor/views/core.py @@ -213,7 +213,10 @@ class SetupView(IdempotentSessionWizardView): ('validation', DeviceValidationForm), ('yubikey', YubiKeyDeviceForm), ) + + show_welcome = not hasattr(settings, 'TWO_FACTOR_SKIP_WELCOME') or not settings.TWO_FACTOR_SKIP_WELCOME condition_dict = { + 'welcome': lambda self: show_welcome, 'generator': lambda self: self.get_method() == 'generator', 'call': lambda self: self.get_method() == 'call', 'sms': lambda self: self.get_method() == 'sms',