I am currently using the package 'django-two-factor-authentication' in my Django project and I see the management commands here (https://django-two-factor-auth.readthedocs.io/en/1.14.0/management-commands.html)
My client would like to have a specific message for users who have not enabled two factor authentication. How would I call this from a view to check their status?
I tried this already:
from django.core.management import call_command
authed = call_command('two_factor_status fake_email@gmail.com')
print('authed response')
print(authed)
but I get an error message saying that this is an unknown command. If I leave the email out the page doesn't crash and I don't get an error but it prints out "None".
***Update With this specific package you can check if the user has enabled two factor authentication with
request.user.is_verified
I would still like to know if there is a way to call management commands from a view when they are from a third party package though.