Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTNL bootstap template not found #38

Open
yazeedhasan97 opened this issue Sep 5, 2023 · 2 comments
Open

HTNL bootstap template not found #38

yazeedhasan97 opened this issue Sep 5, 2023 · 2 comments

Comments

@yazeedhasan97
Copy link

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)

@athularavindakshan
Copy link

Yazeed, did you solve your issue.

@zinmyoswe
Copy link
Owner

zinmyoswe commented Feb 17, 2024

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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants