Giter Club home page Giter Club logo

django-api's Introduction

Author Name: Group1 (Jean René MUNYESHYAKA, Denyse NTAHITABA, JMV AHIMANA, Kembo ISAMUNA)

Create, Read, Update, and Delete (CRUD) API + Consumer API, with Django

(CRUD) API + Consumer API, with Django

How to use this program?

  1. Fork before download
  2. In <>Code, select Download ZIP
  3. In the main folder, locate and run VS code . fridge to enter the program
  4. Below are some important commands to run this program:

Please, don't modified files and folders' structure. Otherwise, it may not work. In this App, we have 2 API:

1. Consumer API: for client API, to consume this API, follow the link: http://127.0.0.1:8000/fridge
2. Product API: This is at Admin side with. To navigate it, copy this link: http://127.0.0.1:8000/Admin
  1. In command prompt or terminal navigate in the folder SwEGroup1.

  2. To find the fridge folder (inside it there is another fridge folder). To open fridge folder in VS code, type . fridge (space between).

  3. On your left, try to view the content of the app fridge, go in fridge you will find some files.

  4. To run the application open manage.py.

  5. with namage.py open a terminal in VS code and type: python manage.py runserver [start python serve] Then in your browser, type the url: http://127.0.0.1:8000/admin/login/

    Our Django administration To login, here are credentials: Username: groupone Password: SoICTSwEng#@2023

You will get admin dashboard, where you can perform different task such as adding products in the freidge 5. You can now close open terminal and start verify consume API. To do so, open consume.py and open its terminal. In the terminal under VS code, type python consume.py [start consumer API]. Go in the browser and type http://127.0.0.1:8000/fridge/ now you can find different products as added by the Admin. To view a single item in the fridge, type: http://127.0.0.1:8000/fridge/[id] | with id= n number from 1 to n

If the server is running, you can use postman to perform different tasks.

References:

  1. src: https://www.makeuseof.com/django-rest-api-create/
  2. https://www.makeuseof.com/django-rest-api-create/
  3. Lecturer's notes

django-api's People

Contributors

josamuna avatar renemunyeshyaka avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.