connect form on static_pages
This commit is contained in:
SDE
2023-09-03 14:39:45 +03:00
parent d81688eb59
commit be6313d2d0
2 changed files with 17 additions and 3 deletions

View File

@@ -64,8 +64,16 @@ def StaticPageView(request, url):
if url == '':
return MainPage(request)
elif url in ('for_movers', 'for_customers'):
Dict.update({'route_form': RouteForm(),})
elif url == 'for_movers':
Dict.update({
'route_form': RouteForm(),
'owner_type': 'customer'
})
elif url == 'for_customers':
Dict.update({
'route_form': RouteForm(),
'owner_type': 'mover'
})
# elif url == 'works':
# return WorksPage(request)
elif url in ['main']:

View File

@@ -21,7 +21,13 @@
{% block content %}
<div class="cut-width">
<div class="text-align-center">
<h1 class="title_page">Поиск перевозчика</h1>
<h1 class="title_page">
{% if owner_type == 'mover' %}
Поиск перевозчика
{% else %}
Поиск посылки
{% endif %}
</h1>
</div>
{% include "blocks/b_find_route_form.html" %}