0.1.1
ChatServiceApp
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user