zinmyoswe / Django-Ecommerce

Ecommerce website built with Django 2.2.3, Python 3.7.3, Stripe and AWS
https://zinmyo2141.pythonanywhere.com/
631 stars 389 forks source link

HTNL bootstap template not found #38

Open yazeedhasan97 opened 1 year ago

yazeedhasan97 commented 1 year ago

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 commented 11 months ago

Yazeed, did you solve your issue.

zinmyoswe commented 7 months ago

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