For round 3 of CRUx inductions
-
Run the command -
pip install -r requirements.txt
-
Run the command -
python manage.py makemigrations && python manage.py migrate
-
Open the shell by running the command -
python manage.py shell
. Import the random secret key generator -from django.core.management.utils import get_random_secret_key
. Generate a random secret key -get_random_secret_key()
. Save this key for using in the next step -
Create a .env file in the root directory and add the following environment variables:
- CLOUD_NAME = obtained from Cloudinary console
- API_KEY = obtained from Cloudinary console
- API_SECRET = obtained from Cloudinary console
- REDIS_HOST = The URL at which your Redis instance is running
- REDIS_PASS = The password of your Redis instance
- REDIS_USER_HOST_PASS = Pass your username, password and Redis host url in this format:
redis://<username>:<password>@<host_url>:<port>
- SECRET_KEY = The secret key you obtained in the third step
- HOST_MAIL = Your Gmail ID
- HOST_PASS = The password of your Gmail ID
-
Enable 'less secure app access' on your Gmail account to be able to send mails
-
Create a superuser using the command -
python manage.py createsuperuser