Example #1
0
def set_defaults(config):
    config.setdefault('plugins_with_extra_mixins', {})
    config.setdefault('plugins_with_extra_render_templates', {})
    config['plugins_with_extra_mixins'].setdefault('ShopReorderButtonPlugin', BootstrapUtilities(
        BootstrapUtilities.margins, BootstrapUtilities.floats,
    ))
    config['plugins_with_extra_mixins'].setdefault('ShopCancelOrderButtonPlugin', BootstrapUtilities(
        BootstrapUtilities.margins, BootstrapUtilities.floats,
    ))
    config['plugins_with_extra_mixins'].setdefault('ProcessNextStepPlugin', BootstrapUtilities(
        BootstrapUtilities.margins, BootstrapUtilities.floats,
    ))
    config['plugins_with_extra_mixins'].setdefault('ShopProceedButton', BootstrapUtilities(
        BootstrapUtilities.margins, BootstrapUtilities.floats,
    ))
    config['plugins_with_extra_mixins'].setdefault('ShopLeftExtension', BootstrapUtilities(
        BootstrapUtilities.paddings,
    ))
    config['plugins_with_extra_mixins'].setdefault('ShopRightExtension', BootstrapUtilities(
        BootstrapUtilities.paddings,
    ))
    config['plugins_with_extra_mixins'].setdefault('ShopAddToCartPlugin', BootstrapUtilities(
        BootstrapUtilities.margins,
    ))
    config['plugins_with_extra_mixins'].setdefault('BootstrapButtonPlugin', BootstrapUtilities(
        BootstrapUtilities.floats,
    ))
    config['plugins_with_extra_render_templates'].setdefault('BootstrapButtonPlugin', [
        ('shop/button.html', _("Responsive Feedback")),
        ('cascade/bootstrap4/button.html', _("Default")),
    ])
def set_defaults(config):
    config.setdefault('bootstrap4', {})
    config['bootstrap4'].setdefault('default_bounds', {
        Breakpoint.xs: Bound(320, 572),
        Breakpoint.sm: Bound(540, 540),
        Breakpoint.md: Bound(720, 720),
        Breakpoint.lg: Bound(960, 960),
        Breakpoint.xl: Bound(1140, 1140),
    })
    config['bootstrap4'].setdefault('fluid_bounds', {
        Breakpoint.xs: Bound(320, 576),
        Breakpoint.sm: Bound(576, 768),
        Breakpoint.md: Bound(768, 992),
        Breakpoint.lg: Bound(992, 1200),
        Breakpoint.xl: Bound(1200, 1980),
    })
    config['bootstrap4'].setdefault('gutter', 30)

    config['plugins_with_extra_mixins'].setdefault('BootstrapAccordionPlugin', BootstrapUtilities(
        BootstrapUtilities.margins,
    ))
    config['plugins_with_extra_mixins'].setdefault('BootstrapAccordionGroupPlugin', BootstrapUtilities(
        BootstrapUtilities.background_and_color,
        BootstrapUtilities.margins,
    ))
    config['plugins_with_extra_mixins'].setdefault('BootstrapCardPlugin', BootstrapUtilities(
        BootstrapUtilities.background_and_color,
        BootstrapUtilities.margins,
    ))
    config['plugins_with_extra_mixins'].setdefault('BootstrapCarouselPlugin', BootstrapUtilities(
        BootstrapUtilities.margins,
    ))
    config['plugins_with_extra_mixins'].setdefault('BootstrapContainerPlugin', BootstrapUtilities(
        BootstrapUtilities.paddings,
    ))
    config['plugins_with_extra_mixins'].setdefault('HeadingPlugin', BootstrapUtilities(
        BootstrapUtilities.margins,
    ))

    config['plugins_with_extra_fields'].setdefault('BootstrapJumbotronPlugin', PluginExtraFieldsConfig(
        inline_styles={
            'extra_fields:Paddings': ['margin-top', 'margin-bottom', 'padding-top', 'padding-bottom'],
            'extra_units:Paddings': 'px,rem'
        }
    ))

    config['plugins_with_extra_render_templates'].setdefault('BootstrapSecondaryMenuPlugin', [
        ('cascade/bootstrap4/secmenu-list-group.html', _("List Group")),
        ('cascade/bootstrap4/secmenu-unstyled-list.html', _("Unstyled List"))
    ])
Example #3
0
def set_defaults(config):
    config.setdefault('bootstrap4', {})
    config['bootstrap4'].setdefault(
        'default_bounds',
        OrderedDict([
            (Breakpoint.xs, Bound(320, 572)),
            (Breakpoint.sm, Bound(540, 540)),
            (Breakpoint.md, Bound(720, 720)),
            (Breakpoint.lg, Bound(960, 960)),
            (Breakpoint.xl, Bound(1140, 1140)),
        ]))
    config['bootstrap4'].setdefault(
        'fluid_bounds',
        OrderedDict([
            (Breakpoint.xs, Bound(320, 576)),
            (Breakpoint.sm, Bound(576, 768)),
            (Breakpoint.md, Bound(768, 992)),
            (Breakpoint.lg, Bound(992, 1200)),
            (Breakpoint.xl, Bound(1200, 1980)),
        ]))
    config['bootstrap4'].setdefault('gutter', 30)

    config['plugins_with_extra_mixins'].setdefault(
        'BootstrapAccordionPlugin',
        BootstrapUtilities(BootstrapUtilities.margins, ))
    config['plugins_with_extra_mixins'].setdefault(
        'BootstrapAccordionGroupPlugin',
        BootstrapUtilities(
            BootstrapUtilities.background_and_color,
            BootstrapUtilities.margins,
        ))
    config['plugins_with_extra_mixins'].setdefault(
        'BootstrapCardPlugin',
        BootstrapUtilities(
            BootstrapUtilities.background_and_color,
            BootstrapUtilities.margins,
        ))
    config['plugins_with_extra_mixins'].setdefault(
        'BootstrapCarouselPlugin',
        BootstrapUtilities(BootstrapUtilities.margins, ))
    config['plugins_with_extra_mixins'].setdefault(
        'BootstrapContainerPlugin',
        BootstrapUtilities(BootstrapUtilities.paddings, ))
    config['plugins_with_extra_mixins'].setdefault(
        'HeadingPlugin', BootstrapUtilities(BootstrapUtilities.margins, ))
    config['plugins_with_extra_mixins'].setdefault(
        'HorizontalRulePlugin',
        BootstrapUtilities(BootstrapUtilities.margins, ))

    config['plugins_with_extra_fields'].setdefault(
        'BootstrapTabSetPlugin',
        PluginExtraFieldsConfig(css_classes={
            'multiple':
            True,
            'class_names':
            ['nav-tabs', 'nav-pills', 'nav-fill', 'nav-justified'],
        }, ))

    config['plugins_with_extra_render_templates'].setdefault(
        'BootstrapSecondaryMenuPlugin',
        [('cascade/bootstrap4/secmenu-list-group.html', _("List Group")),
         ('cascade/bootstrap4/secmenu-unstyled-list.html', _("Unstyled List"))
         ])
 'bootstrap4': {
     'template_basedir': 'angular-ui',
 },
 'plugins_with_extra_render_templates': {
     'CustomSnippetPlugin': [
         ('shop/catalog/product-heading.html', _("Product Heading")),
         ('{{ cookiecutter.app_name }}/catalog/manufacturer-filter.html', _("Manufacturer Filter")),
     ],
 },
 'plugins_with_sharables': {
     'BootstrapImagePlugin': ['image_shapes', 'image_width_responsive', 'image_width_fixed',
                              'image_height', 'resize_options'],
     'BootstrapPicturePlugin': ['image_shapes', 'responsive_heights', 'image_size', 'resize_options'],
 },
 'plugins_with_extra_mixins': {
     'BootstrapContainerPlugin': BootstrapUtilities(BootstrapUtilities.background_and_color),
     'BootstrapRowPlugin': BootstrapUtilities(BootstrapUtilities.margins),
     'BootstrapRowPlugin': BootstrapUtilities(BootstrapUtilities.margins),
     'ShopLeftExtension': BootstrapUtilities(BootstrapUtilities.paddings),
     'ShopRightExtension': BootstrapUtilities(BootstrapUtilities.paddings),
 },
 'leaflet': {
     'tilesURL': 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
     'accessToken': 'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw',
     'apiKey': 'AIzaSyD71sHrtkZMnLqTbgRmY_NsO0A9l9BQmv4',
 },
 'bookmark_prefix': '/',
 'segmentation_mixins': [
     ('shop.cascade.segmentation.EmulateCustomerModelMixin', 'shop.cascade.segmentation.EmulateCustomerAdminMixin'),
 ],
 'allow_plugin_hiding': True,
Example #5
0
     ],
 },
 'plugins_with_sharables': {
     'BootstrapImagePlugin': ['image_shapes', 'image_width_responsive', 'image_width_fixed',
                              'image_height', 'resize_options'],
     'BootstrapPicturePlugin': ['image_shapes', 'responsive_heights', 'responsive_zoom', 'resize_options'],
 },
 'plugins_with_extra_fields': {
     'BootstrapCardPlugin': PluginExtraFieldsConfig(),
     'BootstrapCardHeaderPlugin': PluginExtraFieldsConfig(),
     'BootstrapCardBodyPlugin': PluginExtraFieldsConfig(),
     'BootstrapCardFooterPlugin': PluginExtraFieldsConfig(),
     'SimpleIconPlugin': PluginExtraFieldsConfig(),
 },
 'plugins_with_extra_mixins': {
     'BootstrapContainerPlugin': BootstrapUtilities(),
     'BootstrapRowPlugin': BootstrapUtilities(BootstrapUtilities.paddings),
     'BootstrapYoutubePlugin': BootstrapUtilities(BootstrapUtilities.margins),
     'BootstrapButtonPlugin': BootstrapUtilities(BootstrapUtilities.floats),
 },
 'leaflet': {
     'tilesURL': 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
     'accessToken': 'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw',
     'apiKey': 'AIzaSyD71sHrtkZMnLqTbgRmY_NsO0A9l9BQmv4',
 },
 'bookmark_prefix': '/',
 'segmentation_mixins': [
     ('shop.cascade.segmentation.EmulateCustomerModelMixin',
      'shop.cascade.segmentation.EmulateCustomerAdminMixin'),
 ],
 'allow_plugin_hiding': True,
Example #6
0
         (None, _("Default")),
         ('myshop/catalog/commodity-add2cart.html',
          _("Add Commodity to Cart")),
     ],
 },
 'plugins_with_sharables': {
     'BootstrapImagePlugin': [
         'image_shapes', 'image_width_responsive', 'image_width_fixed',
         'image_height', 'resize_options'
     ],
     'BootstrapPicturePlugin':
     ['image_shapes', 'responsive_heights', 'image_size', 'resize_options'],
 },
 'plugins_with_extra_mixins': {
     'BootstrapContainerPlugin':
     BootstrapUtilities(BootstrapUtilities.background_and_color),
     'BootstrapRowPlugin':
     BootstrapUtilities(BootstrapUtilities.paddings),
     'ShopLeftExtension':
     BootstrapUtilities(BootstrapUtilities.paddings),
     'ShopRightExtension':
     BootstrapUtilities(BootstrapUtilities.paddings),
     'ShopAddToCartPlugin':
     BootstrapUtilities(BootstrapUtilities.margins),
 },
 'leaflet': {
     'tilesURL':
     'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
     'accessToken':
     'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw',
     'apiKey': 'AIzaSyD71sHrtkZMnLqTbgRmY_NsO0A9l9BQmv4',
    'cmsplugin_cascade.leaflet',
    'cmsplugin_cascade.link',
]

CMSPLUGIN_CASCADE = {
    'alien_plugins': ['TextPlugin', 'TextLinkPlugin'],
    'bootstrap4': {
        'template_basedir': 'angular-ui',
    },
    'plugins_with_sharables': {
        'BootstrapImagePlugin': ['image_shapes', 'image_width_responsive', 'image_width_fixed',
                                 'image_height', 'resize_options'],
        'BootstrapPicturePlugin': ['image_shapes', 'responsive_heights', 'image_size', 'resize_options'],
    },
    'plugins_with_extra_mixins': {
        'SectionPlugin': BootstrapUtilities(BootstrapUtilities.background_and_color),
    },
    'bookmark_prefix': '/',
    'allow_plugin_hiding': True,
}

NODE_MODULES_URL = STATIC_URL + 'node_modules/'

SASS_PROCESSOR_INCLUDE_DIRS = [
    os.path.join(BASE_DIR, 'node_modules'),
]

SELECT2_CSS = 'node_modules/select2/dist/css/select2.min.css'
SELECT2_JS = 'node_modules/select2/dist/js/select2.js'

COMPRESS_CACHE_BACKEND = 'compressor'
Example #8
0
        ],
    },
    'plugins_with_sharables': {
        'BootstrapImagePlugin': ['image_shapes', 'image_width_responsive', 'image_width_fixed',
                                 'image_height', 'resize_options'],
        'BootstrapPicturePlugin': ['image_shapes', 'responsive_heights', 'image_size', 'resize_options'],
    },
    'plugins_with_extra_fields': {
        'BootstrapCardPlugin': PluginExtraFieldsConfig(),
        'BootstrapCardHeaderPlugin': PluginExtraFieldsConfig(),
        'BootstrapCardBodyPlugin': PluginExtraFieldsConfig(),
        'BootstrapCardFooterPlugin': PluginExtraFieldsConfig(),
        'SimpleIconPlugin': PluginExtraFieldsConfig(),
    },
    'plugins_with_extra_mixins': {
        'BootstrapContainerPlugin': BootstrapUtilities(BootstrapUtilities.background_and_color),
        'BootstrapRowPlugin': BootstrapUtilities(BootstrapUtilities.paddings),
        'BootstrapYoutubePlugin': BootstrapUtilities(BootstrapUtilities.margins),
        'BootstrapButtonPlugin': BootstrapUtilities(BootstrapUtilities.floats),
    },
    'leaflet': {
        'tilesURL': 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
        'accessToken': 'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw',
        'apiKey': 'AIzaSyD71sHrtkZMnLqTbgRmY_NsO0A9l9BQmv4',
    },
    'bookmark_prefix': '/',
    'segmentation_mixins': [
        ('shop.cascade.segmentation.EmulateCustomerModelMixin', 'shop.cascade.segmentation.EmulateCustomerAdminMixin'),
    ],
    'allow_plugin_hiding': True,
}