gws.base.client.bundles

Client JavaScript and CSS bundles created by the JS bundler.

Source code: gws.base.client.bundles

Module Contents

gws.base.client.bundles.BUNDLE_KEY_CSS = 'CSS'
gws.base.client.bundles.BUNDLE_KEY_MODULES = 'MODULES'
gws.base.client.bundles.BUNDLE_KEY_STRINGS = 'STRINGS'
gws.base.client.bundles.BUNDLE_KEY_TEMPLATE = 'TEMPLATE'
gws.base.client.bundles.css(root: gws.Root, category: str, theme: str)

Return a CSS bundle.

Parameters:
  • root – The configuration root.

  • category – Bundle category, only app has CSS.

  • theme – Theme name, light if empty.

Returns:

The CSS code, None if the theme is not found, or an empty string for other categories.

gws.base.client.bundles.DEFAULT_LANG = 'de'
gws.base.client.bundles.DEFAULT_THEME = 'light'
gws.base.client.bundles.javascript(root: gws.Root, category: str, locale: gws.Locale) → str

Return a JavaScript bundle.

Parameters:
  • root – The configuration root.

  • category – vendor for the vendor libraries, app for the client application with the UI strings for the locale language (German if not available).

  • locale – The client locale.

Returns:

The JavaScript code, or None for an unknown category.