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!")
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!")
def post(self, request): form = ContactCommentOnlyForm(request.POST) if form.is_valid(): return JsonResponse({'success': True}) else: return JsonResponse({'error': form.errors})
def post(self, request): form = ContactCommentOnlyForm(request.POST) if form.is_valid(): return JsonResponse({'success':True}) else: return JsonResponse({'error':form.errors})