Deleted archaisms and new comments

This commit is contained in:
Philip Sargent
2020-08-02 23:53:35 +01:00
parent 3dcc8883cd
commit d61c2b20c8
6 changed files with 82 additions and 70 deletions

View File

@@ -65,7 +65,10 @@ class EntranceForm(ModelForm):
return self.cleaned_data
# This next is called from the templates/edit_cave2.html template.
# This is sufficeint to create an entire entry for for the cave fields automatically
# http://localhost:8000/cave/new/
# using django built-in stuff:
CaveAndEntranceFormSet = modelformset_factory(CaveAndEntrance, exclude=('cave',))
class EntranceLetterForm(ModelForm):
@@ -153,6 +156,8 @@ def get_name(pe):
return pe.person.first_name
class UploadFileForm(forms.Form):
"""Only called by views_others.newFile() whhich seems to be only about logbook files.
"""
# Because this has EXECUTABLE statements in its signature (the fields) they get
# executed when this module is LOADED. Which barfs horribly.
# so all replaced by an __init__ method instead.