Backend for personal use using DRF with Django 3.0.6 using PostgreSQL.
Project deployed in Heroku
-
Clone the repository by:
git clone https://github.com/shashank-sharma/shashank-sharma-backend
-
Create Virtual Environment named as
env
by doing
python3 -m venv env
Now activate it by:
source env/bin/activate
(Linux)
myvenv\Scripts\activate
(Windows) -
Install dependencies
pip install -r requirements.txt
-
Database configuration
Using psql:
CREATE ROLE admin WITH LOGIN PASSWORD 'password';
create database shanksdb;
GRANT ALL PRIVILEGES ON DATABASE shankdb TO admin;
databaseurl: postgresql://admin:password@localhost/shanksdb
-
Set up Virtual Environment values (As mentioned in .env.example)
a. Secret Key:SECRET_KEY=RANDOMTEXT
b. Database Url:DATABASE_URL=<databaseurl>
-
Migration:
python manage.py migrate