Closed polow closed 2 years ago
Are you sure that 'two_factor'
is in your INSTALLED_APPS setting?
Are you sure that
'two_factor'
is in your INSTALLED_APPS setting?
Yep INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles',
'django_otp',
'django_otp.plugins.otp_static',
'django_otp.plugins.otp_totp',
# 'django_otp.plugins.otp_email', # <- if you want email capability.
'two_factor',
# 'two_factor.plugins.phonenumber', # <- if you want phone number capability.
# 'two_factor.plugins.email', # <- if you want email capability.
# 'two_factor.plugins.yubikey', # <- for yubikey capability.
# 3rd Party [Bootstrap]
"crispy_forms",
"crispy_bootstrap5",
# My Private Apps
'accounts.apps.AccountsConfig',
'employee.apps.EmployeeConfig',
]
Ah, I see. In the next release, this will work, but in 1.14.0, the two_factor_tags
template library is still inside the phonenumber plugin. So you have to uncomment 'two_factor.plugins.phonenumber' in INSTALLED_APPS to make it work (until the next release).
Well uncommenting that line didn't help, will wait for the next update. Thank you.
I've just spent way too much time googling this error.
TLDR : When you download this project, you will get the "master" version, which is NOT the 1.14.0 version. After downloading that one manually, everything works like a charm. :)
When you download this project, you will get the "master" version
Which way did you download?
I've just spent way too much time googling this error.
TLDR : When you download this project, you will get the "master" version, which is NOT the 1.14.0 version. After downloading that one manually, everything works like a charm. :)
In my case The structurer of my project template is a bit different , I keep template files in each app's directory and since I have a separate app for my project auths and users named 'accounts' I fixed the error by including 'templatetags' folder in the root directory of my 'accounts' app folder and kept 'two_factor' folder in my 'templates' folder in the root directory of my project.
This fixed most of the errors but still there are others I am trying to figure them out.
Getting this error using latest Django 4.0.3
TemplateSyntaxError at /account/login/
Expected Behavior
Load the login page
Current Behavior
Getting this Error : TemplateSyntaxError at /account/login/ 'two_factor_tags' is not a registered tag library. Must be one of: admin_list admin_modify admin_urls cache crispy_forms_field crispy_forms_filters crispy_forms_tags crispy_forms_utils i18n l10n log static tz
Possible Solution
Tried adding templatetags folder in the root directory but same error
Steps to Reproduce (for bugs)
Context
Your Environment