HTNL bootstap template not found
yazeedhasan97 opened this issue · comments
I were able to build and run the application however, when going to the signup page the below error appears
Do you have any idea how to solve this and from where I can obtain those missing HTML files
TemplateDoesNotExist
bootstrap4/uni_form.html
E:\new\Django-Ecommerce\venv\Lib\site-packages\django\template\backends\django.py, line 84, in reraise
allauth.account.views.SignupView
E:\new\Django-Ecommerce\venv\Scripts\python.exe
['E:\\new\\Django-Ecommerce', 'C:\\Users\\yazee\\AppData\\Local\\Programs\\Python\\Python311\\python311.zip', 'C:\\Users\\yazee\\AppData\\Local\\Programs\\Python\\Python311\\DLLs', 'C:\\Users\\yazee\\AppData\\Local\\Programs\\Python\\Python311\\Lib', 'C:\\Users\\yazee\\AppData\\Local\\Programs\\Python\\Python311', 'E:\\new\\Django-Ecommerce\\venv', 'E:\\new\\Django-Ecommerce\\venv\\Lib\\site-packages']
Template-loader postmortem
Django tried loading these templates, in this order:
Using engine django:
django.template.loaders.filesystem.Loader: E:\new\Django-Ecommerce\templates\bootstrap4\uni_form.html (Source does not exist)
django.template.loaders.app_directories.Loader: E:\new\Django-Ecommerce\venv\Lib\site-packages\django\contrib\admin\templates\bootstrap4\uni_form.html (Source does not exist)
django.template.loaders.app_directories.Loader: E:\new\Django-Ecommerce\venv\Lib\site-packages\django\contrib\auth\templates\bootstrap4\uni_form.html (Source does not exist)
django.template.loaders.app_directories.Loader: E:\new\Django-Ecommerce\venv\Lib\site-packages\allauth\templates\bootstrap4\uni_form.html (Source does not exist)
django.template.loaders.app_directories.Loader: E:\new\Django-Ecommerce\venv\Lib\site-packages\django_bootstrap5\templates\bootstrap4\uni_form.html (Source does not exist)
Yazeed, did you solve your issue.
hi @yazeedhasan97
please edit the template route path in Django-Ecommerce/demo/settings.py
file of line no 65
from
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static_in_env')]
STATIC_ROOT = os.path.join(BASE_DIR, 'static_root')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media_root')
TO
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static_in_env')]
STATIC_ROOT = os.path.join(BASE_DIR, 'static_in_env')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media_root')