From aa492f6ca4062eacad0a8843f0d87d81502496ac Mon Sep 17 00:00:00 2001 From: SDE Date: Thu, 30 Nov 2023 14:24:50 +0300 Subject: [PATCH] 0.8.6 fix find routes --- AuthApp/js_views.py | 2 +- GeneralApp/admin.py | 2 +- RoutesApp/js_views.py | 6 ++++-- templates/blocks/static_pages_blocks/b_mover_search.html | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index 8e96dcd..8d77ece 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -50,7 +50,7 @@ def request_offer_ajax(request): request_type = _('запрос на рекламу') if request_type: - request_type_str = f'Тип запроса: {request_type}
' + request_type_str = f'{_("Тип запроса")}: {request_type}
' else: request_type_str = '' diff --git a/GeneralApp/admin.py b/GeneralApp/admin.py index 803ab44..fba6770 100644 --- a/GeneralApp/admin.py +++ b/GeneralApp/admin.py @@ -15,7 +15,7 @@ class Admin_StaticPage(Admin_Trans_BaseModelViewPage): 'order', ) }), - ('Настройки', { + (_('Настройки'), { 'classes': ['wide', 'collapse'], 'fields': ( 'FAQ_title', diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index 0bf3520..8cf7ffb 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -143,8 +143,10 @@ def find_routes_ajax(request): if 'errors' in routes_Dict: return JsonResponse(routes_Dict, status=400) - - html = render_to_string('blocks/b_search_routes.html', routes_Dict, request=request) + if routes_Dict['routes']: + html = render_to_string('blocks/b_search_routes.html', routes_Dict, request=request) + else: + html = render_to_string('templates_js_translate/not_found_find_routes.html', routes_Dict, request=request) res_Dict = { 'html': html, diff --git a/templates/blocks/static_pages_blocks/b_mover_search.html b/templates/blocks/static_pages_blocks/b_mover_search.html index 3bea887..e569def 100644 --- a/templates/blocks/static_pages_blocks/b_mover_search.html +++ b/templates/blocks/static_pages_blocks/b_mover_search.html @@ -150,7 +150,7 @@
- Опции: + {% trans "Опции" %}: