def get_failed_response(redirect_url, title, msg): message_data = { 'title': title, 'error': msg, 'interval': 5, 'redirect_url': redirect_url, } return FlashMessageUtil.gen_and_redirect_to(message_data)
def has_already_bound_message(): message_data = { 'title': _('Already bound'), 'error': _('MFA already bound, disable first, then bound'), 'interval': 10, 'redirect_url': reverse('authentication:user-otp-disable'), } response = FlashMessageUtil.gen_and_redirect_to(message_data) return response