Built for Texada Software
- Make sure you have Python 3.6+ installed. If you need installation help.
- Confirm you have
pip
(PyPi), installed and in your path. python --version
- Should confirm the version of python you have in your path.python -m pip --version
- Should confirm the version of pip you have installed.pip --version
- Should confirm that you have pip in your path.
- Confirm you have
- Create
.env
file using.env.example
. All values are important. - Make sure python has all requirements installed.
pip install -r requirements.txt
- Run database migrations
python manage.py makemigrations
python manage.py migrate
- Import quick start data
python manage.py loaddata trackex/fixtures/initial_data_auth.json
python manage.py loaddata api/fixtures/initial_data_api.json
python manage.py runserver [PORT]
- Visit http://[yourhost]:[PORT] to check out the browsable api
- Add .json to urls or set your header to accept json responses
- END POINTS
/packages
- list of packagesGET
- get paginated listPOST
- create new package
/packages/{id}
- single pacakgeGET
- get package resourcePUT
PATCH
- update packageDELETE
- delete package and tracking informationPERMISSION:SUPERUSER
/packages/{id}/tracking
- package trackingGET
- paginated status list ordered by recencyPOST
- create new package status update
/status/{id}
- status detailDELETE
- delete tracking statusPERMISSION:SUPERUSER
- One way to run tests
python manage.py test
- For test coverage analysis
coverage run --source=. manage.py test
coverage report -m