Lint: Black
CI/CD: Github Actions
git clone [email protected]:fandredev/django-api-rest.git
python -m venv venv
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Look the .env.example file to change your informations from PostgreSQL database. A database must be created using PostgreSQL manually and your server needs be a running in other terminal.
In example, i use asdf to instance postgres in my machine. (https://asdf-vm.com/)
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
- or using
launch.json
file (if you use vscode)
python manage.py test
In another tab, open browser and put http://localhost:8000/control in URL browser. Log in with your superuser
python populate_students.py && python populate_courses.py
- Pass, the user and password authorization to using routes (super/password that were created with
python manage.py createsuperuser
)
-
by default, the answers will come in .xml; Change this using 'Accept' header with 'application/json' value.
-
Note: to use students routes v2 use, http://localhost:8000/students?version=v2
If you have any feedback, please let us know via [email protected]