initial markup endpoint

This commit is contained in:
2019-10-10 15:28:30 -07:00
parent f2e9a59be6
commit 46f4080b93
4 changed files with 33 additions and 0 deletions

24
markup/views.py Normal file
View File

@ -0,0 +1,24 @@
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)