Backend for Nursery Inventory System. Integratable in any front-end application.
With role based authentication.
- Configure virtual environment(optional)
virtualenv venv -p python3 - Activate virtualenv
source venv/bin/activate - Install dependencies from requirements.txt
pip3 install -r requirements.txt - Make empty database named 'nursery'
- Configure database connection in settings.py
- Migrate the database
python3 manage.py migrate - Fire up the server
python3 manage.py runserver
-
Available Options:
localhost:8000
Check Available APIs -
Plants:
localhost:8000/p
GET: Get the list of available products
POST: Add new Plant
Parameters: name, stock, price, image -
Plant Details:
localhost:8000/p/[id]
Get details of the product with given [id] -
Orders:
localhost:8000/o
GET: Check orders list
POST: Place Order
Parameters: plant_id, quantity -
Login:
localhost:8000/login
Parameters: username, password -
Register:
localhost:8000/register
Parameters: username, first_name, last_name, email, password1, password2, mobile, address, type -
Logout:
localhost:8000/logout
Note: Authentication is mandatory