summaryrefslogtreecommitdiff
path: root/chimere/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/models.py')
-rw-r--r--chimere/models.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/chimere/models.py b/chimere/models.py
index 2f30892..757e464 100644
--- a/chimere/models.py
+++ b/chimere/models.py
@@ -299,6 +299,13 @@ class SubCategory(models.Model):
json_string = json.dumps(self.getJSONDict())
return json_string
+STATUS = (('S', _(u'Submited')),
+ ('A', _(u'Available')),
+ ('M', _(u'Modified')),
+ ('D', _(u'Disabled')),
+ ('I', _(u'Imported')))
+STATUS_DCT = dict(STATUS)
+
IMPORTERS = {'KML':KMLManager,
'OSM':OSMManager,
'SHP':ShapefileManager,
@@ -355,6 +362,8 @@ class Importer(models.Model):
u"a marker to a way"), default=False)
automatic_update = models.BooleanField(_(u"Automatically updated"),
default=False)
+ default_status = models.CharField(_(u"Default status"), max_length=1,
+ choices=STATUS, default='I')
default_localisation = PointField(_(u"Default localisation"),
srid=settings.CHIMERE_EPSG_DISPLAY_PROJECTION,
blank=True, null=True,
@@ -403,13 +412,6 @@ class ImporterKeyCategories(models.Model):
class Meta:
verbose_name = _(u"Importer - Key categories")
-STATUS = (('S', _(u'Submited')),
- ('A', _(u'Available')),
- ('M', _(u'Modified')),
- ('D', _(u'Disabled')),
- ('I', _(u'Imported')))
-STATUS_DCT = dict(STATUS)
-
class GeographicItem(models.Model):
name = models.CharField(_(u"Name"), max_length=150)
categories = SelectMultipleField(SubCategory)