- Inventory items management
- Written in Python Django
API to:
- Create, Read, Update, Delete
inventory items
- CHANGE
DATABASE_URLIN.envTO MATCH YOUR DB SPECIFICS IN THE FOLLOWING FORMAT:- mysql://:@:/ - Example
mysql://root:@localhost:3306/inventory
- mysql://:@:/ - Example
-
Start a virtual environment
python -m venv envin your local repository -
On windows run
.\env\Scripts\activate -
The following command will install the packages according to the configuration file requirements.txt.
pip install -r requirements.
- The following command will run all database migrations needed
pyhton manage.py migrateThen test if it workspyhton manage.py runserver
- Create a superuser using the following command
python manage.py createsuperuser
- Obtain a token at
POST /token/with username and password - Use your token to access
POST, DELETE and PUTendpoints(urls).You can use
GET, HEAD, OPTIONSendpoints without AUTHENTICATION - List of all items at
GET /items/ - Create new
itemsatPOST /items/ - Retrieve item at
GET /items/<item id>/ - Update item at
PUT /items/<item id>/- with fields you want to update - Delete item at
DELETE /items/<item id>/
-> PLEASE REMEMBER TRAILING SLASHES TO AVOID ERRORS
To disable the
browsable apigo toinventory/setting.pyandcommentlines154 - 156
"ISHIMWE Valentin ishimwedeveloper@gmail.com"