diff options
Diffstat (limited to 'core/forms.py')
-rw-r--r-- | core/forms.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/core/forms.py b/core/forms.py index e0654fb..da16d79 100644 --- a/core/forms.py +++ b/core/forms.py @@ -16,8 +16,11 @@ class CaveForm(ModelForm): underground_centre_line = forms.CharField(required = False, widget=forms.Textarea()) notes = forms.CharField(required = False, widget=forms.Textarea()) references = forms.CharField(required = False, widget=forms.Textarea()) + slug = forms.CharField(required = True) + url = forms.CharField(required = True) class Meta: model = Cave + exclude = ("filename",) class VersionControlCommentForm(forms.Form): description_of_change = forms.CharField(required = True, widget=forms.Textarea()) @@ -32,14 +35,20 @@ class EntranceForm(ModelForm): #underground_centre_line = forms.CharField(required = False, widget=TinyMCE(attrs={'cols': 80, 'rows': 10})) #notes = forms.CharField(required = False, widget=TinyMCE(attrs={'cols': 80, 'rows': 10})) #references = forms.CharField(required = False, widget=TinyMCE(attrs={'cols': 80, 'rows': 10})) + other_station = forms.CharField(required=False) # Trying to change this to a singl;e line entry + tag_station = forms.CharField(required=False) # Trying to change this to a singl;e line entry + exact_station = forms.CharField(required=False) # Trying to change this to a singl;e line entry + northing = forms.CharField(required=False) # Trying to change this to a singl;e line entry + easting = forms.CharField(required=False) # Trying to change this to a singl;e line entry + alt = forms.CharField(required=False) # Trying to change this to a singl;e line entry + slug = forms.CharField() class Meta: model = Entrance + exclude = ("cached_primary_slug", "filename",) -CaveAndEntranceFormSet = modelformset_factory(CaveAndEntrance, exclude=('cave')) -class EntranceForm(ModelForm): - class Meta: - model = Entrance + +CaveAndEntranceFormSet = modelformset_factory(CaveAndEntrance, exclude=('cave')) #class PersonForm(ModelForm): # class Meta: |