25 lines
791 B
Python
25 lines
791 B
Python
from django.core import serializers
|
|
from django.http import HttpResponseRedirect, HttpResponse, JsonResponse
|
|
from django.shortcuts import render, get_object_or_404
|
|
from django.views.decorators.csrf import csrf_exempt
|
|
from django.views.decorators.http import require_http_methods
|
|
#from django.urls import reverse
|
|
#from django.utils.translation import gettext as _
|
|
|
|
#from lazysignup.decorators import allow_lazy_user
|
|
#from account.decorators import login_required
|
|
|
|
#from procat2.models import Catalog
|
|
|
|
|
|
@csrf_exempt
|
|
@require_http_methods(["POST"])
|
|
def submit(request):
|
|
body = request.body
|
|
if not body or len(body) < 1:
|
|
return HttpResponse('Bad request: no data', status=400)
|
|
|
|
#data = json.loads(body.decode('utf-8'))
|
|
|
|
return JsonResponse({'success': True}, safe=False)
|