From 470914f4311c9697c207732a9576544865cb3b5a Mon Sep 17 00:00:00 2001 From: SDE Date: Sat, 9 Dec 2023 20:44:51 +0300 Subject: [PATCH] 0.3.3 fix form send errors --- GeneralApp/js_views.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/GeneralApp/js_views.py b/GeneralApp/js_views.py index 3377c06..a76e9df 100644 --- a/GeneralApp/js_views.py +++ b/GeneralApp/js_views.py @@ -37,8 +37,13 @@ def send_feedback_form_ajax(request): if not feedback_form.is_valid(): feedback_form.initial = data Dict = {'feedback_form': feedback_form} - html = render_to_string('forms/f_feedback.html', Dict, request=request) - return JsonResponse({'html': html}, status=400) + left_html = render_to_string('widgets/elements_form_feedback.html', Dict, request=request) + right_html = render_to_string('widgets/w_checkbox_f_feedback.html', Dict, request=request) + err_Dict = { + 'left_form_html': left_html, + 'right_form_html': right_html + } + return JsonResponse(err_Dict, status=400) subject = f'Сообщение из формы "{data["form_name"]}"'