From db0a40de71de4d8ee7e626d07de8abda95e5d808 Mon Sep 17 00:00:00 2001 From: borissedw Date: Mon, 28 Aug 2023 18:14:20 +0300 Subject: [PATCH 1/5] 0.0.181 --- static/js/user_profile.js | 4 ++++ templates/blocks/profile/b_new_route.html | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 0b8453a..70869e4 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -350,6 +350,10 @@ function sendRoute(el, routeID = null){ let list_of_elements_form = document.querySelectorAll(".el_form_b_new_route"); let obj_w_el_form = {} for (let i = 0;i < list_of_elements_form.length;i++) { + // let id_el = list_of_elements_form[i].id + // if (id_el){ + // if (id_el === "") + // } let name_attr = list_of_elements_form[i].attributes["name"] if (name_attr) { let name_el = name_attr.value diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index e79eb2b..2e80c82 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -221,10 +221,9 @@ {% for item in form.fields.cargo_type.choices %}
Date: Mon, 28 Aug 2023 18:29:59 +0300 Subject: [PATCH 2/5] 0.0.182 --- static/css/styles(boris).css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 684624b..9e553ca 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -999,12 +999,12 @@ .carrier_inf_moving.left{ - width: 41%; + width: 40%; float: left; text-align: left; } .carrier_inf_moving.right{ - width: 41%; + width: 40%; float: right; text-align: right; } From 187393341639ba8b547678a99fb12d0b47398003 Mon Sep 17 00:00:00 2001 From: SDE Date: Tue, 29 Aug 2023 11:47:09 +0300 Subject: [PATCH 3/5] 0.5.1 ArticlesApp --- ArticlesApp/views.py | 4 ++-- RoutesApp/js_views.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ArticlesApp/views.py b/ArticlesApp/views.py index dc7891f..783a5c3 100644 --- a/ArticlesApp/views.py +++ b/ArticlesApp/views.py @@ -126,8 +126,8 @@ def ArticlesOnePageView(request, art_url): } try: - art = UserPageModel.objects.get(**kwargs) - except UserPageModel.DoesNotExist: + art = ArticleModel.objects.get(**kwargs) + except ArticleModel.DoesNotExist: raise Http404 diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index b53d3c3..8b7b007 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -242,6 +242,8 @@ def create_or_change_route_ajax(request, route_id=None): return JsonResponse({'html': html}, status=400) obj = form.save(commit=False) + if 'owner_type' in data: + obj.owner_type = data['owner_type'] obj.owner = request.user obj.save() From e97dc7fcee1ece19997f08246da451bd81639c8a Mon Sep 17 00:00:00 2001 From: SDE Date: Tue, 29 Aug 2023 12:03:33 +0300 Subject: [PATCH 4/5] 0.5.2 find route limit by movers --- RoutesApp/js_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index 8b7b007..c6cd87e 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -154,8 +154,8 @@ def find_routes_ajax(request): try: - data = request.POST - + data = request.POST.dict() + data['owner_type'] = 'mover' routes_Dict = get_routes_Dict(data=data) if 'errors' in routes_Dict: return JsonResponse(routes_Dict, status=400) From 3a087616ee778b9cd84a0d13465963c85627050a Mon Sep 17 00:00:00 2001 From: borissedw Date: Tue, 29 Aug 2023 12:27:22 +0300 Subject: [PATCH 5/5] 0.0.183 --- templates/connect_ws_js.html | 6 ++++++ templates/pages/p_results_find_route.html | 3 ++- templates/pages/profile/p_user_profile.html | 8 +++----- .../small_INCLUDES/carrier_card/inf_about_moving.html | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 templates/connect_ws_js.html diff --git a/templates/connect_ws_js.html b/templates/connect_ws_js.html new file mode 100644 index 0000000..e14d227 --- /dev/null +++ b/templates/connect_ws_js.html @@ -0,0 +1,6 @@ +{% load static %} + + + + + \ No newline at end of file diff --git a/templates/pages/p_results_find_route.html b/templates/pages/p_results_find_route.html index 052ca2c..f6afc44 100644 --- a/templates/pages/p_results_find_route.html +++ b/templates/pages/p_results_find_route.html @@ -9,7 +9,8 @@ {# #} - + + {% include "connect_ws_js.html" %} {% endblock %} diff --git a/templates/pages/profile/p_user_profile.html b/templates/pages/profile/p_user_profile.html index e09e66b..8c2f164 100644 --- a/templates/pages/profile/p_user_profile.html +++ b/templates/pages/profile/p_user_profile.html @@ -11,13 +11,11 @@ {# #} - - - - + - + {% include "connect_ws_js.html" %} + diff --git a/templates/small_INCLUDES/carrier_card/inf_about_moving.html b/templates/small_INCLUDES/carrier_card/inf_about_moving.html index 7765f34..822a330 100644 --- a/templates/small_INCLUDES/carrier_card/inf_about_moving.html +++ b/templates/small_INCLUDES/carrier_card/inf_about_moving.html @@ -3,13 +3,13 @@
Отправка:
-
{% if route.arrival_DT %}{{ route.arrival_DT }}{% else %}Неизвестно{% endif %}
+
{% if route.arrival_DT %}{{ route.arrival_DT|date:"l: d.m.Y." }}{% else %}Неизвестно{% endif %}
Прибытие:
-
{% if route.departure_DT %}{{ route.departure_DT }}{% else %}Неизвестно{% endif %}
+
{% if route.departure_DT %}{{ route.departure_DT|date:"l: d.m.Y." }}{% else %}Неизвестно{% endif %}