You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
526 B
14 lines
526 B
from management.models import ModalPlace
|
|
|
|
|
|
def get_modals(request):
|
|
# Получение списка модальных окон для отображения
|
|
# Проверка авторизации, проверка информации в сессии об окне
|
|
# Получение списка окон
|
|
result = {}
|
|
if request.user.is_authenticated():
|
|
for place in ModalPlace.objects.filter(public=True):
|
|
result[place.key] = place.get_modals(request.user)
|
|
|
|
return result
|
|
|
|
|