Ticket #31564: views.py

File views.py, 361 bytes (added by Jacob Crabtree, 5 years ago)

Django Views

Line 
1from django.http import HttpResponse
2from django.views.decorators.csrf import csrf_exempt
3from django.views.decorators.http import require_POST
4
5
6@csrf_exempt
7@require_POST
8def upload(request):
9 print('got request')
10 read_size = 1024 * 1024 * 50
11
12 data = request.read(read_size)
13 return HttpResponse("Early Response!", status_code=500)
Back to Top