# Path: aldryn_gallery/utils.py
# def get_additional_styles():
#     """
#     Get additional styles choices from settings
#     """
#     choices = []
#     raw = getattr(settings, 'GALLERY_STYLES', False)
#     if raw:
#         if isinstance(raw, basestring):
#             raw = raw.split(',')
#         for choice in raw:
#             clean = choice.strip()
#             choices.append((clean.lower(), clean.title()))
#     return choices


from functools import partial
from django.db import models
from django.utils.html import strip_tags
from django.utils.translation import ugettext_lazy as _
from cms.models.pluginmodel import CMSPlugin
from cms.models.fields import PageField
from djangocms_text_ckeditor.fields import HTMLField
from filer.fields.folder import FilerFolderField
from filer.fields.image import FilerImageField
from . import compat
from .utils import get_additional_styles
    timeout = models.IntegerField(_('Timeout'), default=5000, help_text=_("Set to 0 to disable autoplay"))
    duration = models.IntegerField(_('Duration'), default=300)
    shuffle = models.BooleanField(_('Shuffle slides'), default=False)

    def __unicode__(self):
        style = _('Style')
        engine = _('Engine')
        timeout = _('Timeout')
        duration = _('Duration')
        shuffle = _('Shuffle Slides')
        return u'%s: %s, %s: %s, %s: %i, %s: %i, %s: %s' % (
            style, self.style.title(), engine, self.engine.title(),
            timeout, self.timeout, duration, self.duration, shuffle, self.shuffle
        )


class SlidePlugin(CMSPlugin):
    LINK_TARGETS = (
        ('', _('same window')),
        ('_blank', _('new window')),
        ('_parent', _('parent window')),
        ('_top', _('topmost frame')),
    )

    cmsplugin_ptr = CMSPluginField()
    image = FilerImageField(verbose_name=_('image'), blank=True, null=True)
    content = HTMLField("Content", blank=True, null=True)
    url = models.URLField(_("Link"), blank=True, null=True)
    page_link = PageField(
        verbose_name=_('Page'),

# Path: aldryn_gallery/utils.py
# def get_additional_styles():
#     """
#     Get additional styles choices from settings
#     """
#     choices = []
#     raw = getattr(settings, 'GALLERY_STYLES', False)
#     if raw:
#         if isinstance(raw, basestring):
#             raw = raw.split(',')
#         for choice in raw:
#             clean = choice.strip()
#             choices.append((clean.lower(), clean.title()))
#     return choices


# Path: aldryn_gallery/models.py
from functools import partial
from django.db import models
from django.utils.html import strip_tags
from django.utils.translation import ugettext_lazy as _
from cms.models.pluginmodel import CMSPlugin
from cms.models.fields import PageField
from djangocms_text_ckeditor.fields import HTMLField
from filer.fields.folder import FilerFolderField
from filer.fields.image import FilerImageField
from . import compat
from .utils import get_additional_styles

    timeout = models.IntegerField(_('Timeout'), default=5000, help_text=_("Set to 0 to disable autoplay"))
    duration = models.IntegerField(_('Duration'), default=300)
    shuffle = models.BooleanField(_('Shuffle slides'), default=False)

    def __unicode__(self):
        style = _('Style')
        engine = _('Engine')
        timeout = _('Timeout')
        duration = _('Duration')
        shuffle = _('Shuffle Slides')
        return u'%s: %s, %s: %s, %s: %i, %s: %i, %s: %s' % (
            style, self.style.title(), engine, self.engine.title(),
            timeout, self.timeout, duration, self.duration, shuffle, self.shuffle
        )


class SlidePlugin(CMSPlugin):
    LINK_TARGETS = (
        ('', _('same window')),
        ('_blank', _('new window')),
        ('_parent', _('parent window')),
        ('_top', _('topmost frame')),
    )

    cmsplugin_ptr = CMSPluginField()
    image = FilerImageField(verbose_name=_('image'), blank=True, null=True)
    content = HTMLField("Content", blank=True, null=True)
    url = models.URLField(_("Link"), blank=True, null=True)
    page_link = PageField(
        verbose_name=_('Page'),

        blank=True,