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.
16 lines
542 B
16 lines
542 B
# coding=utf-8
|
|
|
|
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
|
|
|
|
|