summaryrefslogtreecommitdiffstats
path: root/core/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/forms.py')
-rw-r--r--core/forms.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/forms.py b/core/forms.py
index 4229d82..24d0fec 100644
--- a/core/forms.py
+++ b/core/forms.py
@@ -45,6 +45,8 @@ todo = """
class CaveForm(ModelForm):
"""Only those fields for which we want to override defaults are listed here
the other fields of the class Cave are present on the form, but use the default presentation style
+
+ see https://docs.djangoproject.com/en/5.1/topics/forms/modelforms/
"""
unofficial_number= forms.CharField(required=False,
label="Unofficial Number used to construct internal identifiers",
@@ -143,6 +145,8 @@ class CaveForm(ModelForm):
class EntranceForm(ModelForm):
"""Only those fields for which we want to override defaults are listed here
the other fields are present on the form, but use the default presentation style
+
+ see https://docs.djangoproject.com/en/5.1/topics/forms/modelforms/
"""
name = forms.CharField(required=False, widget=forms.TextInput(attrs={"size": "45", "placeholder": "usually leave this blank"}))
@@ -240,7 +244,6 @@ class EntranceForm(ModelForm):
# # This next line is sufficient to create an entire entry for for the cave fields automatically
-# # using django built-in Deep Magic. https://docs.djangoproject.com/en/dev/topics/forms/modelforms/
# # for forms which map directly onto a Django Model
# CaveAndEntranceFormSet = modelformset_factory(CaveAndEntrance, exclude=("cave",))
# # This is used only in templates/editcave.html which is called only to edit caves in core/views/cave.py
@@ -250,6 +253,8 @@ class EntranceLetterForm(ModelForm):
Nb. The relationship between caves and entrances has historically been a many to many relationship.
With entrances gaining new caves and letters when caves are joined.
+
+ see https://docs.djangoproject.com/en/5.1/topics/forms/modelforms/
"""
# This only needs to be required=True for the second and subsequent entrances, not the first. Tricky.