Blog about the commercial success of Yuri Grigorievich. He shares advice on business, life and raising children.
To run the site you will need Python version 3.
Download the code from GitHub. Install dependencies:
pip install -r requirements.txt
Create a SQLite Database
python3 manage.py migrate
Start the development server
python3 manage.py runserver
Some of the project settings are taken from environment variables. To define them, create a .env
file next to manage.py
and write the data there in the following format: VARIABLE=value
.
There are 3 variables available:
DEBUG
- debug mode. Set toTrue
to see debugging information in case of an error.SECRET_KEY
— secret key of the projectDATABASE_FILEPATH
- full path to the SQLite database file, for example:/home/user/schoolbase.sqlite3
ALLOWED_HOSTS
- see Django documentation
The code was written for educational purposes - for a course on Python and web development on the website Devman.
Specifically, the repository is used:
- In the task “Optimizing the site” of the module Introduction to Django: ORM.
- In the tutorial Preview for ImageField in the admin panel