gws.base.printer.core

Default printer.

Source code: gws.base.printer.core

Module Contents

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

Bases: gws.ConfigWithAccess

Print template offered to users.

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

Models whose fields are shown as input fields in the print dialog.

qualityLevels: list[gws.TemplateQualityLevel] | None

Quality levels users can choose from.

template: gws.ext.config.template

Template that renders the print output.

title: str = ''

Printer title shown to users.

class gws.base.printer.core.Object

Bases: gws.Printer

Default printer.

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.printer.core.Props(*args, **kwargs)

Bases: gws.Props

Object properties.

model: gws.base.model.Props
qualityLevels: list[gws.TemplateQualityLevel]
template: gws.base.template.Props
title: str