itilite is my Project name and app is myapiapp DB in use : SQLite3
methods restframework:: get,put,delete,post API supported at url:
-
event - a)get,post - http://127.0.0.1:8000/myapiapp/event b)edit- put,delete -http://127.0.0.1:8000/myapiapp/editevent/1/
-
category- a)get,post - http://127.0.0.1:8000/myapiapp/category b)edit- put,delete - http://127.0.0.1:8000/myapiapp/editcategory/1/
-
Show list of events by each category specific: URL - http://127.0.0.1:8000/myapiapp/showeventoncategory/1/
-
Show Top 3 Category based on no of events which associated with that category :URL - http://127.0.0.1:8000/myapiapp/TopEventOnCategoryDetails/ Note:
- I have attached the screenshot of all 6 restframework pages with the mail
- secret key has been changed
- categoryMaster -id column is foreign key for eventMaster so if category id 5 is deleted all events belonging to that will get deleted
- to simplify the get method id is key we are searching with as mentioned in urls above
- Delete api on category should delete all events associated with that category.
sample eventMaster request body:
{ "id":"1", "eventName":"birthday", "place":"gaya", "time":"1pm", "duration":"20 min", "cast":"early", "categoryName":"1" }
sample categoryMaster request body: