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.HtmlField
A 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.UploadFileWithORMSupport
An extension of
onegov.form.fields.UploadFileWithORMSupport
which will select existing uploaded files to link from a givenonegov.file.FileCollection
class in addition to uploading new files.This class is mostly useful in conjunction with
onegov.org.forms.fields.UploadOrSelectExistingMultipleFilesField
if 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:
UploadOrLinkExistingFileField
An extension of
onegov.form.fields.UploadFileWithORMSupport
to allow selecting existing uploaded files from a givenonegov.file.FileCollection
class 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.UploadMultipleFilesWithORMSupport
An extension of
onegov.form.fields.UploadMultipleFilesWithORMSupport
to allow selecting existing uploaded files from a givenonegov.file.FileCollection
class 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.