def METHOD_NAME(request):
    ticket = UploadTicket.objects.apply(request.user.username, request.META.get("REMOTE_ADDR", ""))
    return JsonResponse({"result": True, "data": {"ticket": ticket.code}})