From 07eff011922affd5733814c13236fe149cd64fd1 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 29 Oct 2013 20:06:11 +0100 Subject: Importer HTML-XSLT: model - admin * new fields for Importer model: alt source file (2 XSLT files can be used), default location (these pages doesn't provide adresses) * adapt admin to manage 2 type of hidden OpenLayers maps on the same page --- chimere/utils.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'chimere/utils.py') diff --git a/chimere/utils.py b/chimere/utils.py index f5379aa..efaf084 100644 --- a/chimere/utils.py +++ b/chimere/utils.py @@ -67,10 +67,10 @@ class ImportManager(object): 'name').all()]) def get(self): - pass + raise NotImplementedError def put(self, extra_args={}): - pass + raise NotImplementedError def create_or_update_item(self, cls, values, import_key, version=None, key='', pk=None): @@ -834,3 +834,14 @@ class OSMManager(ImportManager): item.save() api.ChangesetClose() return idx+1, None + +class HtmlXsltManager(ImportManager): + def get(self): + u""" + Get data from the source + + Return a tuple with: + - new items; + - updated items; + - error detail on error. + """ -- cgit v1.2.3