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