summaryrefslogtreecommitdiff
path: root/chimere/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-09-23 23:33:10 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2015-09-23 23:33:10 +0200
commit5d2cac2cb5a03c8f55a2396e4c4ce13911a9149c (patch)
treed5f65982dc601da2dc1c59a4cdb29bebcd6456f8 /chimere/models.py
parent9d0ff9f26f5b71c2e3d02451e8240472b29a2134 (diff)
downloadChimère-v2.1.tar.bz2
Chimère-v2.1.zip
Imports: specify the status used by default during importsv2.1
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)