how exactly http methods work.
the both view function do the same thing
django code:
//post method
def create1_post(request):
if request.method=="POST":
any_model=AnyModel(title="example")
any_model.save()
//put method
def create2_post(request):
if request.method=="PUT":
any_model=AnyModel(title="example")
any_model.save()
I read a lot about http methods ,But all I learned is PUT method is for update or create resource and POST method is for create resource
Now I am confused . if I can edit and create models with python why I need to use put or any other http methods