0.8.37 owner_type initial
This commit is contained in:
@@ -18,10 +18,10 @@ def get_profile_page_content_html(request, page_name, data):
|
|||||||
return get_chat_page_content_html(request, data)
|
return get_chat_page_content_html(request, data)
|
||||||
elif page_name == 'create_route_for_customer':
|
elif page_name == 'create_route_for_customer':
|
||||||
from RoutesApp.funcs import get_profile_new_route_page_html
|
from RoutesApp.funcs import get_profile_new_route_page_html
|
||||||
return get_profile_new_route_page_html(request, {})
|
return get_profile_new_route_page_html(request, {'owner_type': 'customer'})
|
||||||
elif page_name == 'create_route_for_mover':
|
elif page_name == 'create_route_for_mover':
|
||||||
from RoutesApp.funcs import get_profile_new_route_page_html
|
from RoutesApp.funcs import get_profile_new_route_page_html
|
||||||
return get_profile_new_route_page_html(request, {})
|
return get_profile_new_route_page_html(request, {'owner_type': 'mover'})
|
||||||
elif page_name == 'my_routes':
|
elif page_name == 'my_routes':
|
||||||
from RoutesApp.funcs import get_profile_my_routes_page_content_html
|
from RoutesApp.funcs import get_profile_my_routes_page_content_html
|
||||||
return get_profile_my_routes_page_content_html(request)
|
return get_profile_my_routes_page_content_html(request)
|
||||||
|
|||||||
@@ -75,11 +75,17 @@ def get_profile_new_route_page_html(request, data):
|
|||||||
# if not form.is_valid():
|
# if not form.is_valid():
|
||||||
# pass
|
# pass
|
||||||
|
|
||||||
|
if 'owner_type' in data:
|
||||||
|
form.initial['owner_type'] = data['owner_type']
|
||||||
|
|
||||||
Dict = {
|
Dict = {
|
||||||
'form': form,
|
'form': form,
|
||||||
'errors_off': errors_off
|
'errors_off': errors_off
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if 'owner_type' in data:
|
||||||
|
Dict.update({'owner_type': data['owner_type']})
|
||||||
|
|
||||||
# print(form)
|
# print(form)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# form.errors.append({'__all__': f'Ошибка: {str(e)}'})
|
# form.errors.append({'__all__': f'Ошибка: {str(e)}'})
|
||||||
|
|||||||
Reference in New Issue
Block a user