summaryrefslogtreecommitdiff
path: root/chimere/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/models.py')
-rw-r--r--chimere/models.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/chimere/models.py b/chimere/models.py
index 7c84b0e..30c3be0 100644
--- a/chimere/models.py
+++ b/chimere/models.py
@@ -624,6 +624,7 @@ class GeographicItem(models.Model):
# add read attributes for properties
for pm in self.all_properties():
attr_name = pm.getAttrName()
+ print(attr_name)
if not hasattr(self, attr_name):
val = ''
property = self.getProperty(pm)
@@ -2014,7 +2015,7 @@ class Area(models.Model, SimpleArea):
"is 0.")
)
max_zoom = models.IntegerField(
- _("Maxim zoom"), blank=True, null=True,
+ _("Maximum zoom"), blank=True, null=True,
help_text=_("Set a maximal zoom level. By default maximal zoom level "
"is 18.")
)
@@ -2194,12 +2195,17 @@ class AreaOverlays(models.Model):
verbose_name_plural = _("Areas - Overlays")
+slug_help = _(u"The slug is the standardized version of the name. It contains "
+ u"only lowercase letters, numbers and hyphens. Each slug must "
+ u"be unique.")
+
+
class PropertyModel(models.Model):
"""
Model for a property
"""
name = models.CharField(_("Name"), max_length=150)
- slug = models.SlugField(_("Slug"), blank=True, null=True)
+ slug = models.SlugField(_("Slug"), help_text=slug_help, unique=True)
order = models.IntegerField(_("Order"))
available = models.BooleanField(_("Available"))
mandatory = models.BooleanField(_("Mandatory"))