POIs
Forms for creating and modifying POI and POI translation objects
POI Form
- class integreat_cms.cms.forms.pois.poi_form.POIForm(**kwargs: Any)[source]
Bases:
CustomModelForm
Form for creating and modifying POI objects
Form fields:
address
: Street and house number (CharField
)postcode
: Postal code (CharField
)city
: City (CharField
)country
: Country (CharField
)latitude
: Latitude (FloatField
)longitude
: Longitude (FloatField
)location_on_map
: Show this location on map (BooleanField
)icon
: Icon (ModelChoiceField
)website
: Website (URLField
)email
: Email address (EmailField
)phone_number
: Phone number (CharField
)category
: Category (ModelChoiceField
)opening_hours
: Opening hours (JSONField
)temporarily_closed
: Temporarily closed (BooleanField
)appointment_url
: Appointment link (URLField
)organization
: Organization (ModelChoiceField
)barrier_free
: Barrier free (NullBooleanField
)
- Parameters:
kwargs (Any)
- __init__(**kwargs: Any) None [source]
Initialize page form
- Parameters:
**kwargs (Any) – The supplied keyword arguments
- Return type:
None
- clean() dict[str, Any] [source]
Validate form fields which depend on each other, see
django.forms.Form.clean()
- clean_opening_hours() list[dict[str, Any]] [source]
Validate the opening hours field (see Overriding the clean() method).
- property media[source]
Return all media required to render the widgets on this form.
- nominatim_distance_delta = 0[source]
The distance in km between the manually entered coordinates and the coordinates returned from Nominatim
- save(commit: bool = True) Any [source]
This method extends the default
save()
-method of the baseModelForm
to provide debug logging- Parameters:
commit (bool) – Whether or not the changes should be written to the database
- Returns:
The saved object returned by The save() method
- Return type:
Any
POI Translation Form
- class integreat_cms.cms.forms.pois.poi_translation_form.POITranslationForm(**kwargs: Any)[source]
Bases:
MachineTranslationForm
Form for creating and modifying POI translation objects
Form fields:
title
: Name of the location (CharField
)status
: Status (TypedChoiceField
)content
: Description (CharField
)minor_edit
: Minor edit (BooleanField
)automatic_translation
: Automatic translation (BooleanField
)machine_translated
: Machine translated (BooleanField
)meta_description
: Meta description (CharField
)slug
: Link to the location (SlugField
)mt_translations_to_create
: Create new translations: (ModelMultipleChoiceField
)mt_translations_to_update
: Update existing translations: (ModelMultipleChoiceField
)
- Parameters:
kwargs (Any)
- __init__(**kwargs: Any) None [source]
Initialize POI translation form
- Parameters:
**kwargs (Any) – The supplied keyword arguments
- Return type:
None
- property media[source]
Return all media required to render the widgets on this form.