gws.plugin.model_widget.file_list

File list widget.

A feature list widget for related features that hold files. toFileField names the file field of the related model that holds the file. The button options are the same as for the featureList widget.

Example:

fields+ {
    name "docs"
    type "relatedFeatureList"
    toModel "model_document"
    toColumn "poi_id"
    widget {
        type "fileList"
        toFileField "documentFile"
        withNewButton true
        withUnlinkButton true
    }
}

Source code: gws.plugin.model_widget.file_list

Package Contents

class gws.plugin.model_widget.file_list.Config

Bases: gws.plugin.model_widget.feature_list.Config

List of related files.

toFileField: str

File field of the related model that holds the file.

class gws.plugin.model_widget.file_list.Object

Bases: gws.plugin.model_widget.feature_list.Object

File list widget object.

props(user)
class gws.plugin.model_widget.file_list.Props

Bases: gws.base.model.widget.Props

toFileField: str
withDeleteButton: bool
withEditButton: bool
withLinkButton: bool
withNewButton: bool
withUnlinkButton: bool