From 2e9200953e344e15b511a7d3182585ba295406fa Mon Sep 17 00:00:00 2001 From: ArtemB Date: Mon, 31 Jul 2023 19:24:48 +0300 Subject: [PATCH] 0.0.64 error 500 w_route_info.html --- static/css/styles.css | 13 ++++++++++--- static/js/user_profile.js | 25 ++++++++++++++++++++++++- templates/widgets/w_route_info.html | 4 +++- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 169182e..1f867b3 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1173,11 +1173,18 @@ input#id_cargo_type{ border-radius: 10px; background: #F8F8F8; margin: 10px; - text-align: center; + } .route_info_point>span{ - top:20%; - position: relative; + 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; } diff --git a/static/js/user_profile.js b/static/js/user_profile.js index e23f436..a967132 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -372,6 +372,30 @@ function getRoute(){ } }); +}function editRoute(id) { + $.ajax({ + headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, + url: '/ru/routes/edit_route/', + type: "POST", + // async: true, + cache: false, + processData: false, + contentType: false, + // enctype: 'json', + data: id, + success: function(data){ + console.log('data received') + // location.href = '/profile' + document.querySelector(".info_profile").innerHTML = data.html; + + + }, + error: function (data, exception){ + console.log(101) + + } + }); + } @@ -379,4 +403,3 @@ function getRoute(){ - diff --git a/templates/widgets/w_route_info.html b/templates/widgets/w_route_info.html index 66cd3dd..869c449 100644 --- a/templates/widgets/w_route_info.html +++ b/templates/widgets/w_route_info.html @@ -22,6 +22,8 @@ {{ route.from_country.name }}/{{ route.from_city.name }} +
+ {{ route.to_country.name }}/{{ route.to_city.name }} @@ -57,7 +59,7 @@ {{ route.owner.email }}
-