Skip to content

coders21/MH-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

MobileHutStore

An online retail site through which user can do online shopping

Prequistes

  • Python 3
  • Django
  • Django Rest Framework
  • Node JS
  • React JS
  • NPM

Installing Guide

  • Clone Repo
  • Create virtual environment
  • Activate virtual environment
  • Run pip3 install -r requirements.txt
  • Run python manage.py makemigrations
  • Run python manage.py migrate
  • Run python manage.py runserver

Testing

Login:

  • create superuser, using python manage.py createsuperuser and tests it with below api it should return access token
  • http://127.0.0.1:8000/AuthApp/jwt/
  • you will get data in this format: { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6ImFkbWluQGdtYWlsLmNvbSIsImV4cCI6MTYwOTkyMzk1NCwiZW1haWwiOiJhZG1pbkBnbWFpbC5jb20ifQ.ekHXYkxk7TCMVRx3_Ap2_FZeWLJb2756Un2_Qgz4Qjo", "user": { "username": "admin@gmail.com", "id": 1 } }

Category Endpoint:

Brand EndPoint:

ModelType (Product Models):

Products Endpoint:

  • http://127.0.0.1:8000/Products/create_products (Create)

  • { "product_name":"xyz", "product_sku":"abc", "product_description":"This is good", "product_quantity":100, "product_price":200, "product_category":1 # (Passing id of category) "product_brand":1 # (Passing id of brand) "product_model":1 # (Passing id of model) }

  • http://127.0.0.1:8000/Products/manage_products/id/ (Edit,Delete)

  • Endpoint to edit product:

  • { "id":1, "product_name":"xyz", "product_sku":"abc", "product_description":"This is good", "product_quantity":100, "product_price":200, "product_category":1 # (Passing id of category) "product_brand":1 # (Passing id of brand) "product_model":1 # (Passing id of model) }

  • Endpoint to delete product

  • { "id":1 }

Colour Endpoint:

Orders

Product Orders

Get All brand,model,order,product

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published