2026-10-06 10:32:20 +03:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
from django.conf import settings # NOQA
|
2026-10-06 13:10:20 +03:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
2026-10-06 10:32:20 +03:00
|
|
|
from appconf import AppConf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CmspluginFilerFolderAppConf(AppConf):
|
|
|
|
|
STYLE_CHOICES = (
|
|
|
|
|
("list", _("List")),
|
|
|
|
|
("slideshow", _("Slideshow"))
|
|
|
|
|
)
|
|
|
|
|
DEFAULT_STYLE = 'list'
|
|
|
|
|
|
|
|
|
|
def configure(self):
|
|
|
|
|
# set DEFAULT_STYLE to '' if it is not in STYLE_CHOICES
|
|
|
|
|
if not self.configured_data['DEFAULT_STYLE'] in [s for s, l in self.configured_data['STYLE_CHOICES']]:
|
|
|
|
|
self.configured_data['DEFAULT_STYLE'] = ''
|
|
|
|
|
return self.configured_data
|