- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
def convert_get_to_post(header='HTTP_X_GET_DATA'):
def decorator(function):
@wraps(function)
def wrapper(request, *args, **kwargs):
if header in request.META:
request.method = 'GET'
request.GET = request.POST
return function(request, *args, **kwargs)
return wrapper
return decorator