ChatServiceApp
This commit is contained in:
SDE
2023-07-31 14:56:13 +03:00
parent fafe645f37
commit 3da6289f22
2 changed files with 33 additions and 8 deletions

View File

@@ -19,18 +19,25 @@ def new_route_view_ajax(request):
if request.method != 'POST':
raise Http404
data = request.POST
form = CreateRouteForm(data)
if not form.is_valid():
pass
form = CreateRouteForm()
Dict = {
'form': form
}
try:
# print(form)
data = request.POST
form = CreateRouteForm(data)
if not form.is_valid():
pass
if form.cleaned_data['type_transport'] == 'avia':
pass
# print(form)
except Exception as e:
form.errors.apend({'__all__': f'Ошибка: {str(e)}'})
html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request)
return JsonResponse({'html': html}, status=200)