Skip to content

lonli078/django-rest-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django-rest-demo

Tags decription:

step_1: Simple api for OriginationPoint model.

get: curl http://127.0.0.1:8000/op/
create: curl -X POST http://127.0.0.1:8000/op/ -d '{"name": "op1", "login": "1111", "password": "2222"}' -H "Content-Type: application/json"
retrieve: curl http://127.0.0.1:8000/op/1
update: curl -X PUT http://127.0.0.1:8000/op/1 -d '{"name": "op1", "login": "newlogin", "password": "newpass"}' -H "Content-Type: application/json"

step_2: Use APIView class from django-rest-framework

step_3: Use Generics api view class from django-rest-framework

step_4: serializer pumping

step_5: generics pumping

step_6: relations view

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages