A small Django API to manage pizzas.
Just issue a pipenv install
, another python manage.py migrate
and you're
good to python manage.py runserver
!
In order to store data, it uses a local SQLite database file. No need to mess with your system :)
As everything is graciously generated by Django REST Framework's ViewSets, this application features the following routes:
- GET /pizzas/ - list all pizzas
- GET /pizzas/ - retrieve pizza by ID
- GET /pizzas/?search= - search pizzas by name (case-insensitive)
- POST /pizzas/ - creates a new pizza
- PATCH /pizzas/ - updates a pizza (partial, you just need to send what you want to change)
- PUT /pizzas/ - updates a pizza (full, you need to send everything)
- DELETE /pizzas/ - deletes a pizza
- Django==2.2.6 (core library for everything :)
- django-cors-headers==3.1.1 (to allow web apps to consume API in localhost)
- djangorestframework==3.10.3 (our API generator S2)
- Pillow==6.2.0 (to enable image uploading)
- pkg-resources==0.0.0 (don't know shit)
- pycodestyle==2.5.0 (needed for "Format code" command in VS Code to work)
- pytz==2019.3 (also don't know shit)
- sqlparse==0.3.0 (...)