forked from expo/troggle
Edit contents.json online
This commit is contained in:
@@ -53,12 +53,6 @@ class CaveForm(ModelForm):
|
||||
self._errors["url"] = self.error_class(["This field cannot start with a /."])
|
||||
return self.cleaned_data
|
||||
|
||||
# class VersionControlCommentForm(forms.Form):
|
||||
# '''Was appended to all forms. Not used currently
|
||||
# '''
|
||||
# description_of_change = forms.CharField(required = True, widget=forms.Textarea(attrs={'rows':2}))
|
||||
|
||||
|
||||
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 presentaiton style
|
||||
@@ -95,9 +89,10 @@ class EntranceForm(ModelForm):
|
||||
|
||||
|
||||
# This next line is called from the templates/edit_cave2.html template.
|
||||
# This is sufficeint to create an entire entry for for the cave fields automatically
|
||||
# This is sufficient to create an entire entry for for the cave fields automatically
|
||||
# http://localhost:8000/cave/new/
|
||||
# using django built-in Deep magic. https://docs.djangoproject.com/en/2.2/topics/forms/modelforms/
|
||||
# using django built-in Deep Magic. https://docs.djangoproject.com/en/3.2/topics/forms/modelforms/
|
||||
# for forms which map directly onto a Django Model
|
||||
CaveAndEntranceFormSet = modelformset_factory(CaveAndEntrance, exclude=('cave',))
|
||||
|
||||
class EntranceLetterForm(ModelForm):
|
||||
|
||||
Reference in New Issue
Block a user