initial markup endpoint
This commit is contained in:
0
markup/__init__.py
Normal file
0
markup/__init__.py
Normal file
7
markup/urls.py
Normal file
7
markup/urls.py
Normal file
@ -0,0 +1,7 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('submit', views.submit, name='markup_submit'),
|
||||
]
|
||||
24
markup/views.py
Normal file
24
markup/views.py
Normal 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)
|
||||
@ -50,6 +50,8 @@ urlpatterns = [
|
||||
path('convert/done/', lazy_convert_done, name='lazysignup_convert_done'),
|
||||
|
||||
path('quickinfo/', include('quickinfo.urls')),
|
||||
|
||||
path('markup/', include('markup.urls')),
|
||||
]
|
||||
|
||||
if settings.DJDT:
|
||||
|
||||
Reference in New Issue
Block a user