diff options
Diffstat (limited to 'archaeological_operations/data_importer.py')
| -rw-r--r-- | archaeological_operations/data_importer.py | 19 | 
1 files changed, 14 insertions, 5 deletions
| diff --git a/archaeological_operations/data_importer.py b/archaeological_operations/data_importer.py index 4402c8b17..e02b53df0 100644 --- a/archaeological_operations/data_importer.py +++ b/archaeological_operations/data_importer.py @@ -148,22 +148,31 @@ RE_ORGA = re.compile("([^,]*)")  class OperationImporterBibracte(Importer): +    DEFAULTS = { +                ('in_charge',):{ +                    'organization_type':OrganizationType.objects.get( +                                             txt_idx="operator")}, +               }      LINE_FORMAT = [          # CODE OPE -        ImportFormater('operation_code', -                IntegerFormater(),), +        ImportFormater('operation_code', IntegerFormater(),),          # REGION          None,          # TYPE operation -        ImportFormater('operation_type', -                TypeFormater(models.OperationType),), - +        ImportFormater('operation_type', TypeFormater(models.OperationType),),          # NOM +        ImportFormater('common_name', UnicodeFormater(120),),          # OPERATEUR +        ImportFormater('operator__name', UnicodeFormater(120),),          # resp. lien IMPORT avec personne +        ImportFormater('in_charge__raw_name', UnicodeFormater(300),),          # début +        ImportFormater('start_date', DateFormater('%Y/%m/%d'),),          # fin +        ImportFormater('excavation_end_date', DateFormater('%Y/%m/%d'),),          # Chronos +        ImportFormater('periods', TypeFormater(models.Period, many=True), +                       many=True),      ]      OBJECT_CLS = models.Operation | 
