1.1.1 autosubscribe to null price subscribe
This commit is contained in:
@@ -16,13 +16,16 @@ from django.urls import reverse
|
||||
from .forms import *
|
||||
from .funcs import *
|
||||
from GeneralApp.funcs import get_and_set_lang
|
||||
|
||||
from SubscribesApp.funcs import check_option_in_cur_user_subscribe
|
||||
|
||||
|
||||
def del_route_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
if not check_option_in_cur_user_subscribe(request.user, 'размещение заявок'):
|
||||
return JsonResponse({'html': 'нет доступа'}, status=403)
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
@@ -58,6 +61,9 @@ def edit_route_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
if not check_option_in_cur_user_subscribe(request.user, 'размещение заявок'):
|
||||
return JsonResponse({'html': 'нет доступа'}, status=403)
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
data = json.loads(request.body)
|
||||
@@ -108,6 +114,8 @@ def edit_route_ajax(request):
|
||||
def new_route_view_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
if not check_option_in_cur_user_subscribe(request.user, 'размещение заявок'):
|
||||
return JsonResponse({'html': 'нет доступа'}, status=403)
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
@@ -222,6 +230,9 @@ def create_or_change_route_ajax(request, route_id=None):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
if not check_option_in_cur_user_subscribe(request.user, 'размещение заявок'):
|
||||
return JsonResponse({'html': 'нет доступа'}, status=403)
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
Dict = {}
|
||||
|
||||
Reference in New Issue
Block a user