utils.py 270 B

12345678910
  1. def parse_request_method_name(method):
  2. if method in ["POST", "post"]:
  3. return "add"
  4. if method in ["GET", "get"]:
  5. return "view"
  6. if method in ["PUT", "put"]:
  7. return "change"
  8. if method in ["DELETE", "delete"]:
  9. return "delete"