Want to learn django with REST without staffing without rest

I am a php programmer, I created some REST solutions in php. Now I am learning python / django. I want to make a REST based solution in Django (for knowledge only). I do not want to use any of the REST frameworks / toolkits, as this project is a more learning django / python that tells how they work with the raw REST concept.

I searched on the net, but the examples / tutorial are filled with already built solutions. I also test filtering based on the request method. I think of two approaches.

Or urls.py have a way to check the request method, and pass the corresponding method to views.py.
Or I can add pre load hook / class, which define the request method when initializing the application, and call the appropriate method to override the behavior of urls.py (my preferred method).

If anyone can suggest a django way for this?

Update: I found interesting comments to the SO, for example qaru.site/questions/542848 / ... And qaru.site/questions/510280 / ... . Need to check if they can have a solution, I'm looking.

0
source share
2 answers

, , , . , .

Django

, , REST Api, Django Core. https://docs.djangoproject.com/en/dev/topics/serialization/ Json

(, - , .;))

0

All Articles