From 19eb2957e447aa9975cfe82e7318c03f56ea5d5d Mon Sep 17 00:00:00 2001 From: ArtemB Date: Mon, 31 Jul 2023 19:33:18 +0300 Subject: [PATCH] 0.0.65 --- static/js/user_profile.js | 6 +++++- templates/widgets/w_route_info.html | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index a967132..1dfc2bc 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -373,6 +373,10 @@ function getRoute(){ } }); }function editRoute(id) { + let route_obj = { + 'route_id': id + } + $.ajax({ headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, url: '/ru/routes/edit_route/', @@ -382,7 +386,7 @@ function getRoute(){ processData: false, contentType: false, // enctype: 'json', - data: id, + data: JSON.stringify(route_obj), success: function(data){ console.log('data received') // location.href = '/profile' diff --git a/templates/widgets/w_route_info.html b/templates/widgets/w_route_info.html index 869c449..2c9bd9c 100644 --- a/templates/widgets/w_route_info.html +++ b/templates/widgets/w_route_info.html @@ -1,4 +1,5 @@ {% for route in routes %} +