gws.base.project.core

Project object.

Source code: gws.base.project.core

Module Contents

class gws.base.project.core.Config(*args, **kwargs)

Bases: gws.ConfigWithAccess

Project with its own map, actions, templates and services.

actions: list[gws.ext.config.action] | None

Actions available only in this project.

assets: gws.base.web.site.WebDirConfig | None

Directory with project assets, checked before the global assets directory.

client: gws.base.client.Config | None

Client UI for this project, replacing the application client.

exporters: list[gws.ext.config.exporter] | None

Exporters for this project, offered along with the global ones.

finders: list[gws.ext.config.finder] | None

Search providers available in this project.

locales: list[gws.LocaleUid] | None

Locales for this project.

map: gws.base.map.Config | None

Main map of the project.

metadata: gws.base.metadata.Config | None

Project metadata, merged with the application metadata.

models: list[gws.ext.config.model] | None

Data models.

overviewMap: gws.base.map.Config | None

Overview map, showing the current view on a smaller scale.

owsServices: list[gws.ext.config.owsService] | None

OWS services published for this project.

printers: list[gws.base.printer.Config] | None

Printers for this project, offered along with the global ones.

templates: list[gws.ext.config.template] | None

Templates for this project.

title: str = ''

Project title.

type: str = 'default'
vars: dict | None

Custom variables.

class gws.base.project.core.Object

Bases: gws.Project

Default project.

overviewMap: gws.base.map.Object

Overview map, if configured.

title: str

Project title.

configure()

Configuration hook.

Called when the node is initialized. Raising an exception here aborts the creation of the node.

props(user)

Generate a Props struct for this object.

Do not call this method directly, use gws.props_of instead, which also checks permissions.

Parameters:

user – The user for which the props should be generated.

Returns:

A Props object or a dict. Nested objects are converted to props as well.

class gws.base.project.core.Props(*args, **kwargs)

Bases: gws.Props

Object properties.

actions: list[gws.ext.props.action]
client: gws.base.client.Props | None
description: str
exporters: list[gws.ext.props.exporter]
locales: list[str]
map: gws.ext.props.map
metadata: gws.base.metadata.Props
models: list[gws.ext.props.model]
overviewMap: gws.ext.props.map
printers: list[gws.base.printer.Props]
title: str
uid: str

Unique ID.