Merge remote-tracking branch 'origin/main'

This commit is contained in:
2023-08-01 16:55:47 +03:00
2 changed files with 2 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ from django.urls import path
from .js_views import *
urlpatterns = [
path('create_route/', create_route_ajax, name='create_route_ajax'),
path('create_or_change_route/', create_or_change_route_ajax, name='create_or_change_route_ajax'),
path('edit_route/', edit_route_ajax, name='edit_route_ajax'),
path('get_routes/', get_routes_ajax, name='get_routes_ajax'),

View File

@@ -176,7 +176,7 @@ def get_routes_ajax(request):
def create_route_ajax(request):
def create_or_change_route_ajax(request):
if request.method != 'POST':
raise Http404
@@ -185,9 +185,6 @@ def create_route_ajax(request):
data = request.POST
# obj = Route(data)
# form = RouteForm(data=data, instance=obj)
form = RouteForm(data)
if not form.is_valid():
form.initial = form.cleaned_data