summaryrefslogtreecommitdiffstats
path: root/core/forms.py
diff options
context:
space:
mode:
authorexpo <expo@expobox.potato.hut>2012-08-12 19:10:23 +0200
committerexpo <expo@expobox.potato.hut>2012-08-12 19:10:23 +0200
commitecd5bbcb1dbb00cc0d39cdf80151f41c07c6c8b2 (patch)
tree0899e18f4b9ccbc63e2241c011af0090e09f415d /core/forms.py
parent6d5babd3319fec50f404bf7ad044962bd1f192e9 (diff)
downloadtroggle-ecd5bbcb1dbb00cc0d39cdf80151f41c07c6c8b2.tar.gz
troggle-ecd5bbcb1dbb00cc0d39cdf80151f41c07c6c8b2.tar.bz2
troggle-ecd5bbcb1dbb00cc0d39cdf80151f41c07c6c8b2.zip
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.
Diffstat (limited to 'core/forms.py')
-rw-r--r--core/forms.py17
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: