1.3.6 add unanswered_msgs_count to all responses
This commit is contained in:
@@ -60,6 +60,8 @@ def highlight_route_ajax(request):
|
||||
}
|
||||
res_Dict.update(user_subscribe.remains_route_adding_options())
|
||||
|
||||
from GeneralApp.funcs import get_add_to_ajax_response_Dict
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
|
||||
@@ -96,6 +98,8 @@ def raise_route_ajax(request):
|
||||
res_Dict = {'status': 'ok'}
|
||||
res_Dict.update(user_subscribe.remains_route_adding_options())
|
||||
|
||||
from GeneralApp.funcs import get_add_to_ajax_response_Dict
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
|
||||
@@ -127,6 +131,8 @@ def del_route_ajax(request):
|
||||
'html': html
|
||||
}
|
||||
|
||||
from GeneralApp.funcs import get_add_to_ajax_response_Dict
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
except Exception as e:
|
||||
@@ -180,11 +186,13 @@ def edit_route_ajax(request):
|
||||
return JsonResponse({'errors': msg})
|
||||
|
||||
html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request)
|
||||
resDict = {
|
||||
res_Dict = {
|
||||
'html': html,
|
||||
'btn_title': _('Сохранить изменения')
|
||||
}
|
||||
return JsonResponse(resDict, status=200)
|
||||
from GeneralApp.funcs import get_add_to_ajax_response_Dict
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
|
||||
|
||||
@@ -223,7 +231,10 @@ def new_route_view_ajax(request):
|
||||
|
||||
|
||||
# html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request)
|
||||
return JsonResponse({'html': html}, status=200)
|
||||
res_Dict = {'html': html}
|
||||
from GeneralApp.funcs import get_add_to_ajax_response_Dict
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
|
||||
def find_routes_ajax(request):
|
||||
@@ -259,6 +270,8 @@ def find_routes_ajax(request):
|
||||
# 'form': RouteForm(initial=data)
|
||||
}
|
||||
|
||||
from GeneralApp.funcs import get_add_to_ajax_response_Dict
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
except Exception as e:
|
||||
@@ -296,7 +309,8 @@ def get_my_routes_ajax(request):
|
||||
'html': html
|
||||
}
|
||||
|
||||
|
||||
from GeneralApp.funcs import get_add_to_ajax_response_Dict
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
except Exception as e:
|
||||
@@ -381,6 +395,8 @@ def create_or_change_route_ajax(request, route_id=None):
|
||||
'route_id': route_id
|
||||
}
|
||||
|
||||
from GeneralApp.funcs import get_add_to_ajax_response_Dict
|
||||
res_Dict.update(get_add_to_ajax_response_Dict(request.user))
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user