def post2data(func):
 def wrapper(self, request):
  request.DATA = request.POST
  if ('$$originalJSON' in request.POST):
   request.DATA = json.loads(request.POST['$$originalJSON'])
  return func(self, request)
 return wrapper

def post2data ( func ) : def wrapper ( self , request ) : request . DATA = request . POST if ( '$$originalJSON' in request . POST ) : request . DATA = json . loads ( request . POST [ '$$originalJSON' ] ) return func ( self , request ) return wrapper
the sole purpose of this decorator is to restore original form values along with their types stored on client-side under key $$originaljson .