示例#1
0
def feedback(request, store_id=1):
    if request.POST:
        form = ContactCommentOnlyForm(request.POST)
        if form.is_valid():
            return JsonResponse({'success': True})
        else:
            return JsonResponse({'error': form.errors})
    return HttpResponse("Hello from feedback!")
示例#2
0
def feedback(request,store_id=1):
    if request.POST:
        form = ContactCommentOnlyForm(request.POST)
        if form.is_valid():
            return JsonResponse({'success':True})
        else:
            return JsonResponse({'error':form.errors})
    return HttpResponse("Hello from feedback!")
示例#3
0
 def post(self, request):
     form = ContactCommentOnlyForm(request.POST)
     if form.is_valid():
         return JsonResponse({'success': True})
     else:
         return JsonResponse({'error': form.errors})
示例#4
0
 def post(self, request):
     form = ContactCommentOnlyForm(request.POST)
     if form.is_valid():
         return JsonResponse({'success':True})
     else:
         return JsonResponse({'error':form.errors})