summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2011-01-09 01:07:46 +0100
committerÉtienne Loks <etienne.loks@peacefrogs.net>2011-01-09 01:07:46 +0100
commit862afc0afe881ac712962e1a3caa4cc43dffde9a (patch)
tree2b84e5d55b78cd46f420f5b14ed8fa4334ef5f46
parent6afe48ce4f15f14b75980f62de321185367a3d64 (diff)
downloadIshtar-862afc0afe881ac712962e1a3caa4cc43dffde9a.tar.bz2
Ishtar-862afc0afe881ac712962e1a3caa4cc43dffde9a.zip
Correct addresses of archeological files (refs #14)
-rw-r--r--ishtar/furnitures/forms.py6
-rw-r--r--ishtar/furnitures/models.py6
2 files changed, 10 insertions, 2 deletions
diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py
index 3736029d5..64acaa5c5 100644
--- a/ishtar/furnitures/forms.py
+++ b/ishtar/furnitures/forms.py
@@ -455,8 +455,12 @@ class FileFormGeneralRO(FileFormGeneral):
class FileFormAddress(forms.Form):
form_label = _("Address")
+ associated_models = {'town':models.Town}
total_surface = forms.IntegerField(label=_("Total surface"))
- address = forms.CharField(label=_(u"Address"), widget=forms.Textarea)
+ address = forms.CharField(label=_(u"Main address"), widget=forms.Textarea)
+ address_complement = forms.CharField(label=_(u"Main address - complement"))
+ postal_code = forms.CharField(label=_(u"Main address - postal code"),
+ max_length=10)
class TownForm(forms.Form):
form_label = _("Towns")
diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py
index 5a8a76fba..6664adb72 100644
--- a/ishtar/furnitures/models.py
+++ b/ishtar/furnitures/models.py
@@ -245,7 +245,11 @@ class File(BaseHistorizedItem, OwnPerms):
total_surface = models.IntegerField(_(u"Total surface"))
total_developed_surface = models.IntegerField(_(u"Total developed surface"),
blank=True, null=True)
- address = models.TextField(_(u"Address"))
+ address = models.TextField(_(u"Main address"), null=True, blank=True)
+ address_complement = models.TextField(_(u"Main address - complement"),
+ null=True, blank=True)
+ postal_code = models.CharField(_(u"Main address - postal code"),
+ max_length=10, null=True, blank=True)
comment = models.TextField(_(u"Comment"))
history = HistoricalRecords()