mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 13:37:03 +00:00
Entrances now do cookie / git author thing. + tidyup.
This commit is contained in:
@@ -164,11 +164,11 @@ class EntranceForm(ModelForm):
|
||||
)
|
||||
explorers = forms.CharField(required=False, widget=forms.TextInput(attrs={"size": "45"}))
|
||||
# explorers = forms.CharField(required = False, widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
map_description = forms.CharField(
|
||||
label="Map (is this used?)",
|
||||
required=False,
|
||||
widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Enter text (using HTML)"}),
|
||||
)
|
||||
# map_description = forms.CharField(
|
||||
# label="Map (is this used?)",
|
||||
# required=False,
|
||||
# widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Enter text (using HTML)"}),
|
||||
# )
|
||||
location_description = forms.CharField(
|
||||
label="Location",
|
||||
required=False,
|
||||
@@ -232,13 +232,22 @@ class EntranceForm(ModelForm):
|
||||
)
|
||||
alt = forms.CharField(required=False, label="Altitude (m) - from GPS if you have it, but let it settle.")
|
||||
# url = forms.CharField(required=False, label="URL [usually blank]", widget=forms.TextInput(attrs={"size": "45"}))
|
||||
|
||||
field_order = ['name', 'entrance_description', 'explorers', 'map_description', 'location_description', 'lastvisit', 'approach', 'underground_description', 'photo', 'marking_comment', 'findability_description', 'other_description', 'bearings', 'tag_station', 'other_station', 'easting', 'northing', 'lat_wgs84', 'long_wgs84', 'alt']
|
||||
who_are_you = forms.CharField(
|
||||
widget=forms.TextInput(
|
||||
attrs={"size": 100, "placeholder": "You are editing this page, who are you ? e.g. 'Becka' or 'Animal <mta@gasthof.expo>'",
|
||||
"style": "vertical-align: text-top;"}
|
||||
)
|
||||
)
|
||||
|
||||
field_order = ['name', 'entrance_description', 'explorers', 'map_description', 'location_description', 'lastvisit', 'non_public',
|
||||
'findability', 'marking', 'approach', 'underground_description', 'photo', 'marking_comment', 'findability_description', 'other_description',
|
||||
'bearings', 'tag_station', 'other_station', 'easting', 'northing', 'lat_wgs84', 'long_wgs84', 'alt', 'who_are_you']
|
||||
|
||||
class Meta:
|
||||
model = Entrance
|
||||
exclude = (
|
||||
"cached_primary_slug",
|
||||
"map_description", # No entrance has any data on this field, so it is being retired.
|
||||
"filename",
|
||||
"slug",
|
||||
"bearings"
|
||||
@@ -259,8 +268,10 @@ class EntranceForm(ModelForm):
|
||||
class EntranceLetterForm(ModelForm):
|
||||
"""Form to link entrances to caves, along with an entrance number.
|
||||
|
||||
Nb. The relationship between caves and entrances has historically been a many to many relationship.
|
||||
NOTE. The relationship between caves and entrances was originally designed to be a many to many relationship.
|
||||
With entrances gaining new caves and letters when caves are joined.
|
||||
However, so far as I can see, this was never actually done in practice on Expo and each Entrance belongs
|
||||
to only one Cave.
|
||||
|
||||
see https://docs.djangoproject.com/en/5.1/topics/forms/modelforms/
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user