Please install mysql first before continue to next steps
Before install the requirements, you can choose to install directly, using virtualenv, or using Docker
- Install virtualenv by
pip install virtualenv
- Create virtualenv project by
virtualenv venv
(This will create venv folder in current directory) - Run the virtualenv by
source venv/bin/activate
(After this, you will see the (venv) in front of folder directory) - For next step, you can go to step B
Move to project directory and run
pip install -r requirements.txt
- Install the docker engine
- Install the docker compose
- Run
docker-compose -f <docker-compose-version.yml> up
in the project directory
To run the code, the steps are:
- For steps A and B run
python manage.py runserver
then accesslocalhost:8000/
- For step C, directly access at
localhost:8800/
If you change JavaScript file(s), you have to update the js by running this command based on how you setup the project
- Setup using Docker
- get inside the docker container by
docker exec -ti <container name> bash
- run
python manage.py collectstatic
- Setup using virtualenv
- run
python manage.py collectstatic
To run a test just type
`./manage.py test app_name`
If you want to run whole test then just type
`./manage.py test`
If you want to check code coverage just run
`covarage run --source='.' manage.py test app_name(optional)`
and then to see the report just run
`coverage report`