This is how I solved it:
from django.contrib.auth.decorators import user_passes_test
from django.views.decorators.csrf import csrf_exempt
def allow_all(self):
return True
@user_passes_test(allow_all)
@csrf_exempt
def callback_transloadit(request, pres_id):