utils.py 377 B

12345678910
  1. def parse_request_method_name(method):
  2. if method in ["POST", "post", "Post", "add", "ADD", "Add"]:
  3. return "add"
  4. if method in ["GET", "get", "Get", "view", "VIEW", "View"]:
  5. return "view"
  6. if method in ["PUT", "put", "Put", "change", "CHANGE", "Change"]:
  7. return "change"
  8. if method in ["DELETE", "delete", "Delete"]:
  9. return "delete"