org.forms.fields
Classes
A textfield with html with integrated sanitation and annotation, |
|
An extension of |
|
An extension of |
|
An extension of |
Functions
|
Module Contents
- class org.forms.fields.HtmlField(*args: Any, **kwargs: Any)[source]
Bases:
onegov.form.fields.HtmlFieldA textfield with html with integrated sanitation and annotation, cleaning the html and adding extra information including setting the image size by querying the database.
- org.forms.fields.file_choices_from_collection(collection: onegov.file.FileCollection[Any]) list[tuple[str, str]][source]
- class org.forms.fields.UploadOrLinkExistingFileField(*args: Any, file_collection: type[onegov.file.FileCollection[Any]] = FileCollection, file_type: str = 'general', allow_duplicates: bool = False, _collection: onegov.file.FileCollection[Any] | None = None, **kwargs: Any)[source]
Bases:
onegov.form.fields.UploadFileWithORMSupportAn extension of
onegov.form.fields.UploadFileWithORMSupportwhich will select existing uploaded files to link from a givenonegov.file.FileCollectionclass in addition to uploading new files.This class is mostly useful in conjunction with
onegov.org.forms.fields.UploadOrSelectExistingMultipleFilesFieldif you want to link or upload only a single file, then you should useonegov.org.forms.fields.UploadOrSelectExistingFileField.
- class org.forms.fields.UploadOrSelectExistingFileField(*args: Any, file_collection: type[onegov.file.FileCollection[Any]] = FileCollection, file_type: str = 'general', allow_duplicates: bool = False, _choices: list[tuple[str, str]] | None = None, **kwargs: Any)[source]
Bases:
UploadOrLinkExistingFileFieldAn extension of
onegov.form.fields.UploadFileWithORMSupportto allow selecting existing uploaded files from a givenonegov.file.FileCollectionclass in addition to uploading new files.- Parameters:
file_collection – The file collection class to use, should be a subclass of
onegov.file.FileCollection.file_type – The polymoprhic type to use and to filter for.
allow_duplicates – Prevents duplicates if set to false. Rather than throw an error it will link to the existing file and discard the new file.
- class org.forms.fields.UploadOrSelectExistingMultipleFilesField(*args: Any, file_collection: type[onegov.file.FileCollection[Any]] = FileCollection, file_type: str = 'general', allow_duplicates: bool = False, **kwargs: Any)[source]
Bases:
onegov.form.fields.UploadMultipleFilesWithORMSupportAn extension of
onegov.form.fields.UploadMultipleFilesWithORMSupportto allow selecting existing uploaded files from a givenonegov.file.FileCollectionclass in addition to uploading new files.- Parameters:
file_collection – The file collection class to use, should be a subclass of
onegov.file.FileCollection.file_type – The polymoprhic type to use and to filter for.
allow_duplicates – Prevents duplicates if set to false. Rather than throw an error it will link to the existing file and discard the new file.