- Fork before download
- In <>Code, select Download ZIP
- In the main folder, locate and run VS code . fridge to enter the program
- 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
-
In command prompt or terminal navigate in the folder SwEGroup1.
-
To find the fridge folder (inside it there is another fridge folder). To open fridge folder in VS code, type . fridge (space between).
-
On your left, try to view the content of the app fridge, go in fridge you will find some files.
-
To run the application open manage.py.
-
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: