diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index b6ea671..3d3fb2d 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -141,7 +141,7 @@ def new_route_view_ajax(request): # form.errors.append({'__all__': f'Ошибка: {str(e)}'}) print(str(e)) - html = render_to_string('blocks/profile/b_new_route2.html', Dict, request=request) + html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request) return JsonResponse({'html': html}, status=200) @@ -189,7 +189,7 @@ def create_or_change_route_ajax(request): if not form.is_valid(): form.initial = form.cleaned_data Dict = {'form': form} - html = render_to_string('blocks/profile/b_new_route2.html', Dict, request=request) + html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request) return JsonResponse({'html': html}, status=400) obj = form.save(commit=False) @@ -201,7 +201,7 @@ def create_or_change_route_ajax(request): if 'errors' in routes_Dict: form.errors.update(routes_Dict['errors']) Dict = {'form': form} - html = render_to_string('blocks/profile/b_new_route2.html', Dict, request=request) + html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request) return JsonResponse({'html': html}, status=400) html = render_to_string('blocks/profile/b_my_routes.html', routes_Dict, request=request) @@ -220,5 +220,5 @@ def create_or_change_route_ajax(request): } } Dict = {'form': errors_Dict} - html = render_to_string('blocks/profile/b_new_route2.html', Dict, request=request) + html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request) return JsonResponse({'html': html}, status=400) \ No newline at end of file diff --git a/TWB/settings.py b/TWB/settings.py index faae81a..d08ceea 100644 --- a/TWB/settings.py +++ b/TWB/settings.py @@ -271,15 +271,15 @@ CKEDITOR_OPTIONS = { try: - from tEDataProj import db_local_sets + import db_local_sets DATABASES = db_local_sets.DATABASES except ImportError as e: pass # global prod_server try: - import local_sets - SERVER_URL = local_sets.SERVER_URL + import db_local_sets + # SERVER_URL = local_sets.SERVER_URL except ImportError: pass diff --git a/static/css/styles.css b/static/css/styles.css index 1f867b3..0daae39 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1175,18 +1175,44 @@ input#id_cargo_type{ margin: 10px; } -.route_info_point>span{ +.route_info_point > div > span{ + float: right; + font-family: Inter, serif; + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: 22px; + width: 50%; + text-align: left; +} +.route_info_point > div > div{ + float: left; + width: 50%; + text-align: right; font-family: Inter, serif; font-size: 16px; font-style: normal; font-weight: 500; line-height: 22px; } -.route_info_point>div{ - border: 2px solid #FF613A; - width: 20px; + +.route_info_point > div{ + width: 100%; + height: 20px; + top: 30%; + position: relative; + padding-left: 17px; } +.route_info_point > div > div > div{ + border: 1px solid #FF613A; + width: 20px; + display: inline-block; + margin-right: 5px; + margin-bottom: 4px; +} + + .route_info_about>span:first-child{ background: url("/static/img/png/Tag.png") left center no-repeat; diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 1dfc2bc..df25405 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -150,7 +150,7 @@ function searchTown(el){ } }); - }, 1000); + }, 1500); } @@ -220,7 +220,7 @@ function sendRoute(el){ $.ajax({ headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, - url: '/ru/routes/create_route/', + url: '/ru/routes/create_or_change_route/', type: "POST", // async: true, cache: false, diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index 949b93d..1d07e55 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -17,7 +17,7 @@ {% for item in form.fields.type_transport.choices %}