Skip to content

hmtschnk/kiratech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kiratech

Kiratech project is developed to complete Kiratech's assignment

Project installation

  1. Clone this repository to your local device

  2. 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

  1. Go into the root of this project you just cloned, and install the dependencies

$ pip install requirements.txt

  1. Run the project and visit http://127.0.0.1:8000/inventory

$ python manage.py runserver

Project breakdown

This document will breakdown the units of this project according to the assignment PDF provided by Kiratech

Question A

Django app called inventory is created containing two models; inventory and supplier

The data of these models are set to NULL=False

Question B

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

Question C

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/admin

Below is the username and password:

Username: demo
Password: demo

Admin may add new inventory records at inventorys

Question C

Test case:

  1. Go to project index; http://127.0.0.1:8000/inventory

  2. Go to http://127.0.0.1:8000/admin and login to Admin

  3. 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
  1. Return to http://127.0.0.1:8000/inventory and the new inventory will be listed

  2. Click on details to view more info about the album

  3. Visit http://127.0.0.1:8000/api/inventory and the new inventory will be listed

  4. To filter for a specific name, User may use the search form at the top right corner

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors