DropShip - An API Platform for DropShip Front-End.
clone the repository using any of the commands.
- cd into the project using
cd dropship
- Install libpq-dev (for ubuntu users) using
sudo apt-get install libpq-dev
- Create
.env
file usingtouch .env
- Copy environment variables into
.env
file. - Create virtual environment using
virtualenv -p python3 venv
- Activate virtual environment using
source venv/bin/activate
- Install dependencies using
pip3 install -r requirements.txt
- Activate virtual environment using
source venv/bin/activate
- Export environment variables using
export $(cat .env)
- Generate migration using
python manage.py makemigrations <app_name>
- Activate virtual environment using
source venv/bin/activate
- Export environment variables using
export $(cat .env)
- Migrate using
python manage.py migrate
- Activate virtual environment using
source venv/bin/activate
- Export environment variables using
export $(cat .env)
- Create super user using
python manage.py createsuperuser
- Activate virtual environment using
source venv/bin/activate
- Export environment variables using
export $(cat .env)
- Run server using
python manage.py runserver
- Activate virtual environment using
source venv/bin/activate
- Export environment variables using
export $(cat .env)
- Run testcases using
python manage.py test
- Activate virtual environment using
source venv/bin/activate
- Export environment variables using
export $(cat .env)
- Run a particular testcase using
python manage.py test <folder.module.filename.Classname.specific function name>
- Activate virtual environment using
source venv/bin/activate
- To generate coverage file
coverage run --rcfile=.coveragerc manage.py test
- After step 2, to generate coverage report
coverage html --rcfile=.coveragerc --omit <your_virtual_env_name>/
It will generate coverage folder in /out
- Activate virtual environment using
source venv/bin/activate
- To run pylint
pylint --load-plugins pylint_django <module1> <module2> ...