summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2010-12-09 17:40:30 +0100
committerÉtienne Loks <etienne.loks@peacefrogs.net>2010-12-24 17:39:02 +0100
commitd932a55da2608ccafc65e53a672dfc2dd9dec023 (patch)
tree08250ae3296eecb9a945ab6c0f115bcd3bb77ca0
parent407498312efdfe706df6d135c22b19345bf22576 (diff)
downloadIshtar-d932a55da2608ccafc65e53a672dfc2dd9dec023.tar.bz2
Ishtar-d932a55da2608ccafc65e53a672dfc2dd9dec023.zip
Some corrections on database model (refs #13)
-rw-r--r--ishtar/furnitures/models.py5
-rw-r--r--ishtar/settings.py.example3
2 files changed, 5 insertions, 3 deletions
diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py
index 5e51c8959..9c7673f43 100644
--- a/ishtar/furnitures/models.py
+++ b/ishtar/furnitures/models.py
@@ -209,14 +209,13 @@ class Item(models.Model):
verbose_name=_(u"Registration Unit"))
material_type = models.ForeignKey(MaterialType,
verbose_name = _(u"Material type"))
- dating = models.ForeignKey(Dating, verbose_name=_(u"Dating"))
is_isolated = models.BooleanField(_(u"Is isolated?"))
volume = models.FloatField(_(u"Volume"))
weight = models.IntegerField(_(u"Weight"))
item_number = models.IntegerField(_("Item's number"))
documentations = models.ManyToManyField(Source)
treatments = models.ManyToManyField("Treatment")
- datings = models.ManyToManyField("Dating")
+ datings = models.ForeignKey(Dating, verbose_name=_(u"Dating"))
def __unicode__(self):
return self.label
@@ -288,7 +287,7 @@ if settings.COUNTRY == 'fr':
class Town(models.Model):
name = models.CharField(_(u"Name"), max_length=100)
surface = models.IntegerField(_(u"Surface"))
- center = PointField(_(u"Localisation"), srid=settings.SRID)
+ center = models.PointField(_(u"Localisation"), srid=settings.SRID)
if settings.COUNTRY == 'fr':
numero_insee = models.CharField(u"Numéro INSEE", max_length=5)
canton = models.ForeignKey(Canton, verbose_name=u"Canton")
diff --git a/ishtar/settings.py.example b/ishtar/settings.py.example
index 46d4f58b2..5a15e0e6d 100644
--- a/ishtar/settings.py.example
+++ b/ishtar/settings.py.example
@@ -1,5 +1,8 @@
# Django settings for ishtar project.
+# Ishtar custom
+SRID = 27572
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG