Django environment setup

Sensitive environment variables, such as Django's SECRET_KEY (https://docs.djangoproject.com/en/2.0/ref/settings/#std:setting-SECRET_KEY), should be kept in a private file that is excluded from version control software. For simplicity, we can just use the sample from the project template:

cd src
cp crypto_stats/settings/local.sample.env crypto_stats/settings/local.env

Next, we can use manage.py to create a default SQLite database and the superuser:

python manage.py migrate
python manage.py createsuperuser

The migrate command initializes the database models, including user authentication, admin, user profiles, user sessions, content types, and thumbnails.

The createsuperuser command will ask you a series of questions for the creation of a superuser:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.31.116