Kiratech project is developed to complete Kiratech's assignment
-
Clone this repository to your local device
-
In your local device, create a new Python environment and activate. In this example, we will name our environment as "kiratech_env"
$ python -m venv kiratech
$ kiratech_env/Scripts/activate.bat
- Go into the root of this project you just cloned, and install the dependencies
$ pip install requirements.txt
- Run the project and visit http://127.0.0.1:8000/inventory
$ python manage.py runserver
This document will breakdown the units of this project according to the assignment PDF provided by Kiratech
Django app called inventory is created containing two models; inventory and supplier
The data of these models are set to NULL=False
A list from model inventories at http://127.0.0.1:8000/inventory
The result of the above page is retrieved from Django Rest Framework at http://127.0.0.1:8000/api/inventory
Side note: Due to time contrain, I did not manage to create API filter using name using "?". However, user may filter the API by name using "/". For example:
http://127.0.0.1:8000/api/inventory/Queendom
User may also filter the list by name using the top right corner of the page
User view the details of a specific inventory by adding inventory ID at the URL. For example; http://127.0.0.1:8000/inventory/1
Or User can just click 'Details'
## Question D Django admin can be accessed using the 'Admin' button at navigation bar or by using this link; http://127.0.0.1:8000/adminBelow is the username and password:
Username: demo
Password: demo
Admin may add new inventory records at inventorys
Test case:
-
Go to project index; http://127.0.0.1:8000/inventory
-
Go to http://127.0.0.1:8000/admin and login to Admin
-
Head over to http://127.0.0.1:8000/admin/inventory/inventory/add/ to add the following details
Name: Summer Magic
Description: EP
Note: Summer Album
Stock: 50
Avalability: Checked
Supplier: Kpop Planet.my
-
Return to http://127.0.0.1:8000/inventory and the new inventory will be listed
-
Click on details to view more info about the album
-
Visit http://127.0.0.1:8000/api/inventory and the new inventory will be listed
-
To filter for a specific name, User may use the search form at the top right corner





