2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 17:57:08 +00:00

Started removing foreignkeys to caves, to achieve greater flexability. Some log book entries stuff may be broken. Add ability to make new caves and entrances via website.

This commit is contained in:
expo
2012-08-12 19:10:23 +02:00
parent 6d5babd331
commit ecd5bbcb1d
10 changed files with 79 additions and 21 deletions

View File

@@ -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,15 +35,21 @@ 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
#class PersonForm(ModelForm):
# class Meta:
# model = Person