gws.base.application.core¶
Application object and root configuration.
Source code: gws.base.application.core
Module Contents¶
- class gws.base.application.core.Config(*args, **kwargs)¶
Bases:
gws.ConfigWithAccessRoot configuration of the application.
- actions: list[gws.ext.config.action] | None¶
Server actions available in all projects.
- auth: gws.base.auth.manager.Config | None¶
Authentication methods, providers and session options.
- cache: gws.gis.cache.GlobalConfig | None¶
Options for tile cache seeding.
- client: gws.base.client.Config | None¶
Default client UI elements and options for all projects.
- database: gws.base.database.manager.Config | None¶
Database connections.
- developer: dict | None¶
Options for development and debugging, not for production use.
- exporters: list[gws.ext.config.exporter] | None¶
Formats for exporting features.
- finders: list[gws.ext.config.finder] | None¶
Search providers available in all projects.
- fonts: gws.lib.font.Config | None¶
Directory with additional fonts for rendering and printing.
- helpers: list[gws.ext.config.helper] | None¶
Auxiliary objects, used throughout the application.
- locales: list[gws.LocaleUid] | None¶
Default locales for all projects.
- metadata: gws.base.metadata.Config | None¶
Application metadata.
- models: list[gws.ext.config.model] | None¶
Data models available in all projects.
- owsServices: list[gws.ext.config.owsService] | None¶
OWS services provided by the server.
- printers: list[gws.ext.config.printer] | None¶
Configuration for print templates and quality levels.
- projectDirs: list[gws.DirPath] | None¶
Directories searched recursively for project configuration files.
- projectPaths: list[gws.FilePath] | None¶
Additional project configuration files.
- projects: list[gws.ext.config.project] | None¶
Projects, each with its own map, client and actions.
- server: gws.server.Config | None¶
Server processes, logging and monitoring options.
- storage: gws.base.storage.manager.Config | None¶
Storage providers for data that users save in the client.
- templateOptions: gws.TemplateOptions | None¶
Login form, footer and extra resources of the built-in home pages.
- templates: list[gws.ext.config.template] | None¶
Templates available in all projects.
- vars: dict | None¶
Custom variables.
- web: gws.base.web.manager.Config | None¶
Web site and SSL options.
- gws.base.application.core.DEFAULT_CSS_FILENAME = 'style.css'¶
- gws.base.application.core.DEFAULT_LOCALE = ['en_CA']¶
- gws.base.application.core.DEFAULT_PRINTER¶
- gws.base.application.core.DEFAULT_TEMPLATE_SUBJECTS = ['application.home', 'application.error', 'project.home', 'project.description',...¶
- gws.base.application.core.DEFAULT_TEMPLATES¶
- class gws.base.application.core.Object¶
Bases:
gws.ApplicationApplication object.
- activate()¶
Activation hook.
Called by
Root.activateafter the configuration has been loaded.
- configure()¶
Configuration hook.
Called when the node is initialized. Raising an exception here aborts the creation of the node.
- developer_option(key)¶
Return the value of a developer option.
Developer options are configured in the
developerproperty of the application config and are meant for development and debugging only.- Parameters:
key – Option name, for example
template.always_reload.- Returns:
The option value, or
Noneif it is not set.
- helper(ext_type)¶
Return a helper object by its type.
A helper that is not configured is created with default options on the first call.
- Parameters:
ext_type – Helper type, for example
upload.- Returns:
The helper object.
- Raises:
Error – If the helper type does not exist.
- project(uid)¶
Find a project by its uid.
- Parameters:
uid – Project uid.
- Returns:
The project, or
Noneif not found.
- register_supported_crs(crs)¶
Register an additional supported CRS.
Must be called during configuration.
- Parameters:
crs – The CRS object.
- supported_crs()¶
Return all CRS supported by the application.
These are the CRS of all maps and the CRS supported by OWS services, plus the registered ones. The list is computed on the first call.
- Returns:
A list of CRS objects, sorted by srid.