Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
])
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,
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])
"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,
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])
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,
])
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])
"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])
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])
"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])