1.1.1 autosubscribe to null price subscribe
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from django.template.loader import render_to_string
|
||||
from SubscribesApp.funcs import check_option_in_cur_user_subscribe
|
||||
|
||||
|
||||
def get_user_timezone_Dict(user, request=None):
|
||||
@@ -30,10 +31,12 @@ def get_profile_page_content_html(request, page_name, data):
|
||||
if page_name == 'chat':
|
||||
from ChatServiceApp.funcs import get_chat_page_content_html
|
||||
return get_chat_page_content_html(request, data)
|
||||
elif page_name == 'create_route_for_customer':
|
||||
elif (page_name == 'create_route_for_customer' and
|
||||
check_option_in_cur_user_subscribe(request.user, 'размещение заявок')):
|
||||
from RoutesApp.funcs import get_profile_new_route_page_html
|
||||
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' and
|
||||
check_option_in_cur_user_subscribe(request.user, 'размещение заявок')):
|
||||
from RoutesApp.funcs import get_profile_new_route_page_html
|
||||
return get_profile_new_route_page_html(request, {'owner_type': 'mover'})
|
||||
elif page_name == 'my_routes':
|
||||
|
||||
@@ -47,8 +47,12 @@ def profile_page_View(request, page_name, id=None):
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
page_html = get_profile_page_content_html(request, page_name, id)
|
||||
if not page_html:
|
||||
raise Http404
|
||||
|
||||
Dict = {
|
||||
'page_html': get_profile_page_content_html(request, page_name, id),
|
||||
'page_html': page_html,
|
||||
'page_name': page_name,
|
||||
'page_type': 'profile'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user