1.2.2 get_my_routes_ajax add remains_routes_count operations
This commit is contained in:
@@ -284,6 +284,11 @@ def get_my_routes_ajax(request):
|
||||
if 'errors' in routes_Dict:
|
||||
return JsonResponse(routes_Dict, status=400)
|
||||
|
||||
from SubscribesApp.funcs import get_cur_user_subscribe
|
||||
user_subscribe = get_cur_user_subscribe(request.user)
|
||||
if user_subscribe:
|
||||
routes_Dict.update(user_subscribe.remains_route_adding_options())
|
||||
|
||||
|
||||
html = render_to_string('blocks/profile/b_my_routes.html', routes_Dict, request=request)
|
||||
|
||||
@@ -291,10 +296,6 @@ def get_my_routes_ajax(request):
|
||||
'html': html
|
||||
}
|
||||
|
||||
from SubscribesApp.funcs import get_cur_user_subscribe
|
||||
user_subscribe = get_cur_user_subscribe(request.user)
|
||||
if user_subscribe:
|
||||
res_Dict.update(user_subscribe.remains_route_adding_options())
|
||||
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user