diff --git a/AuthApp/admin.py b/AuthApp/admin.py index b9e882d..3e357ba 100644 --- a/AuthApp/admin.py +++ b/AuthApp/admin.py @@ -97,12 +97,14 @@ class Admin_User(UserAdmin): save_on_top = True list_display = ['id', 'last_name', 'first_name', 'mailing_on', 'email', 'is_staff', - 'is_active'] + 'is_active', 'date_joined', 'last_login'] list_editable = ['is_staff', 'is_active'] list_display_links = ['first_name', 'last_name', 'email'] search_fields = ['first_name', 'last_name', 'email'] - list_filter = ['user_profile__mailing_on', 'is_staff', 'is_active'] + readonly_fields = ['date_joined', 'last_login'] + + list_filter = ['user_profile__mailing_on', 'is_staff', 'is_active', 'date_joined', 'last_login'] inlines = (Admin_ProfileInline,) # actions = ['del_all_temp_users', ] diff --git a/ReferenceDataApp/funcs.py b/ReferenceDataApp/funcs.py index a565786..9d8c85c 100644 --- a/ReferenceDataApp/funcs.py +++ b/ReferenceDataApp/funcs.py @@ -9,11 +9,9 @@ tzf = TimezoneFinder() def search_cities_in_db(search_str): - - Q_obj = Q(name_en__icontains=search_str) | Q(name_ru__icontains=search_str) | \ Q(country__name_en__icontains=search_str) | Q(country__name_ru__icontains=search_str) - res_data = City.objects.filter(Q_obj).values('id', 'name', 'country__name') + res_data = City.objects.filter(Q_obj).values('id', 'name', 'country__name', 'timezone') return list(res_data) def search_airports_in_db(search_str): @@ -22,7 +20,10 @@ def search_airports_in_db(search_str): Q(city__name_en__icontains=search_str) | Q(city__name_ru__icontains=search_str) | \ Q(city__country__name_en__icontains=search_str) | \ Q(city__country__name_ru__icontains=search_str) - res_data = Airport.objects.filter(Q_obj).values('id', 'name', 'iata_code', 'city__name', 'city__country__name') + res_data = Airport.objects.filter(Q_obj).values( + 'id', 'name', 'iata_code', + 'city__name', 'city__country__name', 'city__timezone' + ) return list(res_data) diff --git a/ReferenceDataApp/js_views.py b/ReferenceDataApp/js_views.py index 21880f4..3afc0d8 100644 --- a/ReferenceDataApp/js_views.py +++ b/ReferenceDataApp/js_views.py @@ -56,10 +56,12 @@ def get_address_point_ajax(request): item['fullname'] = f'{item["iata_code"]} - {item["name"]}' item['city_name'] = item['city__name'] item['country_name'] = item['city__country__name'] + item['city_DT'] = datetime.now(tz=pytz.timezone(item['city__timezone'])) else: item['city_name'] = item['name'] item['country_name'] = item['country__name'] item['fullname'] = f'{item["city_name"]} / {item["country_name"]}' + item['city_DT'] = datetime.now(tz=pytz.timezone(item['timezone'])) html = f"{html}{render_to_string('widgets/w_ac_input_address_point.html', item)}" i += 1 diff --git a/ReferenceDataApp/migrations/0006_airport_timezone_city_timezone_country_timezone.py b/ReferenceDataApp/migrations/0006_airport_timezone_city_timezone_country_timezone.py new file mode 100644 index 0000000..7d95c25 --- /dev/null +++ b/ReferenceDataApp/migrations/0006_airport_timezone_city_timezone_country_timezone.py @@ -0,0 +1,28 @@ +# Generated by Django 4.2.2 on 2024-07-12 17:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ReferenceDataApp', '0005_remove_airport_parsing_finished_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='airport', + name='timezone', + field=models.CharField(blank=True, max_length=250, null=True, verbose_name='Часовая зона'), + ), + migrations.AddField( + model_name='city', + name='timezone', + field=models.CharField(blank=True, max_length=250, null=True, verbose_name='Часовая зона'), + ), + migrations.AddField( + model_name='country', + name='timezone', + field=models.CharField(blank=True, max_length=250, null=True, verbose_name='Часовая зона'), + ), + ] diff --git a/RoutesApp/admin.py b/RoutesApp/admin.py index 745c5b0..ba2b3dc 100644 --- a/RoutesApp/admin.py +++ b/RoutesApp/admin.py @@ -13,7 +13,9 @@ class Admin_Route(Admin_Trans_BaseModel): list_display_links = ['id'] list_filter = ['owner_type', 'type_transport', 'cargo_type', 'from_place', 'arrival_DT', 'modifiedDT', 'createDT'] - search_fields = ['owner__first_name', 'owner__last_name'] + search_fields = [ + 'owner__first_name', 'owner__last_name', 'from_city__name', 'to_city__name' + ] raw_id_fields = ['from_city', 'to_city'] admin.site.register(Route,Admin_Route) diff --git a/RoutesApp/views.py b/RoutesApp/views.py index 141cbeb..d35ba0e 100644 --- a/RoutesApp/views.py +++ b/RoutesApp/views.py @@ -59,6 +59,8 @@ def route_search_results_View(request): t = loader.get_template('pages/p_results_find_route.html') return get_inter_http_response(t, Dict, request) - # return HttpResponse(t.render(Dict, request)) + except Exception as e: + msg = f'!!! --- route_search_results_View Exception {str(e)}' + print(msg) raise Http404 diff --git a/static/css/mobile_styles.css b/static/css/mobile_styles.css index 1dde9e8..4b4b6f8 100644 --- a/static/css/mobile_styles.css +++ b/static/css/mobile_styles.css @@ -1510,6 +1510,10 @@ width: 153px; } + .popup_content{ + width: 41%; + } + } @media (max-width: 950px){ @@ -1554,6 +1558,9 @@ .pag_news_item_text{ width: unset; } + .popup_content{ + width: 52%; + } } @media (max-width: 850px){ @@ -1687,6 +1694,9 @@ .marker_messages_mobile.show{ display: block; } + .popup_content>.confirm_profile_btn{ + width: 90%; + } } @media (max-width: 828px){ @@ -1844,6 +1854,9 @@ .inf_carrier_icon{ /*width: 3%;*/ } + .popup_content{ + width: 70%; + } } @media (max-width: 687px){ /*.to_address_point_txt.find_route {*/ diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index ee1ba62..2a59978 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -3008,6 +3008,8 @@ a.open_inf_carrier{ display: none; } + + .cookie_block.show{ display: block; } @@ -3034,4 +3036,64 @@ a.open_inf_carrier{ height: 25px; width: 95px; cursor: pointer; +} + +/*popup*/ +.popup_wrapper{ + display: none; + position: fixed; /* Используйте fixed, чтобы попап оставался на месте при прокрутке */ + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный фон */ + justify-content: center; + align-items: center; + z-index: 9999; +} + +.popup_wrapper.show{ + display: flex; +} +.popup_content{ + position: relative; + width: 38%; + height: fit-content; + background: #FFFFFF; + border-radius: 15px; + text-align: center; + padding: 28px; + font-family: Inter; + +} +.popup_cross{ + position: absolute; + right: 5%; + cursor: pointer; +} +.popup_img>img{ + background: #E1E1E1; + border-radius: 39px; + padding: 5px; +} +.popup_title{ + font-weight: 700; + font-size: 34px; + margin-top: 20px; +} +.popup_text{ + line-height: 30px; + font-size: 20px; + margin-top: 10px; + color: #6F6C90; +} +.popup_content>.confirm_profile_btn{ + width: 62%; +} +#poup_text_bold{ + font-weight: 700; + color: #1d1e20; +} +#authenticated_img{ + display: none; } \ No newline at end of file diff --git a/static/img/svg/close_gift.svg b/static/img/svg/close_gift.svg new file mode 100644 index 0000000..c81bf58 --- /dev/null +++ b/static/img/svg/close_gift.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/static/img/svg/cross_popup.svg b/static/img/svg/cross_popup.svg new file mode 100644 index 0000000..3c5c75e --- /dev/null +++ b/static/img/svg/cross_popup.svg @@ -0,0 +1,4 @@ + + + + diff --git a/static/img/svg/open_gift.svg b/static/img/svg/open_gift.svg new file mode 100644 index 0000000..7de7413 --- /dev/null +++ b/static/img/svg/open_gift.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/static/js/authorization.js b/static/js/authorization.js index 723adb1..e6cca7a 100644 --- a/static/js/authorization.js +++ b/static/js/authorization.js @@ -20,6 +20,7 @@ function SendLoginForm(el){ data: formData, success: function(data){ + location.href = data.redirect_url//`/profile/page/dashboard/` window.sessionStorage.removeItem('mailingSubscribeRequired') window.sessionStorage.removeItem('email') @@ -29,6 +30,8 @@ function SendLoginForm(el){ + + }, error: function (data, exception){ document.querySelector(".login").innerHTML = data.responseJSON.html diff --git a/static/js/global_js.js b/static/js/global_js.js index c0f251e..9d084c5 100644 --- a/static/js/global_js.js +++ b/static/js/global_js.js @@ -227,6 +227,14 @@ function checkStateCookie () { if (!window.document.cookie.includes("allow_cookie=true")){ document.querySelector(".cookie_block").classList.add("show") } + if (!window.document.cookie.includes("popup_show=false")){ + setTimeout(() => { + document.querySelector('.popup_wrapper').classList.add('show'); + }, 15000); + } + if(!window.document.cookie.includes("first_authorization=true") && window.document.getElementById('authenticated_img')){ + document.querySelector(".popup_wrapper").classList.add("show") + } if (window.document.cookie.includes("twb_new_messages=true")){ if (getInfoAboutUser('screen_width') < 800) { let marker_new_messages = document.querySelector(".marker_messages_mobile"); @@ -258,12 +266,22 @@ function getCsrfCookie () { return csrf } -function setCokie (days,name,val) { +function setCokie (days,name,val, url = null) { let date = new Date(); // let days = 182; date.setTime(+ date + (days * 86400000)); window.document.cookie = `${name}=${val}` + "; expires=" + date.toGMTString() + "; path=/"; - document.querySelector(".cookie_block").classList.remove("show") + + if(name === 'allow_cookie' ){ + document.querySelector(".cookie_block").classList.remove("show") + } else if(name === 'popup_show'){ + document.querySelector(".popup_wrapper").classList.remove("show") + if(url){ + window.location.href = url} + } else if (name === 'first_authorization'){ + document.querySelector(".popup_wrapper").classList.remove("show") + } + // return value; } diff --git a/static/js/range_calendar.js b/static/js/range_calendar.js index 6dd4a66..4e1612c 100644 --- a/static/js/range_calendar.js +++ b/static/js/range_calendar.js @@ -143,108 +143,75 @@ function init_arrival_DT (date=null,single=true,hour=true){ } +function init_departure_DT() { + let place_1 = document.querySelector("#id_departure_DT"); + if (!place_1) return; -function init_departure_DT (){ + let hiddenTime = document.querySelector('.local_city_time').innerText; - let place_1 = document.querySelector("#id_departure_DT") - let onl_param = "" - if (window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_mover/" || window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_customer/"){ - onl_param = "singleDatePicker" - } - if (place_1) { + let startDate = null; + if(hiddenTime){ + if (window.location.href.includes("/ru/")) { - $(place_1).daterangepicker({ - "autoapply": true, - "linkedCalendars": false, - "singleDatePicker":true, - "timePicker":true, - "timePicker24Hour":true, - "locale": changeLangForDateTimePicker(), - }, - function(start, end, label) { - // $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD')); - // $('#regervation')[0].dataset['departure_DT'] = start.format('YYYY-MM-DD'); - // $('#regervation')[0].dataset['arrival_DT'] = end.format('YYYY-MM-DD'); - $('#id_departure_DT').val(start.format('DD.MM.YYYY HH:mm')) + startDate = moment(hiddenTime, "D MMMM YYYY г. HH:mm", 'ru'); + } else { - }); - - $(`${place_1.id} .drp-calendar.right`).hide(); - $(`${place_1.id} .drp-calendar.left`).addClass('single'); - - $(`${place_1.id} .calendar-table`).on('DOMSubtreeModified', function() { - var el = $(`${place_1.id} .prev.available`).parent().children().last(); - if (el.hasClass('next available')) { - return; - } - el.addClass('next available'); - el.append(''); - }); + startDate = moment(hiddenTime, "MMMM D, YYYY, h:mm a", 'en'); + } + } else { + startDate = moment() } + + + + + $(place_1).daterangepicker({ + "autoapply": true, + "linkedCalendars": false, + "singleDatePicker": true, + "timePicker": true, + "timePicker24Hour": true, + "minDate": startDate, + "locale": changeLangForDateTimePicker(), + }, function (start, end, label) { + $('#id_departure_DT').val(start.format('DD.MM.YYYY HH:mm')); + }); + + $(`${place_1.id} .drp-calendar.right`).hide(); + $(`${place_1.id} .drp-calendar.left`).addClass('single'); + + $(`${place_1.id} .calendar-table`).on('DOMSubtreeModified', function () { + var el = $(`${place_1.id} .prev.available`).parent().children().last(); + if (el.hasClass('next available')) { + return; + } + el.addClass('next available'); + el.append(''); + }); } $(function () { - let onl_param = "" - if (window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_mover/" || window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_customer/"){ - onl_param = "singleDatePicker: true" - } - let place_1 = document.querySelector("#id_arrival_DT") - if (place_1) { - $(place_1).daterangepicker({ - "autoapply": true, - "linkedCalendars": false, - "locale": changeLangForDateTimePicker(), - - }, - function (start, end, label) { - - // $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD')); - $('#id_arrival_DT').val(start.format('DD.MM.YYYY') + " - " + end.format('DD.MM.YYYY')) - }); - - $(`${place_1.id} .drp-calendar.right`).hide(); - $(`${place_1.id} .drp-calendar.left`).addClass('single'); - - $(`${place_1.id} .calendar-table`).on('DOMSubtreeModified', function () { - var el = $(`${place_1.id} .prev.available`).parent().children().last(); - if (el.hasClass('next available')) { - return; - } - el.addClass('next available'); - el.append(''); - }); - } - }); - -$(function() { - let place_1 = document.querySelector("#id_departure_DT") - let onl_param = "" - if (window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_mover/" || window.location.href === "http://localhost:8016/ru/profile/page/create_route_for_customer/"){ - onl_param = "singleDatePicker: true" + let onl_param = {}; + if (window.location.href.includes("/ru/profile/page/create_route_for_mover/") || window.location.href.includes("/ru/profile/page/create_route_for_customer/")) { + onl_param = { singleDatePicker: true }; } + + let place_1 = document.querySelector("#id_arrival_DT"); if (place_1) { $(place_1).daterangepicker({ "autoapply": true, "linkedCalendars": false, "locale": changeLangForDateTimePicker(), - onl_param - }, - function(start, end, label) { - // $('#displayRegervation').text('Registration date is: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD')); - // $('#regervation')[0].dataset['departure_DT'] = start.format('YYYY-MM-DD'); - // $('#regervation')[0].dataset['arrival_DT'] = end.format('YYYY-MM-DD'); - $('#id_departure_DT').val(start.format('DD.MM.YYYY') + " - " + end.format('DD.MM.YYYY')) - // init_arrival_DT(start.format('DD.MM.YYYY'),false,false) - $('#id_arrival_DT').val('') - init_arrival_DT(start.format('DD.MM.YYYY'),false,false) - + ...onl_param + }, function (start, end, label) { + $('#id_arrival_DT').val(start.format('DD.MM.YYYY') + " - " + end.format('DD.MM.YYYY')); }); $(`${place_1.id} .drp-calendar.right`).hide(); $(`${place_1.id} .drp-calendar.left`).addClass('single'); - $(`${place_1.id} .calendar-table`).on('DOMSubtreeModified', function() { + $(`${place_1.id} .calendar-table`).on('DOMSubtreeModified', function () { var el = $(`${place_1.id} .prev.available`).parent().children().last(); if (el.hasClass('next available')) { return; @@ -253,4 +220,37 @@ $(function() { el.append(''); }); } -}); \ No newline at end of file +}); + +$(function() { + let place_1 = document.querySelector("#id_departure_DT"); + let onl_param = {}; + if (window.location.href.includes("/ru/profile/page/create_route_for_mover/") || window.location.href.includes("/ru/profile/page/create_route_for_customer/")) { + onl_param = { singleDatePicker: true }; + } + + if (place_1) { + $(place_1).daterangepicker({ + "autoapply": true, + "linkedCalendars": false, + "locale": changeLangForDateTimePicker(), + ...onl_param + }, function (start, end, label) { + $('#id_departure_DT').val(start.format('DD.MM.YYYY') + " - " + end.format('DD.MM.YYYY')); + $('#id_arrival_DT').val(''); + init_arrival_DT(start.format('DD.MM.YYYY'), false, false); + }); + + $(`${place_1.id} .drp-calendar.right`).hide(); + $(`${place_1.id} .drp-calendar.left`).addClass('single'); + + $(`${place_1.id} .calendar-table`).on('DOMSubtreeModified', function () { + var el = $(`${place_1.id} .prev.available`).parent().children().last(); + if (el.hasClass('next available')) { + return; + } + el.addClass('next available'); + el.append(''); + }); + } +}); diff --git a/static/js/user_profile.js b/static/js/user_profile.js index f0101cd..f926260 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -346,13 +346,27 @@ function searchTown(el){ -function selectItemAddrPoint(id, name, ctrl_name,){ +function selectItemAddrPoint(id, name, ctrl_name, city_DT){ let input_list = document.getElementsByName(ctrl_name + '_list')[0]; let tap_txt_cont = document.querySelector("#id_" + ctrl_name); + let local_city_time = document.querySelector(".local_city_time"); + + if(ctrl_name === "from_address_point_txt" && local_city_time){ + local_city_time.innerHTML = city_DT; + } + + tap_txt_cont.value = name; tap_txt_cont.setAttribute('title',name) let tap_cont = document.querySelector("#id_" + ctrl_name.slice(0, -4)); tap_cont.value = id; + + if (local_city_time){ + init_departure_DT() + init_arrival_DT() + } + + if (tap_txt_cont.classList.contains('red_text')){ tap_txt_cont.classList.remove('red_text') } @@ -541,12 +555,16 @@ function sendRoute(el, routeID = null){ // if (selected_owner_type[0].classList.contains('selected')){ // // }else{} - let owner_type_value = document.getElementById('hide_owner_type').value + + let hiddenTime = document.querySelector('.local_city_time').innerText; + + let owner_type_value = document.getElementById('hide_owner_type').value let form = el.form let formData = new FormData(form); let owner_type = owner_type_value formData.set('owner_type', owner_type) + formData.set('hiddenTime', hiddenTime) let url = '/routes/create_or_change_route/' if (routeID !== null){ @@ -805,8 +823,8 @@ function OnSelectionChange(el) { // } sliderInit(); - init_arrival_DT() - init_departure_DT() + // init_arrival_DT() + // init_departure_DT() diff --git a/templates/blocks/profile/b_my_routes.html b/templates/blocks/profile/b_my_routes.html index 459d9cf..f0637e9 100644 --- a/templates/blocks/profile/b_my_routes.html +++ b/templates/blocks/profile/b_my_routes.html @@ -1,3 +1,15 @@ -
+{% load static %} +{% load i18n %} + +
{% include 'blocks/routes/b_my_routes_list.html' %} -
\ No newline at end of file +
+ +{% if last_block == False and next_page_els_count %} +
+ +
+ +
+
+{% endif %} \ No newline at end of file diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index b634a1e..01ad618 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -74,92 +74,9 @@ {% if form.initial and form.initial.type_transport and form.initial.type_transport != '' %}
-
-
- - - -{# #} - {# boris change input #} - -
- - {% if not errors_off and form.errors and form.errors.departure_DT %} - {{ form.errors.departure_DT }} - {% endif %} - -
-
- -{# #} - {# boris change input #} - - -
- {# end #} - {% if not errors_off and form.errors and form.errors.arrival_DT %} - {{ form.errors.arrival_DT }} - {% endif %} -
-
-
-
-
+
+
+
+
+
+ + + +{# #} + {# boris change input #} + +
+ + {% if not errors_off and form.errors and form.errors.departure_DT %} + {{ form.errors.departure_DT }} + {% endif %} + +
+
+ +{# #} + {# boris change input #} + + +
+ {# end #} + {% if not errors_off and form.errors and form.errors.arrival_DT %} + {{ form.errors.arrival_DT }} + {% endif %} +
+
+
{#
#} {# #} diff --git a/templates/inter/meta_OpenGraph.html b/templates/inter/meta_OpenGraph.html new file mode 100644 index 0000000..d1aedc5 --- /dev/null +++ b/templates/inter/meta_OpenGraph.html @@ -0,0 +1,42 @@ + +{% if page.url == 'main' %} + + + +{% endif %} + + + + + +{% if page.url == 'about_service' and page.url == 'ru' %} + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'about_service' and page.url == 'en' %} + + + + + + + + + + + + + + +{% endif %} \ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index fa640b4..28047f3 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -153,7 +153,7 @@ src="https://www.facebook.com/tr?id=370775942506737&ev=PageView&noscript=1" init_ws() const beep = new Audio('/static/sounds/beep_2.mp3') - + {% endif %} diff --git a/templates/widgets/routes/w_my_route.html b/templates/widgets/routes/w_my_route.html index c7a90d9..d121ffb 100644 --- a/templates/widgets/routes/w_my_route.html +++ b/templates/widgets/routes/w_my_route.html @@ -2,7 +2,17 @@ {% load i18n %} -
+{% if route.departure_DT %} + {% with current_datetime=route.from_city.get_current_datetime %} + {% with departure_datetime=route.departure_DT %} + {% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %} +
+ {% else %} +
+ {% endif %} + {% endwith %} + {% endwith %} +{% endif %} {#
#}
{#
#} diff --git a/templates/widgets/w_ac_input_address_point.html b/templates/widgets/w_ac_input_address_point.html index ec64cfe..859cd04 100644 --- a/templates/widgets/w_ac_input_address_point.html +++ b/templates/widgets/w_ac_input_address_point.html @@ -1,4 +1,4 @@ -
+
{% if airport_fullname %}
{{ airport_fullname|safe }}
{% endif %}
{{ city_name }} / {{ country_name }}
\ No newline at end of file diff --git a/templates/widgets/w_carrier_card.html b/templates/widgets/w_carrier_card.html index f76d575..9e66988 100644 --- a/templates/widgets/w_carrier_card.html +++ b/templates/widgets/w_carrier_card.html @@ -2,17 +2,21 @@ {% load i18n %} {% load subscribes_tags_extra %} -{% if route.departure_DT %} - {% now 'Y-m-d H:i:s' as current_date %} - {% with departure_date_string=route.departure_DT|date:"Y-m-d H:i:s" %} - {% if departure_date_string < current_date %} -
- {% else %} -
- {% endif %} - {% endwith %} +{#Current Datetime: {{ route.from_city.get_current_datetime }}
#} +{#Departure DT:{{ route.departure_DT }}
#} +{% if route.departure_DT %} + {% with current_datetime=route.from_city.get_current_datetime %} + {% with departure_datetime=route.departure_DT %} + {% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %} +
+ {% else %} +
+ {% endif %} + {% endwith %} + {% endwith %} {% endif %} +
{% if route.owner_type == 'mover' %}
@@ -144,7 +148,7 @@
-