mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
* Fix #1416 -- Add canonical geodata field for events and subevents * Add optional geocoding through OpenCageData * Fix markup everywhere * Add Leaflet map to geo coordinates * Fix tests, add credits * Fix spelling
This commit is contained in:
@@ -112,6 +112,8 @@ class EventWizardBasicsForm(I18nModelForm):
|
||||
'presale_start',
|
||||
'presale_end',
|
||||
'location',
|
||||
'geo_lat',
|
||||
'geo_lon',
|
||||
]
|
||||
field_classes = {
|
||||
'date_from': SplitDateTimeField,
|
||||
@@ -282,6 +284,8 @@ class EventUpdateForm(I18nModelForm):
|
||||
'presale_start',
|
||||
'presale_end',
|
||||
'location',
|
||||
'geo_lat',
|
||||
'geo_lon',
|
||||
]
|
||||
field_classes = {
|
||||
'date_from': SplitDateTimeField,
|
||||
|
||||
@@ -37,6 +37,20 @@ class GlobalSettingsForm(SettingsForm):
|
||||
required=False,
|
||||
label=_("Global message banner detail text"),
|
||||
)),
|
||||
('opencagedata_apikey', forms.CharField(
|
||||
required=False,
|
||||
label=_("OpenCage API key for geocoding"),
|
||||
)),
|
||||
('leaflet_tiles', forms.CharField(
|
||||
required=False,
|
||||
label=_("Leaflet tiles URL pattern"),
|
||||
help_text=_("e.g. {sample}").format(sample="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png")
|
||||
)),
|
||||
('leaflet_tiles_attribution', forms.CharField(
|
||||
required=False,
|
||||
label=_("Leaflet tiles attribution"),
|
||||
help_text=_("e.g. {sample}").format(sample='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors')
|
||||
)),
|
||||
])
|
||||
responses = register_global_settings.send(self)
|
||||
for r, response in sorted(responses, key=lambda r: str(r[0])):
|
||||
|
||||
@@ -37,6 +37,8 @@ class SubEventForm(I18nModelForm):
|
||||
'presale_end',
|
||||
'location',
|
||||
'frontpage_text',
|
||||
'geo_lat',
|
||||
'geo_lon',
|
||||
]
|
||||
field_classes = {
|
||||
'date_from': SplitDateTimeField,
|
||||
|
||||
Reference in New Issue
Block a user