Table of contents generated with markdown-toc
Refer this section of the README to add all the environment variables.
Using a virtual environment is encouraged.
pip install -r requirements.txt
python manage.py reset_db
python manage.py migrate
python manage.py runserver
Create a .env
file inside backend
folder with the following environment variables:
# set this to True only in development, DON'T include in production
DEBUG=True
RMP_SECRET_KEY
: The secret key used in Django projects. Read more about
it here.
In order to generate your own secret key, checkout this.
Be more careful with what secret key you use in production. Checkout this.
RMP_DB_URL
: The URL to the database to be used.
For quick development-setup, you can go with SQLite. The corresponding URL will be:
sqlite:///PATH
. PATH
is the path to the SQLite database file (which does not exist beforehand).
Example: sqlite:////home/reeshabh/Desktop/mentoringplatform/backend/db.sqlite3
.
Note: In some rare cases, it might be required that the SQLite database needs to exist beforehand. In those cases,
create an empty file named db.sqlite
at PATH
.
For production environments, avoid SQLite. URLs for other database servers can be found here.
RMP_EMAIL_HOST
: The email service being used.
RMP_EMAIL_HOST_USER
: The account name/username from which the emails are sent.
RMP_EMAIL_HOST_PASSWORD
: The password/secret-key to authenticate the outgoing emails.
We suggest using SendGrid as the email backend.
RMP_EMAIL_HOST
: smtp.sendgrid.net
RMP_EMAIL_HOST_USER
: apikey
(literally)
RMP_EMAIL_HOST_PASSWORD
: Generate API key from Sendgrid using SMTP mode.
Refer this after making a Sendgrid account. However, feel free
to use any other service as your email-backend. Make sure you check out the offers available in
your GitHub Student Developer Pack.