Hosting of this project has been removed since Heroku stopped free servers.
A Light shop ecommerce website with SQL database implemented using Django framework.
The lightshop is project name and home is backened-app name in development process.
HTML components/pages are made dynamic using django-html to use python variables and loops in html. base.html file contains all header files and is the root template which is rendered i.e all other html files are imported in it.
All routes are in url.py(both in home directory and in lightshop directory), each template page is routed with specific functions in views.py to show data as per needed.
SQLite is used for database. Backened-database can be accessed only by admin panel inbuild in django framework. modal.py shows declaration and defining of database's variables as well as their values.
For Heroku hosting via gunicorn package.
Bootstrap version 5 is used for ease of designing.
To run this project, you will need to add the following environment variables to your .env file
SECRET_KEY = API key
In settings.py this key is used as:
SECRET_KEY = config('The variable name in .env inside quotes')
If you store API key as string in .env then remove quotations inside config.
-
In .env file
SECRET_KEY = 'API key'
-
In settings.py
SECRET_KEY = config(SECRET_KEY)