org.forms.directory
Classes
Form for directories. |
|
Form for directories. |
|
For changing the URL of a directory independent of the title. |
|
Form for adding recipients of entry updates to the directory. |
Module Contents
- class org.forms.directory.DirectoryBaseForm[source]
Bases:
onegov.form.FormForm for directories.
- ensure_public_fields_for_submissions() bool | None[source]
Force directories to show all fields (no hidden fields) if the user may send in new entries or update exsting ones.
Otherwise we would have to filter out private fields which presents all kinds of edge-cases that we should probably not solve - directories are not meant to be private repositories.
- ensure_no_change_requests_with_admin_notifications() bool | None[source]
Change requests are applied without going through the mutability restrictions that protect already published entries from being silently altered, so they would allow bypassing the guarantees the admin notification is meant to provide (e.g. proof of publication for permits). Therefore the two settings are mutually exclusive.
- ensure_notification_address_requires_required_publication() bool | None[source]
The admin notification workflow is a proof-of-publication tool: it relies on every entry having a publication period. Without required publication an entry could be published immediately with no start (which the hourly cronjob’s start-transition scan never notifies on), so a notification address only makes sense when publication dates are required.
Returns the first hidden field, or None.
- is_public(fid: str, configuration: onegov.directory.DirectoryConfiguration) bool[source]
Returns true if the given field id is public.
A field is public, if none of these are true:
It is part of the title/lead
It is part of the display
It is part of the keywords
It is used as the thumbnail
Though we might also glean other fields if they are simply searchable or if they are part of the link pattern, we do not count those as public, because we are interested in obviously public fields clearly visible to the user.
- class org.forms.directory.DirectoryForm[source]
Bases:
DirectoryBaseForm,onegov.org.forms.generic.PaymentFormForm for directories.
- class org.forms.directory.DirectoryImportForm[source]
Bases:
onegov.form.Form