How to use the kotti.fanstatic.NeededGroup function in Kotti

To help you get started, we’ve selected a few Kotti examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kotti / Kotti / kotti / fanstatic.py View on Github external
view_needed = NeededGroup([
    view_needed_css,
    view_needed_js,
    ])

edit_needed_css = NeededGroup([
    edit_css,
    jqueryui_bootstrap_theme,
    ])
edit_needed_js = NeededGroup([
    jquery,
    bootstrap_js,
    html5shiv,
    jquery_form,
    ])
edit_needed = NeededGroup([
    edit_needed_css,
    edit_needed_js,
    ])
github Kotti / Kotti / kotti / fanstatic.py View on Github external
elif isinstance(resource, (Resource, Group)):
            self.resources.append(resource)
        else:
            raise ValueError(
                "resource must be a NeededGroup,"
                "fanstatic.Resource or fanstatic.Group object")

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()

view_needed_css = NeededGroup([
    view_css,
    ])
view_needed_js = NeededGroup([
    jquery,
    bootstrap_js,
    html5shiv,
    ])
view_needed = NeededGroup([
    view_needed_css,
    view_needed_js,
    ])

edit_needed_css = NeededGroup([
    edit_css,
    jqueryui_bootstrap_theme,
    ])
edit_needed_js = NeededGroup([
    jquery,
    bootstrap_js,
github Kotti / Kotti / kotti / fanstatic.py View on Github external
elif isinstance(resource, (Resource, Group)):
            self.resources.append(resource)
        else:
            raise ValueError(
                "resource must be a NeededGroup,"
                "fanstatic.Resource or fanstatic.Group object"
            )

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()


view_needed_css = NeededGroup([view_css])
view_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv])
view_needed = NeededGroup([view_needed_css, view_needed_js])

edit_needed_css = NeededGroup([edit_css, jqueryui_bootstrap_theme])
edit_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv, jquery_form])
edit_needed = NeededGroup([edit_needed_css, edit_needed_js])
github Kotti / Kotti / kotti / fanstatic.py View on Github external
"fanstatic.Resource or fanstatic.Group object")

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()

view_needed_css = NeededGroup([
    view_css,
    ])
view_needed_js = NeededGroup([
    jquery,
    bootstrap_js,
    html5shiv,
    ])
view_needed = NeededGroup([
    view_needed_css,
    view_needed_js,
    ])

edit_needed_css = NeededGroup([
    edit_css,
    jqueryui_bootstrap_theme,
    ])
edit_needed_js = NeededGroup([
    jquery,
    bootstrap_js,
    html5shiv,
    jquery_form,
    ])
edit_needed = NeededGroup([
    edit_needed_css,
github Kotti / Kotti / kotti / fanstatic.py View on Github external
self.resources.append(resource)
        else:
            raise ValueError(
                "resource must be a NeededGroup,"
                "fanstatic.Resource or fanstatic.Group object"
            )

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()


view_needed_css = NeededGroup([view_css])
view_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv])
view_needed = NeededGroup([view_needed_css, view_needed_js])

edit_needed_css = NeededGroup([edit_css, jqueryui_bootstrap_theme])
edit_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv, jquery_form])
edit_needed = NeededGroup([edit_needed_css, edit_needed_js])
github Kotti / Kotti / kotti / fanstatic.py View on Github external
if isinstance(resource, self.__class__):
            self.resources = self.resources + resource.resources
        elif isinstance(resource, (Resource, Group)):
            self.resources.append(resource)
        else:
            raise ValueError(
                "resource must be a NeededGroup,"
                "fanstatic.Resource or fanstatic.Group object")

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()

view_needed_css = NeededGroup([
    view_css,
    ])
view_needed_js = NeededGroup([
    jquery,
    bootstrap_js,
    html5shiv,
    ])
view_needed = NeededGroup([
    view_needed_css,
    view_needed_js,
    ])

edit_needed_css = NeededGroup([
    edit_css,
    jqueryui_bootstrap_theme,
    ])
github Kotti / Kotti / kotti / fanstatic.py View on Github external
raise ValueError(
                "resource must be a NeededGroup,"
                "fanstatic.Resource or fanstatic.Group object"
            )

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()


view_needed_css = NeededGroup([view_css])
view_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv])
view_needed = NeededGroup([view_needed_css, view_needed_js])

edit_needed_css = NeededGroup([edit_css, jqueryui_bootstrap_theme])
edit_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv, jquery_form])
edit_needed = NeededGroup([edit_needed_css, edit_needed_js])
github Kotti / Kotti / kotti / fanstatic.py View on Github external
"fanstatic.Resource or fanstatic.Group object"
            )

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()


view_needed_css = NeededGroup([view_css])
view_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv])
view_needed = NeededGroup([view_needed_css, view_needed_js])

edit_needed_css = NeededGroup([edit_css, jqueryui_bootstrap_theme])
edit_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv, jquery_form])
edit_needed = NeededGroup([edit_needed_css, edit_needed_js])
github Kotti / Kotti / kotti / fanstatic.py View on Github external
self.resources = self.resources + resource.resources
        elif isinstance(resource, (Resource, Group)):
            self.resources.append(resource)
        else:
            raise ValueError(
                "resource must be a NeededGroup,"
                "fanstatic.Resource or fanstatic.Group object"
            )

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()


view_needed_css = NeededGroup([view_css])
view_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv])
view_needed = NeededGroup([view_needed_css, view_needed_js])

edit_needed_css = NeededGroup([edit_css, jqueryui_bootstrap_theme])
edit_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv, jquery_form])
edit_needed = NeededGroup([edit_needed_css, edit_needed_js])
github Kotti / Kotti / kotti / fanstatic.py View on Github external
"resource must be a NeededGroup,"
                "fanstatic.Resource or fanstatic.Group object"
            )

    def need(self):  # pragma: no cover
        # this is tested in fanstatic itself; we should add browser tests
        # for `view_needed` and `edit_needed` (see below)
        Group(self.resources).need()


view_needed_css = NeededGroup([view_css])
view_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv])
view_needed = NeededGroup([view_needed_css, view_needed_js])

edit_needed_css = NeededGroup([edit_css, jqueryui_bootstrap_theme])
edit_needed_js = NeededGroup([jquery, bootstrap_js, html5shiv, jquery_form])
edit_needed = NeededGroup([edit_needed_css, edit_needed_js])