diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-11-04 15:02:46 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-11-04 15:06:24 +0100 |
commit | ad5de5b2fb255e84e2e6be7250aebc756faae734 (patch) | |
tree | 38619fca79a273f1beef23487e8f69555d304d76 /chimere/utils.py | |
parent | c023e15be620717339a780b6f4960649a9952afe (diff) | |
download | Chimère-ad5de5b2fb255e84e2e6be7250aebc756faae734.tar.bz2 Chimère-ad5de5b2fb255e84e2e6be7250aebc756faae734.zip |
Imports: add an automatic update option
When set to True:
* can be imported automatically by the chimere_import command
* new items are directly available (and not at the Imported state)
Admin interface and model updated.
Diffstat (limited to 'chimere/utils.py')
-rw-r--r-- | chimere/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chimere/utils.py b/chimere/utils.py index 1985f89..338af34 100644 --- a/chimere/utils.py +++ b/chimere/utils.py @@ -123,7 +123,8 @@ class ImportManager(object): self.importer_instance.default_description values.update({ 'import_source':self.importer_instance.source}) - values['status'] = 'I' + values['status'] = 'I' \ + if not self.importer_instance.automatic_update else 'A' if not self.importer_instance.associate_marker_to_way\ and cls.__name__ == 'Route': values['has_associated_marker'] = False @@ -996,7 +997,6 @@ class HtmlXsltManager(ImportManager): int(values['day2'])) break key = item['key'] - print dct it, updated, created = self.create_or_update_item(cls, dct, key) if updated: updated_item += 1 |