diff options
Diffstat (limited to 'ishtar_common')
147 files changed, 14498 insertions, 13888 deletions
diff --git a/ishtar_common/__init__.py b/ishtar_common/__init__.py index 5d2eadd7d..6ae20f3c8 100644 --- a/ishtar_common/__init__.py +++ b/ishtar_common/__init__.py @@ -2,9 +2,11 @@ # -*- coding: utf-8 -*- # Copyright (C) 2014-2015 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ # overload of translation of registration module _(u"username") _(u"email address") _(u"Related item") + +default_app_config = 'ishtar_common.apps.IshtarCommonConfig' diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py index adf006502..4af60fa90 100644 --- a/ishtar_common/admin.py +++ b/ishtar_common/admin.py @@ -17,24 +17,24 @@ # See the file COPYING for details. -""" -Admin description -""" import csv +from ajax_select import make_ajax_form + from django.conf import settings from django.contrib import admin -from django.contrib.auth.admin import GroupAdmin -from django.contrib.auth.models import Group +from django.contrib.auth.admin import GroupAdmin, UserAdmin +from django.contrib.auth.models import Group, User +from django.contrib.gis.forms import PointField, OSMWidget from django.http import HttpResponseRedirect, HttpResponse -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render from django.template.defaultfilters import slugify -from django.utils.translation import ugettext_lazy as _, ugettext +from django.utils.translation import ugettext_lazy as _ from django import forms -import models +from ishtar_common.apps import admin_site +from ishtar_common import models class ImportGenericForm(forms.Form): @@ -69,9 +69,7 @@ def gen_import_generic(self, request, queryset): form = ImportGenericForm( initial={'_selected_action': request.POST.getlist(admin.ACTION_CHECKBOX_NAME)}) - return render_to_response( - 'admin/import_from_csv.html', {'csv_form': form}, - context_instance=RequestContext(request)) + return render(request, 'admin/import_from_csv.html', {'csv_form': form}) gen_import_generic.short_description = "Import from a CSV file" @@ -97,7 +95,7 @@ def export_as_csv_action(description=_(u"Export selected as CSV file"), excludeset = set(exclude) field_names = field_names - excludeset - response = HttpResponse(mimetype='text/csv') + response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename=%s.csv' % \ unicode(opts).replace('.', '_') @@ -114,7 +112,7 @@ def export_as_csv_action(description=_(u"Export selected as CSV file"), class HistorizedObjectAdmin(admin.ModelAdmin): - readonly_fields = ('history_modifier',) + readonly_fields = ['history_creator', 'history_modifier',] def save_model(self, request, obj, form, change): obj.history_modifier = request.user @@ -127,8 +125,8 @@ class MyGroupAdmin(GroupAdmin): "all": ("media/admin.css",) } -admin.site.unregister(Group) -admin.site.register(Group, MyGroupAdmin) +admin_site.register(User, UserAdmin) +admin_site.register(Group, MyGroupAdmin) class IshtarSiteProfileAdmin(admin.ModelAdmin): @@ -136,14 +134,14 @@ class IshtarSiteProfileAdmin(admin.ModelAdmin): 'find', 'warehouse') model = models.IshtarSiteProfile -admin.site.register(models.IshtarSiteProfile, IshtarSiteProfileAdmin) +admin_site.register(models.IshtarSiteProfile, IshtarSiteProfileAdmin) class DepartmentAdmin(admin.ModelAdmin): list_display = ('number', 'label',) model = models.Department -admin.site.register(models.Department, DepartmentAdmin) +admin_site.register(models.Department, DepartmentAdmin) class OrganizationAdmin(HistorizedObjectAdmin): @@ -151,9 +149,10 @@ class OrganizationAdmin(HistorizedObjectAdmin): list_filter = ("organization_type",) search_fields = ('name',) exclude = ('merge_key', 'merge_exclusion', 'merge_candidate', ) + readonly_fields = HistorizedObjectAdmin.readonly_fields + ['imports'] model = models.Organization -admin.site.register(models.Organization, OrganizationAdmin) +admin_site.register(models.Organization, OrganizationAdmin) class PersonAdmin(HistorizedObjectAdmin): @@ -161,9 +160,19 @@ class PersonAdmin(HistorizedObjectAdmin): list_filter = ("person_types",) search_fields = ('name', 'surname', 'email', 'raw_name') exclude = ('merge_key', 'merge_exclusion', 'merge_candidate', ) + readonly_fields = HistorizedObjectAdmin.readonly_fields + ['imports'] + form = make_ajax_form(models.Person, {'attached_to': 'organization'}) model = models.Person -admin.site.register(models.Person, PersonAdmin) +admin_site.register(models.Person, PersonAdmin) + + +class AdminTownForm(forms.ModelForm): + class Meta: + model = models.Town + exclude = [] + center = PointField(label=_(u"center"), required=False, + widget=OSMWidget) class TownAdmin(admin.ModelAdmin): @@ -173,17 +182,22 @@ class TownAdmin(admin.ModelAdmin): list_display += ['numero_insee', 'departement', ] search_fields += ['numero_insee', 'departement__label', ] list_filter = ("departement",) + readonly_fields = ['imports'] model = models.Town + form = AdminTownForm -admin.site.register(models.Town, TownAdmin) +admin_site.register(models.Town, TownAdmin) class AuthorAdmin(admin.ModelAdmin): list_display = ['person', 'author_type'] list_filter = ("author_type",) + search_fields = ('person__name', 'person__surname', + 'person__attached_to__name') model = models.Author + form = make_ajax_form(models.Author, {'person': 'person'}) -admin.site.register(models.Author, AuthorAdmin) +admin_site.register(models.Author, AuthorAdmin) class PersonTypeAdmin(admin.ModelAdmin): @@ -191,18 +205,19 @@ class PersonTypeAdmin(admin.ModelAdmin): model = models.PersonType filter_vertical = ('groups',) -admin.site.register(models.PersonType, PersonTypeAdmin) +admin_site.register(models.PersonType, PersonTypeAdmin) class GlobalVarAdmin(admin.ModelAdmin): list_display = ['slug', 'description', 'value'] -admin.site.register(models.GlobalVar, GlobalVarAdmin) +admin_site.register(models.GlobalVar, GlobalVarAdmin) class GeneralTypeAdmin(admin.ModelAdmin): list_display = ['label', 'txt_idx', 'available', 'comment'] search_fields = ('label', 'txt_idx', 'comment',) actions = ['import_generic', export_as_csv_action()] + prepopulated_fields = {"txt_idx": ("label",)} import_generic = gen_import_generic @@ -210,7 +225,7 @@ general_models = [models.OrganizationType, models.SourceType, models.AuthorType, models.TitleType, models.Format, models.SupportType] for model in general_models: - admin.site.register(model, GeneralTypeAdmin) + admin_site.register(model, GeneralTypeAdmin) class ImporterDefaultValuesInline(admin.TabularInline): @@ -221,17 +236,17 @@ class ImporterDefaultAdmin(admin.ModelAdmin): list_display = ('importer_type', 'target') model = models.ImporterDefault inlines = (ImporterDefaultValuesInline,) -admin.site.register(models.ImporterDefault, ImporterDefaultAdmin) +admin_site.register(models.ImporterDefault, ImporterDefaultAdmin) class ImporterTypeAdmin(admin.ModelAdmin): list_display = ('name', 'associated_models', 'is_template') -admin.site.register(models.ImporterType, ImporterTypeAdmin) +admin_site.register(models.ImporterType, ImporterTypeAdmin) class RegexpAdmin(admin.ModelAdmin): list_display = ('name', 'description', "regexp") -admin.site.register(models.Regexp, RegexpAdmin) +admin_site.register(models.Regexp, RegexpAdmin) class ImporterDuplicateFieldInline(admin.TabularInline): @@ -258,25 +273,26 @@ class ImporterColumnAdmin(admin.ModelAdmin): 'targets_lbl', 'duplicate_fields_lbl', 'required') list_filter = ('importer_type',) inlines = (ImportTargetInline, ImporterDuplicateFieldInline) -admin.site.register(models.ImporterColumn, ImporterColumnAdmin) +admin_site.register(models.ImporterColumn, ImporterColumnAdmin) class ImporterModelAdmin(admin.ModelAdmin): list_display = ('name', 'klass') model = models.ImporterModel -admin.site.register(models.ImporterModel, ImporterModelAdmin) +admin_site.register(models.ImporterModel, ImporterModelAdmin) class FormaterTypeAdmin(admin.ModelAdmin): list_display = ('formater_type', 'options') -admin.site.register(models.FormaterType, FormaterTypeAdmin) +admin_site.register(models.FormaterType, FormaterTypeAdmin) class ImportAdmin(admin.ModelAdmin): list_display = ('name', 'importer_type', 'imported_file', 'user', 'state', 'creation_date') -admin.site.register(models.Import, ImportAdmin) + form = make_ajax_form(models.Import, {'user': 'ishtaruser'}) +admin_site.register(models.Import, ImportAdmin) class TargetKeyAdmin(admin.ModelAdmin): @@ -284,32 +300,26 @@ class TargetKeyAdmin(admin.ModelAdmin): 'value', 'is_set') list_filter = ("is_set", "target__column__importer_type") search_fields = ('target__target', 'value', 'key') -admin.site.register(models.TargetKey, TargetKeyAdmin) +admin_site.register(models.TargetKey, TargetKeyAdmin) class OperationTypeAdmin(GeneralTypeAdmin): list_display = GeneralTypeAdmin.list_display + ['order', 'preventive'] model = models.OperationType -admin.site.register(models.OperationType, OperationTypeAdmin) +admin_site.register(models.OperationType, OperationTypeAdmin) class SpatialReferenceSystemAdmin(GeneralTypeAdmin): list_display = GeneralTypeAdmin.list_display + ['order', 'srid'] model = models.SpatialReferenceSystem -admin.site.register(models.SpatialReferenceSystem, SpatialReferenceSystemAdmin) - - -class IshtarUserAdmin(admin.ModelAdmin): - readonly_fields = ('password',) - -admin.site.register(models.IshtarUser, IshtarUserAdmin) +admin_site.register(models.SpatialReferenceSystem, SpatialReferenceSystemAdmin) class ItemKeyAdmin(admin.ModelAdmin): list_display = ('content_type', 'key', 'content_object', 'importer') search_fields = ('key', ) -admin.site.register(models.ItemKey, ItemKeyAdmin) +admin_site.register(models.ItemKey, ItemKeyAdmin) class AdministrationScriptAdmin(admin.ModelAdmin): @@ -320,7 +330,7 @@ class AdministrationScriptAdmin(admin.ModelAdmin): return ('path',) return [] -admin.site.register(models.AdministrationScript, AdministrationScriptAdmin) +admin_site.register(models.AdministrationScript, AdministrationScriptAdmin) class AdministrationTaskAdmin(admin.ModelAdmin): @@ -335,7 +345,7 @@ class AdministrationTaskAdmin(admin.ModelAdmin): return ("script", ) + self.readonly_fields return self.readonly_fields -admin.site.register(models.AdministrationTask, AdministrationTaskAdmin) +admin_site.register(models.AdministrationTask, AdministrationTaskAdmin) basic_models = [models.DocumentTemplate] @@ -343,4 +353,4 @@ if settings.COUNTRY == 'fr': basic_models += [models.Arrondissement, models.Canton] for model in basic_models: - admin.site.register(model) + admin_site.register(model) diff --git a/ishtar_common/apps.py b/ishtar_common/apps.py new file mode 100644 index 000000000..842675f04 --- /dev/null +++ b/ishtar_common/apps.py @@ -0,0 +1,42 @@ +from __future__ import unicode_literals + +from django.apps import AppConfig +from django.contrib.admin import AdminSite +from django.utils.translation import ugettext_lazy as _ + + +class IshtarAdminSite(AdminSite): + site_header = _('Ishtar administration') + site_title = _("Ishtar administration") + +admin_site = IshtarAdminSite(name='ishtaradmin') + + +class ArchaeologicalContextRecordConfig(AppConfig): + name = 'archaeological_context_records' + verbose_name = _("Ishtar - Context record") + + +class ArchaeologicalFilesConfig(AppConfig): + name = 'archaeological_files' + verbose_name = _("Ishtar - File") + + +class ArchaeologicalFindsConfig(AppConfig): + name = 'archaeological_finds' + verbose_name = _("Ishtar - Find") + + +class ArchaeologicalOperationsConfig(AppConfig): + name = 'archaeological_operations' + verbose_name = _("Ishtar - Operation") + + +class ArchaeologicalWarehouseConfig(AppConfig): + name = 'archaeological_warehouse' + verbose_name = _("Ishtar - Warehouse") + + +class IshtarCommonConfig(AppConfig): + name = 'ishtar_common' + verbose_name = _("Ishtar - Common") diff --git a/ishtar_common/backend.py b/ishtar_common/backend.py index f48e6ddec..261e4dc6f 100644 --- a/ishtar_common/backend.py +++ b/ishtar_common/backend.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -23,7 +23,7 @@ Permission backend to manage "own" objects from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ObjectDoesNotExist -from django.db.models.loading import cache +from django.apps import apps import models @@ -55,8 +55,8 @@ class ObjectPermBackend(ModelBackend): if obj is None: model_name = perm.split('_')[-1].lower() model = None - for app in cache.get_apps(): - for modl in cache.get_models(app): + for app in apps.get_apps(): + for modl in apps.get_models(app): if modl.__name__.lower() == model_name: model = modl if not model: diff --git a/ishtar_common/context_processors.py b/ishtar_common/context_processors.py index 5050d667e..1c3babb8f 100644 --- a/ishtar_common/context_processors.py +++ b/ishtar_common/context_processors.py @@ -50,8 +50,7 @@ def get_base_context(request): menu.init() if menu.selected_idx is not None: dct['current_theme'] = "theme-%d" % (menu.selected_idx + 1) - request.session['MENU'] = menu - dct['MENU'] = request.session['MENU'] + dct['MENU'] = menu dct['JQUERY_URL'] = settings.JQUERY_URL dct['JQUERY_UI_URL'] = settings.JQUERY_UI_URL dct['COUNTRY'] = settings.COUNTRY diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py index 2ab5ba28f..fa8c6a2e0 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2013-2015 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2013-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -36,11 +36,28 @@ from django.db.models import Q from django.template.defaultfilters import slugify from django.utils.translation import ugettext_lazy as _ +from ishtar_common.utils import get_all_field_names + + NEW_LINE_BREAK = '#####@@@#####' RE_FILTER_CEDEX = re.compile("(.*) *(?: *CEDEX|cedex|Cedex|Cédex|cédex *\d*)") +def post_importer_action(func): + def wrapper(self, context, value): + return func(self, context, value) + wrapper.importer_trigger = 'post' + return wrapper + + +def pre_importer_action(func): + def wrapper(self, context, value): + return func(self, context, value) + wrapper.importer_trigger = 'pre' + return wrapper + + class ImportFormater(object): def __init__(self, field_name, formater=None, required=True, through=None, through_key=None, through_dict=None, @@ -343,7 +360,7 @@ class StrChoiceFormater(Formater, ChoiceChecker): if hasattr(value, 'pk'): value = value.pk q['value'] = value - with transaction.commit_on_success(): + with transaction.atomic(): try: t, created = TargetKey.objects.get_or_create(**q) except IntegrityError: @@ -405,7 +422,7 @@ class StrChoiceFormater(Formater, ChoiceChecker): target.is_set = True target.save() else: - with transaction.commit_on_success(): + with transaction.atomic(): q['value'] = self.equiv_dict[value] q['is_set'] = True try: @@ -419,7 +436,7 @@ class StrChoiceFormater(Formater, ChoiceChecker): 'associated_import': import_instance} if TargetKey.objects.filter(**q).count(): continue - with transaction.commit_on_success(): + with transaction.atomic(): try: TargetKey.objects.create(**q) except IntegrityError: @@ -473,7 +490,7 @@ class TypeFormater(StrChoiceFormater): values = copy.copy(self.defaults) values['label'] = value values['txt_idx'] = slugify(value) - if 'order' in self.model._meta.get_all_field_names(): + if 'order' in get_all_field_names(self.model): order = 1 q = self.model.objects.values('order').order_by('-order') if q.count(): @@ -812,7 +829,7 @@ class Importer(object): self.output = output if not self.history_modifier: if self.import_instance: - self.history_modifier = self.import_instance.user + self.history_modifier = self.import_instance.user.user_ptr else: # import made by the CLI: get the first admin self.history_modifier = User.objects.filter( @@ -825,6 +842,8 @@ class Importer(object): for related_key in item.RELATED_POST_PROCESS: for related in getattr(item, related_key).all(): related.save() + for func, context, value in self._item_post_processing: + getattr(item, func)(context, value) return item def initialize(self, table, output='silent', choose_default=False): @@ -990,6 +1009,7 @@ class Importer(object): return self._throughs = [] # list of (formater, value) self._post_processing = [] # list of (formater, value) + self._item_post_processing = [] data = {} # keep in database the raw line for testing purpose @@ -1026,8 +1046,7 @@ class Importer(object): if self.test: return # manage unicity of items (mainly for updates) - if 'history_modifier' in \ - self.OBJECT_CLS._meta.get_all_field_names(): + if 'history_modifier' in get_all_field_names(self.OBJECT_CLS): data['history_modifier'] = self.history_modifier obj, created = self.get_object(self.OBJECT_CLS, data) @@ -1096,7 +1115,7 @@ class Importer(object): for formater, val in self._post_processing: formater.post_process(obj, data, val, owner=self.history_modifier) - obj = self.post_processing(obj, data) + self.post_processing(obj, data) def _row_processing(self, c_row, idx_col, idx_line, val, data): if idx_col >= len(self.line_format): @@ -1239,162 +1258,241 @@ class Importer(object): concat_str=concat_str[idx]) c_row.append(u" ; ".join([v for v in c_values])) + def _get_field_m2m(self, attribute, data, c_path, new_created, + field_object): + """ + Manage and m2m field from raw data + + :param attribute: attribute name + :param data: current data dictionary + :param c_path: attribute path from the main model point of view + :param new_created: dict of forced newly created items to prevent + multiple creation + :param field_object: django field object for this attribute + :return: None + """ + m2ms = [] + + many_values = data.pop(attribute) + if hasattr(field_object, 'rel'): + model = field_object.rel.to + elif hasattr(field_object, 'to'): + model = field_object.to + elif hasattr(field_object, 'model'): + model = field_object.model + if type(many_values) not in (list, tuple): + many_values = [many_values] + + for val in many_values: + if val.__class__ == model: + # the value is a model instance: it is OK! + m2ms.append((attribute, val)) + continue + if type(val) != dict: + # value is not a dict, we don't know what to do with it... + continue + vals = [] + + # contruct many dict for each values + default_dict = {} + + # # get default values + p = [attribute] + if c_path: + p = list(c_path) + p + p = tuple(p) + if p in self._defaults: + for k in self._defaults[p]: + default_dict[k] = self._defaults[p][k] + + # # init with simple values that will be duplicated + for key in val.keys(): + if type(val[key]) not in (list, tuple): + default_dict[key] = val[key] + vals.append(default_dict.copy()) + + # # manage multiple values + for key in val.keys(): + if type(val[key]) in (list, tuple): + for idx, v in enumerate(val[key]): + if len(vals) <= idx: + vals.append(default_dict.copy()) + vals[idx][key] = v + + # check that m2m are not empty + notempty = False + for dct in vals: + for k in dct: + if dct[k] not in ("", None): + notempty = True + break + if not notempty: + continue + + field_names = get_all_field_names(model) + for v in vals: + if 'history_modifier' in field_names: + if 'defaults' not in v: + v['defaults'] = {} + v['defaults']['history_modifier'] = \ + self.history_modifier + m2m_m2ms = [] + c_c_path = c_path[:] + for k in v.keys(): + if k not in field_names: + continue + self.get_field(model, k, v, m2m_m2ms, c_c_path, + new_created) + if '__force_new' in v: + created = v.pop('__force_new') + key = u";".join([u"{}-{}".format(k, v[k]) + for k in sorted(v.keys())]) + # only one forced creation + if attribute in new_created \ + and key in new_created[attribute]: + continue + if attribute not in new_created: + new_created[attribute] = [] + new_created[attribute].append(key) + has_values = bool([1 for k in v if v[k]]) + if has_values: + if self.MODEL_CREATION_LIMIT and \ + model not in self.MODEL_CREATION_LIMIT: + raise self._get_improperly_conf_error(model) + v = model.objects.create(**v) + else: + continue + else: + v['defaults'] = v.get('defaults', {}) + extra_fields = {} + # "File" type is a temp object and can be different + # for the same filename - it must be treated + # separately + for field in model._meta.fields: + k = field.name + # attr_class is a FileField attribute + if hasattr(field, 'attr_class') and k in v: + extra_fields[k] = v.pop(k) + created = False + if not self.MODEL_CREATION_LIMIT or \ + model in self.MODEL_CREATION_LIMIT: + v, created = model.objects.get_or_create( + **v) + else: + get_v = v.copy() + if 'defaults' in get_v: + get_v.pop('defaults') + try: + v = model.objects.get(**get_v) + except model.DoesNotExist: + raise self._get_does_not_exist_in_db_error( + model, get_v) + changed = False + for k in extra_fields.keys(): + if extra_fields[k]: + changed = True + setattr(v, k, extra_fields[k]) + if changed: + v.save() + for att, objs in m2m_m2ms: + if type(objs) not in (list, tuple): + objs = [objs] + for obj in objs: + getattr(v, att).add(obj) + if self.import_instance \ + and hasattr(v, 'imports') and created: + v.imports.add(self.import_instance) + m2ms.append((attribute, v)) + return m2ms + + def _set_importer_trigger(self, cls, attribute, data): + """ + An importer trigger is used. Stock it for later execution and remove + it from current data dict. + + :param cls: current model + :param attribute: attribute name + :param data: current data dictionary + :return: None + """ + func = getattr(cls, attribute) + if func.importer_trigger == 'pre': + pass # TODO + elif func.importer_trigger == 'post': + self._item_post_processing.append([attribute, data, + data[attribute]]) + else: + logger.warning("Unknow importer_trigger '{}' for '{}'".format( + func.importer_trigger, attribute + )) + data.pop(attribute) + def get_field(self, cls, attribute, data, m2ms, c_path, new_created): + """ + Get field from raw data + + :param cls: current model + :param attribute: attribute name + :param data: current data dictionary + :param m2ms: many to many list of tuple: (m2m key, m2m value) + :param c_path: attribute path from the main model point of view + :param new_created: dict of forced newly created items to prevent + multiple creation + :return: None + """ + if hasattr(cls, attribute) and \ + getattr(getattr(cls, attribute), 'importer_trigger', None): + # importer trigger + self._set_importer_trigger(cls, attribute, data) + return try: - field_object, model, direct, m2m = \ - cls._meta.get_field_by_name(attribute) + field_object = cls._meta.get_field(attribute) except FieldDoesNotExist: raise ImporterError(unicode( _(u"Importer configuration error: field \"{}\" does not exist " u"for {}.")).format(attribute, cls._meta.verbose_name)) - if m2m: - many_values = data.pop(attribute) - if hasattr(field_object, 'rel'): - model = field_object.rel.to - elif hasattr(field_object, 'to'): - model = field_object.to - elif hasattr(field_object, 'model'): - model = field_object.model - if type(many_values) not in (list, tuple): - many_values = [many_values] - for val in many_values: - if val.__class__ == model: - m2ms.append((attribute, val)) - elif val.__class__ != model and type(val) == dict: - vals = [] - - # contruct many dict for each values - default_dict = {} - - # # get default values - p = [attribute] - if c_path: - p = list(c_path) + p - p = tuple(p) - if p in self._defaults: - for k in self._defaults[p]: - default_dict[k] = self._defaults[p][k] - # # init with simple values that will be duplicated - for key in val.keys(): - if type(val[key]) not in (list, tuple): - default_dict[key] = val[key] - vals.append(default_dict.copy()) - # # manage multiple values - for key in val.keys(): - if type(val[key]) in (list, tuple): - for idx, v in enumerate(val[key]): - if len(vals) <= idx: - vals.append(default_dict.copy()) - vals[idx][key] = v - - # check that m2m are not empty - notempty = False - for dct in vals: - for k in dct: - if dct[k] not in ("", None): - notempty = True - break - if not notempty: - continue - - field_names = model._meta.get_all_field_names() - for v in vals: - if 'history_modifier' in field_names: - if 'defaults' not in v: - v['defaults'] = {} - v['defaults']['history_modifier'] = \ - self.history_modifier - m2m_m2ms = [] - c_c_path = c_path[:] - for k in v.keys(): - if k not in field_names: - continue - self.get_field(model, k, v, m2m_m2ms, c_c_path, - new_created) - if '__force_new' in v: - created = v.pop('__force_new') - key = u";".join([u"{}-{}".format(k, v[k]) - for k in sorted(v.keys())]) - # only one forced creation - if attribute in new_created \ - and key in new_created[attribute]: - continue - if attribute not in new_created: - new_created[attribute] = [] - new_created[attribute].append(key) - has_values = bool([1 for k in v if v[k]]) - if has_values: - if self.MODEL_CREATION_LIMIT and \ - model not in self.MODEL_CREATION_LIMIT: - raise self._get_improperly_conf_error(model) - v = model.objects.create(**v) - else: - continue - else: - v['defaults'] = v.get('defaults', {}) - extra_fields = {} - # "File" type is a temp object and can be different - # for the same filename - it must be treated - # separately - for field in model._meta.fields: - k = field.name - # attr_class is a FileField attribute - if hasattr(field, 'attr_class') and k in v: - extra_fields[k] = v.pop(k) - if not self.MODEL_CREATION_LIMIT or \ - model in self.MODEL_CREATION_LIMIT: - v, created = model.objects.get_or_create( - **v) - else: - get_v = v.copy() - if 'defaults' in get_v: - get_v.pop('defaults') - try: - v = model.objects.get(**get_v) - except model.DoesNotExist: - raise self._get_does_not_exist_in_db_error( - model, get_v) - changed = False - for k in extra_fields.keys(): - if extra_fields[k]: - changed = True - setattr(v, k, extra_fields[k]) - if changed: - v.save() - for att, objs in m2m_m2ms: - if type(objs) not in (list, tuple): - objs = [objs] - for obj in objs: - getattr(v, att).add(obj) - if self.import_instance \ - and hasattr(v, 'imports') and created: - v.imports.add(self.import_instance) - m2ms.append((attribute, v)) - elif hasattr(field_object, 'rel') and field_object.rel: - if type(data[attribute]) == dict: - # put history_modifier for every created item - if 'history_modifier' in \ - field_object.rel.to._meta.get_all_field_names(): - data[attribute]['history_modifier'] = \ - self.history_modifier - try: - c_path.append(attribute) - data[attribute], created = self.get_object( - field_object.rel.to, data[attribute].copy(), c_path) - except ImporterError, msg: - self.errors.append((self.idx_line, None, msg)) - data[attribute] = None - elif type(data[attribute]) == list: - data[attribute] = data[attribute][0] + if field_object.many_to_many: + m2ms += self._get_field_m2m(attribute, data, c_path, + new_created, field_object) + return + if not hasattr(field_object, 'rel') or not field_object.rel: + return + if type(data[attribute]) == list: + # extract the first item from list + # be careful if the list has more than one item this is arbitrary + if len(data[attribute]) > 1: + logger.warning( + 'Import {}: {} has many when only one is expected. Get ' + 'the first one but it is not OK!'.format( + self.import_instance, attribute)) + data[attribute] = data[attribute][0] + return + if type(data[attribute]) != dict: + # we treat only dict formated values + return + # put history_modifier for every created item + if 'history_modifier' in get_all_field_names(field_object.rel.to): + data[attribute]['history_modifier'] = \ + self.history_modifier + try: + c_path.append(attribute) + data[attribute], created = self.get_object( + field_object.rel.to, data[attribute].copy(), c_path) + except ImporterError, msg: + self.errors.append((self.idx_line, None, msg)) + data[attribute] = None def get_object(self, cls, data, path=[]): m2ms = [] if type(data) != dict: + # if data is not a dict we don't know what to do return data, False + is_empty = not bool( [k for k in data if k not in ('history_modifier', 'defaults') and data[k]]) if is_empty: + # if no value, no creation return None, False c_path = path[:] @@ -1408,9 +1506,8 @@ class Importer(object): data.pop(attribute) continue if not data[attribute]: - field_object, model, direct, m2m = \ - cls._meta.get_field_by_name(attribute) - if m2m: + field_object = cls._meta.get_field(attribute) + if field_object.many_to_many: data.pop(attribute) continue if attribute != '__force_new': @@ -1436,7 +1533,7 @@ class Importer(object): if type(create_dict[k]) == dict: create_dict.pop(k) # File doesn't like deepcopy - if type(create_dict[k]) == File: + elif type(create_dict[k]) == File: create_dict[k] = copy.copy(data[k]) # default values diff --git a/ishtar_common/fixtures/groups_person_types-SRA-fr.json b/ishtar_common/fixtures/groups_person_types-SRA-fr.json deleted file mode 100644 index 92fabaccd..000000000 --- a/ishtar_common/fixtures/groups_person_types-SRA-fr.json +++ /dev/null @@ -1,2812 +0,0 @@ -[ - { - "pk": 10, - "model": "auth.permission", - "fields": { - "codename": "add_logentry", - "name": "Can add log entry", - "content_type": 4 - } - }, - { - "pk": 11, - "model": "auth.permission", - "fields": { - "codename": "change_logentry", - "name": "Can change log entry", - "content_type": 4 - } - }, - { - "pk": 12, - "model": "auth.permission", - "fields": { - "codename": "delete_logentry", - "name": "Can delete log entry", - "content_type": 4 - } - }, - { - "pk": 160, - "model": "auth.permission", - "fields": { - "codename": "add_activitytype", - "name": "Can add Type Activity", - "content_type": 47 - } - }, - { - "pk": 161, - "model": "auth.permission", - "fields": { - "codename": "change_activitytype", - "name": "Can change Type Activity", - "content_type": 47 - } - }, - { - "pk": 162, - "model": "auth.permission", - "fields": { - "codename": "delete_activitytype", - "name": "Can delete Type Activity", - "content_type": 47 - } - }, - { - "pk": 169, - "model": "auth.permission", - "fields": { - "codename": "add_contextrecord", - "name": "Can add Context Record", - "content_type": 50 - } - }, - { - "pk": 173, - "model": "auth.permission", - "fields": { - "codename": "add_own_contextrecord", - "name": "Can add own Context Record", - "content_type": 50 - } - }, - { - "pk": 170, - "model": "auth.permission", - "fields": { - "codename": "change_contextrecord", - "name": "Can change Context Record", - "content_type": 50 - } - }, - { - "pk": 174, - "model": "auth.permission", - "fields": { - "codename": "change_own_contextrecord", - "name": "Can change own Context Record", - "content_type": 50 - } - }, - { - "pk": 171, - "model": "auth.permission", - "fields": { - "codename": "delete_contextrecord", - "name": "Can delete Context Record", - "content_type": 50 - } - }, - { - "pk": 175, - "model": "auth.permission", - "fields": { - "codename": "delete_own_contextrecord", - "name": "Can delete own Context Record", - "content_type": 50 - } - }, - { - "pk": 243, - "model": "auth.permission", - "fields": { - "codename": "view_contextrecord", - "name": "Can view all Context Records", - "content_type": 50 - } - }, - { - "pk": 172, - "model": "auth.permission", - "fields": { - "codename": "view_own_contextrecord", - "name": "Can view own Context Record", - "content_type": 50 - } - }, - { - "pk": 176, - "model": "auth.permission", - "fields": { - "codename": "add_contextrecordsource", - "name": "Can add Context record documentation", - "content_type": 51 - } - }, - { - "pk": 177, - "model": "auth.permission", - "fields": { - "codename": "change_contextrecordsource", - "name": "Can change Context record documentation", - "content_type": 51 - } - }, - { - "pk": 178, - "model": "auth.permission", - "fields": { - "codename": "delete_contextrecordsource", - "name": "Can delete Context record documentation", - "content_type": 51 - } - }, - { - "pk": 154, - "model": "auth.permission", - "fields": { - "codename": "add_dating", - "name": "Can add Dating", - "content_type": 45 - } - }, - { - "pk": 155, - "model": "auth.permission", - "fields": { - "codename": "change_dating", - "name": "Can change Dating", - "content_type": 45 - } - }, - { - "pk": 156, - "model": "auth.permission", - "fields": { - "codename": "delete_dating", - "name": "Can delete Dating", - "content_type": 45 - } - }, - { - "pk": 151, - "model": "auth.permission", - "fields": { - "codename": "add_datingquality", - "name": "Can add Dating quality", - "content_type": 44 - } - }, - { - "pk": 152, - "model": "auth.permission", - "fields": { - "codename": "change_datingquality", - "name": "Can change Dating quality", - "content_type": 44 - } - }, - { - "pk": 153, - "model": "auth.permission", - "fields": { - "codename": "delete_datingquality", - "name": "Can delete Dating quality", - "content_type": 44 - } - }, - { - "pk": 148, - "model": "auth.permission", - "fields": { - "codename": "add_datingtype", - "name": "Can add Dating type", - "content_type": 43 - } - }, - { - "pk": 149, - "model": "auth.permission", - "fields": { - "codename": "change_datingtype", - "name": "Can change Dating type", - "content_type": 43 - } - }, - { - "pk": 150, - "model": "auth.permission", - "fields": { - "codename": "delete_datingtype", - "name": "Can delete Dating type", - "content_type": 43 - } - }, - { - "pk": 166, - "model": "auth.permission", - "fields": { - "codename": "add_historicalcontextrecord", - "name": "Can add historical context record", - "content_type": 49 - } - }, - { - "pk": 167, - "model": "auth.permission", - "fields": { - "codename": "change_historicalcontextrecord", - "name": "Can change historical context record", - "content_type": 49 - } - }, - { - "pk": 168, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalcontextrecord", - "name": "Can delete historical context record", - "content_type": 49 - } - }, - { - "pk": 163, - "model": "auth.permission", - "fields": { - "codename": "add_identificationtype", - "name": "Can add Type Identification", - "content_type": 48 - } - }, - { - "pk": 164, - "model": "auth.permission", - "fields": { - "codename": "change_identificationtype", - "name": "Can change Type Identification", - "content_type": 48 - } - }, - { - "pk": 165, - "model": "auth.permission", - "fields": { - "codename": "delete_identificationtype", - "name": "Can delete Type Identification", - "content_type": 48 - } - }, - { - "pk": 157, - "model": "auth.permission", - "fields": { - "codename": "add_unit", - "name": "Can add Type Unit", - "content_type": 46 - } - }, - { - "pk": 158, - "model": "auth.permission", - "fields": { - "codename": "change_unit", - "name": "Can change Type Unit", - "content_type": 46 - } - }, - { - "pk": 159, - "model": "auth.permission", - "fields": { - "codename": "delete_unit", - "name": "Can delete Type Unit", - "content_type": 46 - } - }, - { - "pk": 94, - "model": "auth.permission", - "fields": { - "codename": "add_file", - "name": "Can add Archaeological file", - "content_type": 29 - } - }, - { - "pk": 98, - "model": "auth.permission", - "fields": { - "codename": "add_own_file", - "name": "Can add own Archaelogical file", - "content_type": 29 - } - }, - { - "pk": 95, - "model": "auth.permission", - "fields": { - "codename": "change_file", - "name": "Can change Archaeological file", - "content_type": 29 - } - }, - { - "pk": 99, - "model": "auth.permission", - "fields": { - "codename": "change_own_file", - "name": "Can change own Archaelogical file", - "content_type": 29 - } - }, - { - "pk": 264, - "model": "auth.permission", - "fields": { - "codename": "close_file", - "name": "Can close File", - "content_type": 29 - } - }, - { - "pk": 96, - "model": "auth.permission", - "fields": { - "codename": "delete_file", - "name": "Can delete Archaeological file", - "content_type": 29 - } - }, - { - "pk": 100, - "model": "auth.permission", - "fields": { - "codename": "delete_own_file", - "name": "Can delete own Archaelogical file", - "content_type": 29 - } - }, - { - "pk": 241, - "model": "auth.permission", - "fields": { - "codename": "view_file", - "name": "Can view all Archaelogical files", - "content_type": 29 - } - }, - { - "pk": 97, - "model": "auth.permission", - "fields": { - "codename": "view_own_file", - "name": "Can view own Archaelogical file", - "content_type": 29 - } - }, - { - "pk": 101, - "model": "auth.permission", - "fields": { - "codename": "add_filebydepartment", - "name": "Can add file by department", - "content_type": 30 - } - }, - { - "pk": 102, - "model": "auth.permission", - "fields": { - "codename": "change_filebydepartment", - "name": "Can change file by department", - "content_type": 30 - } - }, - { - "pk": 103, - "model": "auth.permission", - "fields": { - "codename": "delete_filebydepartment", - "name": "Can delete file by department", - "content_type": 30 - } - }, - { - "pk": 82, - "model": "auth.permission", - "fields": { - "codename": "add_filetype", - "name": "Can add Archaeological file type", - "content_type": 25 - } - }, - { - "pk": 83, - "model": "auth.permission", - "fields": { - "codename": "change_filetype", - "name": "Can change Archaeological file type", - "content_type": 25 - } - }, - { - "pk": 84, - "model": "auth.permission", - "fields": { - "codename": "delete_filetype", - "name": "Can delete Archaeological file type", - "content_type": 25 - } - }, - { - "pk": 91, - "model": "auth.permission", - "fields": { - "codename": "add_historicalfile", - "name": "Can add historical file", - "content_type": 28 - } - }, - { - "pk": 92, - "model": "auth.permission", - "fields": { - "codename": "change_historicalfile", - "name": "Can change historical file", - "content_type": 28 - } - }, - { - "pk": 93, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalfile", - "name": "Can delete historical file", - "content_type": 28 - } - }, - { - "pk": 85, - "model": "auth.permission", - "fields": { - "codename": "add_permittype", - "name": "Can add Permit type", - "content_type": 26 - } - }, - { - "pk": 86, - "model": "auth.permission", - "fields": { - "codename": "change_permittype", - "name": "Can change Permit type", - "content_type": 26 - } - }, - { - "pk": 87, - "model": "auth.permission", - "fields": { - "codename": "delete_permittype", - "name": "Can delete Permit type", - "content_type": 26 - } - }, - { - "pk": 88, - "model": "auth.permission", - "fields": { - "codename": "add_saisinetype", - "name": "Can add Type Saisine", - "content_type": 27 - } - }, - { - "pk": 89, - "model": "auth.permission", - "fields": { - "codename": "change_saisinetype", - "name": "Can change Type Saisine", - "content_type": 27 - } - }, - { - "pk": 90, - "model": "auth.permission", - "fields": { - "codename": "delete_saisinetype", - "name": "Can delete Type Saisine", - "content_type": 27 - } - }, - { - "pk": 201, - "model": "auth.permission", - "fields": { - "codename": "add_basefind", - "name": "Can add Base find", - "content_type": 58 - } - }, - { - "pk": 205, - "model": "auth.permission", - "fields": { - "codename": "add_own_basefind", - "name": "Can add own Base find", - "content_type": 58 - } - }, - { - "pk": 202, - "model": "auth.permission", - "fields": { - "codename": "change_basefind", - "name": "Can change Base find", - "content_type": 58 - } - }, - { - "pk": 206, - "model": "auth.permission", - "fields": { - "codename": "change_own_basefind", - "name": "Can change own Base find", - "content_type": 58 - } - }, - { - "pk": 203, - "model": "auth.permission", - "fields": { - "codename": "delete_basefind", - "name": "Can delete Base find", - "content_type": 58 - } - }, - { - "pk": 207, - "model": "auth.permission", - "fields": { - "codename": "delete_own_basefind", - "name": "Can delete own Base find", - "content_type": 58 - } - }, - { - "pk": 242, - "model": "auth.permission", - "fields": { - "codename": "view_basefind", - "name": "Can view all Base finds", - "content_type": 58 - } - }, - { - "pk": 204, - "model": "auth.permission", - "fields": { - "codename": "view_own_basefind", - "name": "Can view own Base find", - "content_type": 58 - } - }, - { - "pk": 249, - "model": "auth.permission", - "fields": { - "codename": "add_conservatorystate", - "name": "Can add Conservatory state", - "content_type": 67 - } - }, - { - "pk": 250, - "model": "auth.permission", - "fields": { - "codename": "change_conservatorystate", - "name": "Can change Conservatory state", - "content_type": 67 - } - }, - { - "pk": 251, - "model": "auth.permission", - "fields": { - "codename": "delete_conservatorystate", - "name": "Can delete Conservatory state", - "content_type": 67 - } - }, - { - "pk": 211, - "model": "auth.permission", - "fields": { - "codename": "add_find", - "name": "Can add Find", - "content_type": 60 - } - }, - { - "pk": 215, - "model": "auth.permission", - "fields": { - "codename": "add_own_find", - "name": "Can add own Find", - "content_type": 60 - } - }, - { - "pk": 212, - "model": "auth.permission", - "fields": { - "codename": "change_find", - "name": "Can change Find", - "content_type": 60 - } - }, - { - "pk": 216, - "model": "auth.permission", - "fields": { - "codename": "change_own_find", - "name": "Can change own Find", - "content_type": 60 - } - }, - { - "pk": 213, - "model": "auth.permission", - "fields": { - "codename": "delete_find", - "name": "Can delete Find", - "content_type": 60 - } - }, - { - "pk": 217, - "model": "auth.permission", - "fields": { - "codename": "delete_own_find", - "name": "Can delete own Find", - "content_type": 60 - } - }, - { - "pk": 244, - "model": "auth.permission", - "fields": { - "codename": "view_find", - "name": "Can view all Finds", - "content_type": 60 - } - }, - { - "pk": 214, - "model": "auth.permission", - "fields": { - "codename": "view_own_find", - "name": "Can view own Find", - "content_type": 60 - } - }, - { - "pk": 218, - "model": "auth.permission", - "fields": { - "codename": "add_findsource", - "name": "Can add Find documentation", - "content_type": 61 - } - }, - { - "pk": 219, - "model": "auth.permission", - "fields": { - "codename": "change_findsource", - "name": "Can change Find documentation", - "content_type": 61 - } - }, - { - "pk": 220, - "model": "auth.permission", - "fields": { - "codename": "delete_findsource", - "name": "Can delete Find documentation", - "content_type": 61 - } - }, - { - "pk": 198, - "model": "auth.permission", - "fields": { - "codename": "add_historicalbasefind", - "name": "Can add historical base find", - "content_type": 57 - } - }, - { - "pk": 199, - "model": "auth.permission", - "fields": { - "codename": "change_historicalbasefind", - "name": "Can change historical base find", - "content_type": 57 - } - }, - { - "pk": 200, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalbasefind", - "name": "Can delete historical base find", - "content_type": 57 - } - }, - { - "pk": 208, - "model": "auth.permission", - "fields": { - "codename": "add_historicalfind", - "name": "Can add historical find", - "content_type": 59 - } - }, - { - "pk": 209, - "model": "auth.permission", - "fields": { - "codename": "change_historicalfind", - "name": "Can change historical find", - "content_type": 59 - } - }, - { - "pk": 210, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalfind", - "name": "Can delete historical find", - "content_type": 59 - } - }, - { - "pk": 224, - "model": "auth.permission", - "fields": { - "codename": "add_historicaltreatment", - "name": "Can add historical treatment", - "content_type": 63 - } - }, - { - "pk": 225, - "model": "auth.permission", - "fields": { - "codename": "change_historicaltreatment", - "name": "Can change historical treatment", - "content_type": 63 - } - }, - { - "pk": 226, - "model": "auth.permission", - "fields": { - "codename": "delete_historicaltreatment", - "name": "Can delete historical treatment", - "content_type": 63 - } - }, - { - "pk": 195, - "model": "auth.permission", - "fields": { - "codename": "add_materialtype", - "name": "Can add Material type", - "content_type": 56 - } - }, - { - "pk": 196, - "model": "auth.permission", - "fields": { - "codename": "change_materialtype", - "name": "Can change Material type", - "content_type": 56 - } - }, - { - "pk": 197, - "model": "auth.permission", - "fields": { - "codename": "delete_materialtype", - "name": "Can delete Material type", - "content_type": 56 - } - }, - { - "pk": 237, - "model": "auth.permission", - "fields": { - "codename": "add_property", - "name": "Can add Property", - "content_type": 66 - } - }, - { - "pk": 238, - "model": "auth.permission", - "fields": { - "codename": "change_property", - "name": "Can change Property", - "content_type": 66 - } - }, - { - "pk": 239, - "model": "auth.permission", - "fields": { - "codename": "delete_property", - "name": "Can delete Property", - "content_type": 66 - } - }, - { - "pk": 231, - "model": "auth.permission", - "fields": { - "codename": "add_own_treatment", - "name": "Can add own Treatment", - "content_type": 64 - } - }, - { - "pk": 227, - "model": "auth.permission", - "fields": { - "codename": "add_treatment", - "name": "Can add Treatment", - "content_type": 64 - } - }, - { - "pk": 232, - "model": "auth.permission", - "fields": { - "codename": "change_own_treatment", - "name": "Can change own Treatment", - "content_type": 64 - } - }, - { - "pk": 228, - "model": "auth.permission", - "fields": { - "codename": "change_treatment", - "name": "Can change Treatment", - "content_type": 64 - } - }, - { - "pk": 233, - "model": "auth.permission", - "fields": { - "codename": "delete_own_treatment", - "name": "Can delete own Treatment", - "content_type": 64 - } - }, - { - "pk": 229, - "model": "auth.permission", - "fields": { - "codename": "delete_treatment", - "name": "Can delete Treatment", - "content_type": 64 - } - }, - { - "pk": 230, - "model": "auth.permission", - "fields": { - "codename": "view_own_treatment", - "name": "Can view own Treatment", - "content_type": 64 - } - }, - { - "pk": 247, - "model": "auth.permission", - "fields": { - "codename": "view_treatment", - "name": "Can view all Treatments", - "content_type": 64 - } - }, - { - "pk": 234, - "model": "auth.permission", - "fields": { - "codename": "add_treatmentsource", - "name": "Can add Treatment documentation", - "content_type": 65 - } - }, - { - "pk": 235, - "model": "auth.permission", - "fields": { - "codename": "change_treatmentsource", - "name": "Can change Treatment documentation", - "content_type": 65 - } - }, - { - "pk": 236, - "model": "auth.permission", - "fields": { - "codename": "delete_treatmentsource", - "name": "Can delete Treatment documentation", - "content_type": 65 - } - }, - { - "pk": 221, - "model": "auth.permission", - "fields": { - "codename": "add_treatmenttype", - "name": "Can add Treatment type", - "content_type": 62 - } - }, - { - "pk": 222, - "model": "auth.permission", - "fields": { - "codename": "change_treatmenttype", - "name": "Can change Treatment type", - "content_type": 62 - } - }, - { - "pk": 223, - "model": "auth.permission", - "fields": { - "codename": "delete_treatmenttype", - "name": "Can delete Treatment type", - "content_type": 62 - } - }, - { - "pk": 129, - "model": "auth.permission", - "fields": { - "codename": "add_acttype", - "name": "Can add Act type", - "content_type": 38 - } - }, - { - "pk": 130, - "model": "auth.permission", - "fields": { - "codename": "change_acttype", - "name": "Can change Act type", - "content_type": 38 - } - }, - { - "pk": 131, - "model": "auth.permission", - "fields": { - "codename": "delete_acttype", - "name": "Can delete Act type", - "content_type": 38 - } - }, - { - "pk": 135, - "model": "auth.permission", - "fields": { - "codename": "add_administrativeact", - "name": "Can add Administrative act", - "content_type": 40 - } - }, - { - "pk": 139, - "model": "auth.permission", - "fields": { - "codename": "add_own_administrativeact", - "name": "Can add own Administrative act", - "content_type": 40 - } - }, - { - "pk": 136, - "model": "auth.permission", - "fields": { - "codename": "change_administrativeact", - "name": "Can change Administrative act", - "content_type": 40 - } - }, - { - "pk": 140, - "model": "auth.permission", - "fields": { - "codename": "change_own_administrativeact", - "name": "Can change own Administrative act", - "content_type": 40 - } - }, - { - "pk": 137, - "model": "auth.permission", - "fields": { - "codename": "delete_administrativeact", - "name": "Can delete Administrative act", - "content_type": 40 - } - }, - { - "pk": 141, - "model": "auth.permission", - "fields": { - "codename": "delete_own_administrativeact", - "name": "Can delete own Administrative act", - "content_type": 40 - } - }, - { - "pk": 240, - "model": "auth.permission", - "fields": { - "codename": "view_administrativeact", - "name": "Can view all Administrative acts", - "content_type": 40 - } - }, - { - "pk": 138, - "model": "auth.permission", - "fields": { - "codename": "view_own_administrativeact", - "name": "Can view own Administrative act", - "content_type": 40 - } - }, - { - "pk": 255, - "model": "auth.permission", - "fields": { - "codename": "add_archaeologicalsite", - "name": "Can add Archaeological site", - "content_type": 69 - } - }, - { - "pk": 260, - "model": "auth.permission", - "fields": { - "codename": "add_own_archaeologicalsite", - "name": "Can add own Archaeological site", - "content_type": 69 - } - }, - { - "pk": 256, - "model": "auth.permission", - "fields": { - "codename": "change_archaeologicalsite", - "name": "Can change Archaeological site", - "content_type": 69 - } - }, - { - "pk": 261, - "model": "auth.permission", - "fields": { - "codename": "change_own_archaeologicalsite", - "name": "Can change own Archaeological site", - "content_type": 69 - } - }, - { - "pk": 257, - "model": "auth.permission", - "fields": { - "codename": "delete_archaeologicalsite", - "name": "Can delete Archaeological site", - "content_type": 69 - } - }, - { - "pk": 262, - "model": "auth.permission", - "fields": { - "codename": "delete_own_archaeologicalsite", - "name": "Can delete own Archaeological site", - "content_type": 69 - } - }, - { - "pk": 258, - "model": "auth.permission", - "fields": { - "codename": "view_archaeologicalsite", - "name": "Can view all Archaeological sites", - "content_type": 69 - } - }, - { - "pk": 259, - "model": "auth.permission", - "fields": { - "codename": "view_own_archaeologicalsite", - "name": "Can view own Archaeological site", - "content_type": 69 - } - }, - { - "pk": 132, - "model": "auth.permission", - "fields": { - "codename": "add_historicaladministrativeact", - "name": "Can add historical administrative act", - "content_type": 39 - } - }, - { - "pk": 133, - "model": "auth.permission", - "fields": { - "codename": "change_historicaladministrativeact", - "name": "Can change historical administrative act", - "content_type": 39 - } - }, - { - "pk": 134, - "model": "auth.permission", - "fields": { - "codename": "delete_historicaladministrativeact", - "name": "Can delete historical administrative act", - "content_type": 39 - } - }, - { - "pk": 113, - "model": "auth.permission", - "fields": { - "codename": "add_historicaloperation", - "name": "Can add historical operation", - "content_type": 34 - } - }, - { - "pk": 114, - "model": "auth.permission", - "fields": { - "codename": "change_historicaloperation", - "name": "Can change historical operation", - "content_type": 34 - } - }, - { - "pk": 115, - "model": "auth.permission", - "fields": { - "codename": "delete_historicaloperation", - "name": "Can delete historical operation", - "content_type": 34 - } - }, - { - "pk": 116, - "model": "auth.permission", - "fields": { - "codename": "add_operation", - "name": "Can add Operation", - "content_type": 35 - } - }, - { - "pk": 120, - "model": "auth.permission", - "fields": { - "codename": "add_own_operation", - "name": "Can add own Operation", - "content_type": 35 - } - }, - { - "pk": 117, - "model": "auth.permission", - "fields": { - "codename": "change_operation", - "name": "Can change Operation", - "content_type": 35 - } - }, - { - "pk": 121, - "model": "auth.permission", - "fields": { - "codename": "change_own_operation", - "name": "Can change own Operation", - "content_type": 35 - } - }, - { - "pk": 263, - "model": "auth.permission", - "fields": { - "codename": "close_operation", - "name": "Can close Operation", - "content_type": 35 - } - }, - { - "pk": 118, - "model": "auth.permission", - "fields": { - "codename": "delete_operation", - "name": "Can delete Operation", - "content_type": 35 - } - }, - { - "pk": 122, - "model": "auth.permission", - "fields": { - "codename": "delete_own_operation", - "name": "Can delete own Operation", - "content_type": 35 - } - }, - { - "pk": 245, - "model": "auth.permission", - "fields": { - "codename": "view_operation", - "name": "Can view all Operations", - "content_type": 35 - } - }, - { - "pk": 119, - "model": "auth.permission", - "fields": { - "codename": "view_own_operation", - "name": "Can view own Operation", - "content_type": 35 - } - }, - { - "pk": 123, - "model": "auth.permission", - "fields": { - "codename": "add_operationbydepartment", - "name": "Can add operation by department", - "content_type": 36 - } - }, - { - "pk": 124, - "model": "auth.permission", - "fields": { - "codename": "change_operationbydepartment", - "name": "Can change operation by department", - "content_type": 36 - } - }, - { - "pk": 125, - "model": "auth.permission", - "fields": { - "codename": "delete_operationbydepartment", - "name": "Can delete operation by department", - "content_type": 36 - } - }, - { - "pk": 126, - "model": "auth.permission", - "fields": { - "codename": "add_operationsource", - "name": "Can add Operation documentation", - "content_type": 37 - } - }, - { - "pk": 267, - "model": "auth.permission", - "fields": { - "codename": "add_own_operationsource", - "name": "Can add own Operation source", - "content_type": 37 - } - }, - { - "pk": 127, - "model": "auth.permission", - "fields": { - "codename": "change_operationsource", - "name": "Can change Operation documentation", - "content_type": 37 - } - }, - { - "pk": 268, - "model": "auth.permission", - "fields": { - "codename": "change_own_operationsource", - "name": "Can change own Operation source", - "content_type": 37 - } - }, - { - "pk": 128, - "model": "auth.permission", - "fields": { - "codename": "delete_operationsource", - "name": "Can delete Operation documentation", - "content_type": 37 - } - }, - { - "pk": 269, - "model": "auth.permission", - "fields": { - "codename": "delete_own_operationsource", - "name": "Can delete own Operation source", - "content_type": 37 - } - }, - { - "pk": 265, - "model": "auth.permission", - "fields": { - "codename": "view_operationsource", - "name": "Can view all Operation sources", - "content_type": 37 - } - }, - { - "pk": 266, - "model": "auth.permission", - "fields": { - "codename": "view_own_operationsource", - "name": "Can view own Operation source", - "content_type": 37 - } - }, - { - "pk": 142, - "model": "auth.permission", - "fields": { - "codename": "add_parcel", - "name": "Can add Parcel", - "content_type": 41 - } - }, - { - "pk": 143, - "model": "auth.permission", - "fields": { - "codename": "change_parcel", - "name": "Can change Parcel", - "content_type": 41 - } - }, - { - "pk": 144, - "model": "auth.permission", - "fields": { - "codename": "delete_parcel", - "name": "Can delete Parcel", - "content_type": 41 - } - }, - { - "pk": 145, - "model": "auth.permission", - "fields": { - "codename": "add_parcelowner", - "name": "Can add Parcel owner", - "content_type": 42 - } - }, - { - "pk": 146, - "model": "auth.permission", - "fields": { - "codename": "change_parcelowner", - "name": "Can change Parcel owner", - "content_type": 42 - } - }, - { - "pk": 147, - "model": "auth.permission", - "fields": { - "codename": "delete_parcelowner", - "name": "Can delete Parcel owner", - "content_type": 42 - } - }, - { - "pk": 110, - "model": "auth.permission", - "fields": { - "codename": "add_period", - "name": "Can add Type Period", - "content_type": 33 - } - }, - { - "pk": 111, - "model": "auth.permission", - "fields": { - "codename": "change_period", - "name": "Can change Type Period", - "content_type": 33 - } - }, - { - "pk": 112, - "model": "auth.permission", - "fields": { - "codename": "delete_period", - "name": "Can delete Type Period", - "content_type": 33 - } - }, - { - "pk": 107, - "model": "auth.permission", - "fields": { - "codename": "add_remaintype", - "name": "Can add Remain type", - "content_type": 32 - } - }, - { - "pk": 108, - "model": "auth.permission", - "fields": { - "codename": "change_remaintype", - "name": "Can change Remain type", - "content_type": 32 - } - }, - { - "pk": 109, - "model": "auth.permission", - "fields": { - "codename": "delete_remaintype", - "name": "Can delete Remain type", - "content_type": 32 - } - }, - { - "pk": 192, - "model": "auth.permission", - "fields": { - "codename": "add_container", - "name": "Can add Container", - "content_type": 55 - } - }, - { - "pk": 193, - "model": "auth.permission", - "fields": { - "codename": "change_container", - "name": "Can change Container", - "content_type": 55 - } - }, - { - "pk": 194, - "model": "auth.permission", - "fields": { - "codename": "delete_container", - "name": "Can delete Container", - "content_type": 55 - } - }, - { - "pk": 189, - "model": "auth.permission", - "fields": { - "codename": "add_containertype", - "name": "Can add Container type", - "content_type": 54 - } - }, - { - "pk": 190, - "model": "auth.permission", - "fields": { - "codename": "change_containertype", - "name": "Can change Container type", - "content_type": 54 - } - }, - { - "pk": 191, - "model": "auth.permission", - "fields": { - "codename": "delete_containertype", - "name": "Can delete Container type", - "content_type": 54 - } - }, - { - "pk": 186, - "model": "auth.permission", - "fields": { - "codename": "add_own_warehouse", - "name": "Can add own Warehouse", - "content_type": 53 - } - }, - { - "pk": 182, - "model": "auth.permission", - "fields": { - "codename": "add_warehouse", - "name": "Can add Warehouse", - "content_type": 53 - } - }, - { - "pk": 187, - "model": "auth.permission", - "fields": { - "codename": "change_own_warehouse", - "name": "Can change own Warehouse", - "content_type": 53 - } - }, - { - "pk": 183, - "model": "auth.permission", - "fields": { - "codename": "change_warehouse", - "name": "Can change Warehouse", - "content_type": 53 - } - }, - { - "pk": 188, - "model": "auth.permission", - "fields": { - "codename": "delete_own_warehouse", - "name": "Can delete own Warehouse", - "content_type": 53 - } - }, - { - "pk": 184, - "model": "auth.permission", - "fields": { - "codename": "delete_warehouse", - "name": "Can delete Warehouse", - "content_type": 53 - } - }, - { - "pk": 185, - "model": "auth.permission", - "fields": { - "codename": "view_own_warehouse", - "name": "Can view own Warehouse", - "content_type": 53 - } - }, - { - "pk": 248, - "model": "auth.permission", - "fields": { - "codename": "view_warehouse", - "name": "Can view all Warehouses", - "content_type": 53 - } - }, - { - "pk": 179, - "model": "auth.permission", - "fields": { - "codename": "add_warehousetype", - "name": "Can add Warehouse type", - "content_type": 52 - } - }, - { - "pk": 180, - "model": "auth.permission", - "fields": { - "codename": "change_warehousetype", - "name": "Can change Warehouse type", - "content_type": 52 - } - }, - { - "pk": 181, - "model": "auth.permission", - "fields": { - "codename": "delete_warehousetype", - "name": "Can delete Warehouse type", - "content_type": 52 - } - }, - { - "pk": 4, - "model": "auth.permission", - "fields": { - "codename": "add_group", - "name": "Can add group", - "content_type": 2 - } - }, - { - "pk": 5, - "model": "auth.permission", - "fields": { - "codename": "change_group", - "name": "Can change group", - "content_type": 2 - } - }, - { - "pk": 6, - "model": "auth.permission", - "fields": { - "codename": "delete_group", - "name": "Can delete group", - "content_type": 2 - } - }, - { - "pk": 1, - "model": "auth.permission", - "fields": { - "codename": "add_permission", - "name": "Can add permission", - "content_type": 1 - } - }, - { - "pk": 2, - "model": "auth.permission", - "fields": { - "codename": "change_permission", - "name": "Can change permission", - "content_type": 1 - } - }, - { - "pk": 3, - "model": "auth.permission", - "fields": { - "codename": "delete_permission", - "name": "Can delete permission", - "content_type": 1 - } - }, - { - "pk": 7, - "model": "auth.permission", - "fields": { - "codename": "add_user", - "name": "Can add user", - "content_type": 3 - } - }, - { - "pk": 8, - "model": "auth.permission", - "fields": { - "codename": "change_user", - "name": "Can change user", - "content_type": 3 - } - }, - { - "pk": 9, - "model": "auth.permission", - "fields": { - "codename": "delete_user", - "name": "Can delete user", - "content_type": 3 - } - }, - { - "pk": 13, - "model": "auth.permission", - "fields": { - "codename": "add_contenttype", - "name": "Can add content type", - "content_type": 5 - } - }, - { - "pk": 14, - "model": "auth.permission", - "fields": { - "codename": "change_contenttype", - "name": "Can change content type", - "content_type": 5 - } - }, - { - "pk": 15, - "model": "auth.permission", - "fields": { - "codename": "delete_contenttype", - "name": "Can delete content type", - "content_type": 5 - } - }, - { - "pk": 73, - "model": "auth.permission", - "fields": { - "codename": "add_arrondissement", - "name": "Can add arrondissement", - "content_type": 22 - } - }, - { - "pk": 74, - "model": "auth.permission", - "fields": { - "codename": "change_arrondissement", - "name": "Can change arrondissement", - "content_type": 22 - } - }, - { - "pk": 75, - "model": "auth.permission", - "fields": { - "codename": "delete_arrondissement", - "name": "Can delete arrondissement", - "content_type": 22 - } - }, - { - "pk": 67, - "model": "auth.permission", - "fields": { - "codename": "add_author", - "name": "Can add Author", - "content_type": 20 - } - }, - { - "pk": 68, - "model": "auth.permission", - "fields": { - "codename": "change_author", - "name": "Can change Author", - "content_type": 20 - } - }, - { - "pk": 69, - "model": "auth.permission", - "fields": { - "codename": "delete_author", - "name": "Can delete Author", - "content_type": 20 - } - }, - { - "pk": 64, - "model": "auth.permission", - "fields": { - "codename": "add_authortype", - "name": "Can add Author type", - "content_type": 19 - } - }, - { - "pk": 65, - "model": "auth.permission", - "fields": { - "codename": "change_authortype", - "name": "Can change Author type", - "content_type": 19 - } - }, - { - "pk": 66, - "model": "auth.permission", - "fields": { - "codename": "delete_authortype", - "name": "Can delete Author type", - "content_type": 19 - } - }, - { - "pk": 76, - "model": "auth.permission", - "fields": { - "codename": "add_canton", - "name": "Can add canton", - "content_type": 23 - } - }, - { - "pk": 77, - "model": "auth.permission", - "fields": { - "codename": "change_canton", - "name": "Can change canton", - "content_type": 23 - } - }, - { - "pk": 78, - "model": "auth.permission", - "fields": { - "codename": "delete_canton", - "name": "Can delete canton", - "content_type": 23 - } - }, - { - "pk": 34, - "model": "auth.permission", - "fields": { - "codename": "add_department", - "name": "Can add Department", - "content_type": 12 - } - }, - { - "pk": 35, - "model": "auth.permission", - "fields": { - "codename": "change_department", - "name": "Can change Department", - "content_type": 12 - } - }, - { - "pk": 36, - "model": "auth.permission", - "fields": { - "codename": "delete_department", - "name": "Can delete Department", - "content_type": 12 - } - }, - { - "pk": 252, - "model": "auth.permission", - "fields": { - "codename": "add_documenttemplate", - "name": "Can add Document template", - "content_type": 68 - } - }, - { - "pk": 253, - "model": "auth.permission", - "fields": { - "codename": "change_documenttemplate", - "name": "Can change Document template", - "content_type": 68 - } - }, - { - "pk": 254, - "model": "auth.permission", - "fields": { - "codename": "delete_documenttemplate", - "name": "Can delete Document template", - "content_type": 68 - } - }, - { - "pk": 40, - "model": "auth.permission", - "fields": { - "codename": "add_historicalorganization", - "name": "Can add historical organization", - "content_type": 14 - } - }, - { - "pk": 41, - "model": "auth.permission", - "fields": { - "codename": "change_historicalorganization", - "name": "Can change historical organization", - "content_type": 14 - } - }, - { - "pk": 42, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalorganization", - "name": "Can delete historical organization", - "content_type": 14 - } - }, - { - "pk": 61, - "model": "auth.permission", - "fields": { - "codename": "add_ishtaruser", - "name": "Can add Ishtar user", - "content_type": 18 - } - }, - { - "pk": 62, - "model": "auth.permission", - "fields": { - "codename": "change_ishtaruser", - "name": "Can change Ishtar user", - "content_type": 18 - } - }, - { - "pk": 63, - "model": "auth.permission", - "fields": { - "codename": "delete_ishtaruser", - "name": "Can delete Ishtar user", - "content_type": 18 - } - }, - { - "pk": 43, - "model": "auth.permission", - "fields": { - "codename": "add_organization", - "name": "Can add Organization", - "content_type": 15 - } - }, - { - "pk": 47, - "model": "auth.permission", - "fields": { - "codename": "add_own_organization", - "name": "Can add own Organization", - "content_type": 15 - } - }, - { - "pk": 44, - "model": "auth.permission", - "fields": { - "codename": "change_organization", - "name": "Can change Organization", - "content_type": 15 - } - }, - { - "pk": 48, - "model": "auth.permission", - "fields": { - "codename": "change_own_organization", - "name": "Can change own Organization", - "content_type": 15 - } - }, - { - "pk": 45, - "model": "auth.permission", - "fields": { - "codename": "delete_organization", - "name": "Can delete Organization", - "content_type": 15 - } - }, - { - "pk": 49, - "model": "auth.permission", - "fields": { - "codename": "delete_own_organization", - "name": "Can delete own Organization", - "content_type": 15 - } - }, - { - "pk": 246, - "model": "auth.permission", - "fields": { - "codename": "view_organization", - "name": "Can view all Organizations", - "content_type": 15 - } - }, - { - "pk": 46, - "model": "auth.permission", - "fields": { - "codename": "view_own_organization", - "name": "Can view own Organization", - "content_type": 15 - } - }, - { - "pk": 37, - "model": "auth.permission", - "fields": { - "codename": "add_organizationtype", - "name": "Can add Organization type", - "content_type": 13 - } - }, - { - "pk": 38, - "model": "auth.permission", - "fields": { - "codename": "change_organizationtype", - "name": "Can change Organization type", - "content_type": 13 - } - }, - { - "pk": 39, - "model": "auth.permission", - "fields": { - "codename": "delete_organizationtype", - "name": "Can delete Organization type", - "content_type": 13 - } - }, - { - "pk": 58, - "model": "auth.permission", - "fields": { - "codename": "add_own_person", - "name": "Can add own Person", - "content_type": 17 - } - }, - { - "pk": 53, - "model": "auth.permission", - "fields": { - "codename": "add_person", - "name": "Can add Person", - "content_type": 17 - } - }, - { - "pk": 59, - "model": "auth.permission", - "fields": { - "codename": "change_own_person", - "name": "Can change own Person", - "content_type": 17 - } - }, - { - "pk": 54, - "model": "auth.permission", - "fields": { - "codename": "change_person", - "name": "Can change Person", - "content_type": 17 - } - }, - { - "pk": 60, - "model": "auth.permission", - "fields": { - "codename": "delete_own_person", - "name": "Can delete own Person", - "content_type": 17 - } - }, - { - "pk": 55, - "model": "auth.permission", - "fields": { - "codename": "delete_person", - "name": "Can delete Person", - "content_type": 17 - } - }, - { - "pk": 57, - "model": "auth.permission", - "fields": { - "codename": "view_own_person", - "name": "Can view own Person", - "content_type": 17 - } - }, - { - "pk": 56, - "model": "auth.permission", - "fields": { - "codename": "view_person", - "name": "Can view Person", - "content_type": 17 - } - }, - { - "pk": 50, - "model": "auth.permission", - "fields": { - "codename": "add_persontype", - "name": "Can add Person type", - "content_type": 16 - } - }, - { - "pk": 51, - "model": "auth.permission", - "fields": { - "codename": "change_persontype", - "name": "Can change Person type", - "content_type": 16 - } - }, - { - "pk": 52, - "model": "auth.permission", - "fields": { - "codename": "delete_persontype", - "name": "Can delete Person type", - "content_type": 16 - } - }, - { - "pk": 70, - "model": "auth.permission", - "fields": { - "codename": "add_sourcetype", - "name": "Can add Source type", - "content_type": 21 - } - }, - { - "pk": 71, - "model": "auth.permission", - "fields": { - "codename": "change_sourcetype", - "name": "Can change Source type", - "content_type": 21 - } - }, - { - "pk": 72, - "model": "auth.permission", - "fields": { - "codename": "delete_sourcetype", - "name": "Can delete Source type", - "content_type": 21 - } - }, - { - "pk": 79, - "model": "auth.permission", - "fields": { - "codename": "add_town", - "name": "Can add Town", - "content_type": 24 - } - }, - { - "pk": 80, - "model": "auth.permission", - "fields": { - "codename": "change_town", - "name": "Can change Town", - "content_type": 24 - } - }, - { - "pk": 81, - "model": "auth.permission", - "fields": { - "codename": "delete_town", - "name": "Can delete Town", - "content_type": 24 - } - }, - { - "pk": 25, - "model": "auth.permission", - "fields": { - "codename": "add_registrationprofile", - "name": "Can add registration profile", - "content_type": 9 - } - }, - { - "pk": 26, - "model": "auth.permission", - "fields": { - "codename": "change_registrationprofile", - "name": "Can change registration profile", - "content_type": 9 - } - }, - { - "pk": 27, - "model": "auth.permission", - "fields": { - "codename": "delete_registrationprofile", - "name": "Can delete registration profile", - "content_type": 9 - } - }, - { - "pk": 16, - "model": "auth.permission", - "fields": { - "codename": "add_session", - "name": "Can add session", - "content_type": 6 - } - }, - { - "pk": 17, - "model": "auth.permission", - "fields": { - "codename": "change_session", - "name": "Can change session", - "content_type": 6 - } - }, - { - "pk": 18, - "model": "auth.permission", - "fields": { - "codename": "delete_session", - "name": "Can delete session", - "content_type": 6 - } - }, - { - "pk": 19, - "model": "auth.permission", - "fields": { - "codename": "add_site", - "name": "Can add site", - "content_type": 7 - } - }, - { - "pk": 20, - "model": "auth.permission", - "fields": { - "codename": "change_site", - "name": "Can change site", - "content_type": 7 - } - }, - { - "pk": 21, - "model": "auth.permission", - "fields": { - "codename": "delete_site", - "name": "Can delete site", - "content_type": 7 - } - }, - { - "pk": 22, - "model": "auth.permission", - "fields": { - "codename": "add_migrationhistory", - "name": "Can add migration history", - "content_type": 8 - } - }, - { - "pk": 23, - "model": "auth.permission", - "fields": { - "codename": "change_migrationhistory", - "name": "Can change migration history", - "content_type": 8 - } - }, - { - "pk": 24, - "model": "auth.permission", - "fields": { - "codename": "delete_migrationhistory", - "name": "Can delete migration history", - "content_type": 8 - } - }, - { - "pk": 30, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration : voir", - "permissions": [ - 265 - ] - } - }, - { - "pk": 31, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration : modification/suppression", - "permissions": [ - 127 - ] - } - }, - { - "pk": 32, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration : ajout", - "permissions": [ - 126 - ] - } - }, - { - "pk": 2, - "model": "auth.group", - "fields": { - "name": "Dossiers : voir", - "permissions": [ - 241 - ] - } - }, - { - "pk": 1, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations : voir", - "permissions": [ - 245 - ] - } - }, - { - "pk": 4, - "model": "auth.group", - "fields": { - "name": "UEs : voir", - "permissions": [ - 243 - ] - } - }, - { - "pk": 3, - "model": "auth.group", - "fields": { - "name": "Utilisateurs : voir", - "permissions": [ - 56 - ] - } - }, - { - "pk": 5, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts : voir", - "permissions": [ - 248 - ] - } - }, - { - "pk": 7, - "model": "auth.group", - "fields": { - "name": "Traitements : voir", - "permissions": [ - 247 - ] - } - }, - { - "pk": 6, - "model": "auth.group", - "fields": { - "name": "Mobilier : voir", - "permissions": [ - 242, - 244 - ] - } - }, - { - "pk": 8, - "model": "auth.group", - "fields": { - "name": "Actes administratifs : voir", - "permissions": [ - 240 - ] - } - }, - { - "pk": 9, - "model": "auth.group", - "fields": { - "name": "Actes administratifs : ajout", - "permissions": [ - 135 - ] - } - }, - { - "pk": 10, - "model": "auth.group", - "fields": { - "name": "Actes administratifs : modification/suppression", - "permissions": [ - 136, - 137 - ] - } - }, - { - "pk": 11, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts : ajout", - "permissions": [ - 182 - ] - } - }, - { - "pk": 12, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts : modification/suppression", - "permissions": [ - 183, - 184 - ] - } - }, - { - "pk": 13, - "model": "auth.group", - "fields": { - "name": "Dossiers : ajout", - "permissions": [ - 94 - ] - } - }, - { - "pk": 14, - "model": "auth.group", - "fields": { - "name": "Dossiers : modification/suppression", - "permissions": [ - 95, - 96 - ] - } - }, - { - "pk": 15, - "model": "auth.group", - "fields": { - "name": "Mobilier : ajout", - "permissions": [ - 201, - 211 - ] - } - }, - { - "pk": 16, - "model": "auth.group", - "fields": { - "name": "Mobilier : modification/suppression", - "permissions": [ - 202, - 203, - 212, - 213 - ] - } - }, - { - "pk": 17, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations : ajout", - "permissions": [ - 116 - ] - } - }, - { - "pk": 18, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations : modification/suppression", - "permissions": [ - 117, - 118 - ] - } - }, - { - "pk": 19, - "model": "auth.group", - "fields": { - "name": "Traitements : ajout", - "permissions": [ - 227 - ] - } - }, - { - "pk": 20, - "model": "auth.group", - "fields": { - "name": "Traitements : modification/suppression", - "permissions": [ - 228, - 229 - ] - } - }, - { - "pk": 21, - "model": "auth.group", - "fields": { - "name": "UEs : ajout", - "permissions": [ - 169 - ] - } - }, - { - "pk": 22, - "model": "auth.group", - "fields": { - "name": "UEs : modification/suppression", - "permissions": [ - 170, - 171 - ] - } - }, - { - "pk": 23, - "model": "auth.group", - "fields": { - "name": "Utilisateurs : ajout", - "permissions": [ - 53 - ] - } - }, - { - "pk": 24, - "model": "auth.group", - "fields": { - "name": "Utilisateurs : modification/suppression", - "permissions": [ - 54, - 55 - ] - } - }, - { - "pk": 25, - "model": "auth.group", - "fields": { - "name": "Organisations : voir", - "permissions": [ - 246 - ] - } - }, - { - "pk": 26, - "model": "auth.group", - "fields": { - "name": "Organisations : modification/suppression", - "permissions": [ - 44, - 45 - ] - } - }, - { - "pk": 27, - "model": "auth.group", - "fields": { - "name": "Organisations : ajout", - "permissions": [ - 43 - ] - } - }, - { - "pk": 28, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations : clore", - "permissions": [ - 263 - ] - } - }, - { - "pk": 29, - "model": "auth.group", - "fields": { - "name": "Dossiers : clore", - "permissions": [ - 264 - ] - } - }, - { - "pk": 7, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Un acc\u00e8s limit\u00e9 \u00e0 la base, uniquement en lecture. Apr\u00e8s enregistrement.", - "available": true, - "txt_idx": "public_access", - "groups": [], - "label": "Acc\u00e8s public" - } - }, - { - "pk": 1, - "model": "ishtar_common.persontype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "administrator", - "groups": [], - "label": "Administrateur" - } - }, - { - "pk": 3, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Responsables de dossiers d'arch\u00e9ologie", - "available": true, - "txt_idx": "sra_agent", - "groups": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 13, - 14, - 15, - 16, - 17, - 18, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32 - ], - "label": "Agent SRA (prescripteur)" - } - }, - { - "pk": 6, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Responsable de l'am\u00e9nagement", - "available": true, - "txt_idx": "general_contractor", - "groups": [], - "label": "Am\u00e9nageur" - } - }, - { - "pk": 8, - "model": "ishtar_common.persontype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "responsible_planning_service", - "groups": [], - "label": "Chef de service instructeur" - } - }, - { - "pk": 5, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Cette personne peut g\u00e9rer du mobilier qu'il n'a pas cr\u00e9\u00e9\r\n\r\n", - "available": true, - "txt_idx": "warehouse_manager", - "groups": [], - "label": "Gestionnaire de d\u00e9p\u00f4t" - } - }, - { - "pk": 2, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Article 13 D\u00e9cret 2004\r\n\r\nLe pr\u00e9fet de r\u00e9gion \u00e9dicte les prescriptions arch\u00e9ologiques, d\u00e9livre l'autorisation de fouille et d\u00e9signe le responsable scientifique de toute op\u00e9ration d'arch\u00e9ologie pr\u00e9ventive.\r\n\r\nLe responsable scientifique est l'interlocuteur du pr\u00e9fet de r\u00e9gion et le garant de la qualit\u00e9 scientifique de l'op\u00e9ration arch\u00e9ologique. A ce titre, il prend, dans le cadre de la mise en oeuvre du projet d'intervention de l'op\u00e9rateur, les d\u00e9cisions relatives \u00e0 la conduite scientifique de l'op\u00e9ration et \u00e0 l'\u00e9laboration du rapport dont il dirige la r\u00e9daction. Il peut \u00eatre diff\u00e9rent pour la r\u00e9alisation du diagnostic et pour la r\u00e9alisation de la fouille.", - "available": true, - "txt_idx": "head_scientist", - "groups": [], - "label": "Responsable scientifique" - } - }, - { - "pk": 4, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Acc\u00e8s pour les secr\u00e9taires d'un SRA", - "available": true, - "txt_idx": "secretarial_dept", - "groups": [ - 2, - 1, - 3, - 7, - 6, - 8, - 9, - 10, - 13, - 14, - 17, - 18, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "label": "Secr\u00e9tariat SRA" - } - } -] diff --git a/ishtar_common/fixtures/initial_data-fr.json b/ishtar_common/fixtures/initial_data-fr.json index b4447559e..d9026cf49 100644 --- a/ishtar_common/fixtures/initial_data-fr.json +++ b/ishtar_common/fixtures/initial_data-fr.json @@ -1,1181 +1,1667 @@ [ - { - "pk": 3, - "model": "ishtar_common.authortype", - "fields": { - "comment": "Cette personne est l'auteur principal de la source. Les autres auteurs sont des collaborateurs.", - "available": true, - "txt_idx": "main_author", - "order": 1, - "label": "Auteur principal" - } - }, - { - "pk": 2, - "model": "ishtar_common.authortype", - "fields": { - "comment": "Il y a plusieurs auteurs pour une m\u00eame source. Au m\u00eame niveau de responsabilit\u00e9.", - "available": true, - "txt_idx": "co_author", - "order": 1, - "label": "Co-auteur " - } - }, - { - "pk": 4, - "model": "ishtar_common.authortype", - "fields": { - "comment": "Cet auteur n'est pas l'auteur principal de la source mais un collaborateur. Il n'est pas auteur au m\u00eame niveau que l'auteur principal.", - "available": true, - "txt_idx": "associate_author", - "order": 1, - "label": "Collaborateur" - } - }, - { - "pk": 7, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Un acc\u00e8s limit\u00e9 - uniquement en lecture - \u00e0 la totalit\u00e9 de la base, apr\u00e8s enregistrement.", - "available": true, - "txt_idx": "reader_access", - "groups": [ - 1, - 66, - 4, - 5, - 6, - 33, - 8, - 73, - 7, - 2, - 79, - 72, - 85, - 25, - 93, - 30 - ], - "label": "Acc\u00e8s en lecture" - } - }, - { - "pk": 1, - "model": "ishtar_common.persontype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "administrator", - "groups": [ - 1, - 2, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 93, - 94, - 95, - 96, - 97, - 98 - ], - "label": "Administrateur" - } - }, - { - "pk": 6, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Responsable de l'am\u00e9nagement (pr\u00e9ventif).", - "available": true, - "txt_idx": "general_contractor", - "groups": [], - "label": "Am\u00e9nageur" - } - }, - { - "pk": 8, - "model": "ishtar_common.persontype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "responsible_planning_service", - "groups": [], - "label": "Chef de service instructeur" - } - }, - { - "pk": 9, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Peut intervenir sur les donn\u00e9es d'une op\u00e9ration sans en \u00eatre responsable.", - "available": true, - "txt_idx": "collaborator", - "groups": [ - 51, - 70, - 71, - 72, - 41, - 74, - 77, - 46, - 47, - 48, - 40, - 82, - 83, - 84, - 78, - 54, - 58, - 59, - 60, - 42, - 63 - ], - "label": "Collaborateur scientifique" - } - }, - { - "pk": 10, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Personne demandant une action sur le mobilier (traitements).", - "available": true, - "txt_idx": "applicant", - "groups": [], - "label": "Demandeur" - } - }, - { - "pk": 5, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Peut g\u00e9rer du mobilier qu'il n'a pas cr\u00e9\u00e9.\r\n\r\n", - "available": true, - "txt_idx": "warehouse_manager", - "groups": [ - 1, - 2, - 4, - 5, - 6, - 7, - 8, - 11, - 12, - 15, - 16, - 19, - 20, - 25, - 30, - 33, - 64, - 65, - 66, - 70, - 71, - 72, - 73, - 79, - 80, - 81, - 85, - 86, - 87, - 93, - 94, - 95 - ], - "label": "Gestionnaire de d\u00e9p\u00f4t" - } - }, - { - "pk": 3, - "model": "ishtar_common.persontype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "sra_agent", - "groups": [ - 1, - 2, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 13, - 14, - 15, - 16, - 17, - 18, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 66, - 70, - 71, - 72, - 73, - 75, - 76, - 79, - 80, - 81, - 85, - 93 - ], - "label": "Responsable de suivi scientifique" - } - }, - { - "pk": 2, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Responsable d'op\u00e9ration arch\u00e9ologique.", - "available": true, - "txt_idx": "head_scientist", - "groups": [ - 1, - 40, - 41, - 42, - 46, - 47, - 48, - 50, - 54, - 58, - 59, - 60, - 63, - 70, - 71, - 72, - 74, - 77, - 78, - 82, - 83, - 84 - ], - "label": "Responsable scientifique" - } - }, - { - "pk": 4, - "model": "ishtar_common.persontype", - "fields": { - "comment": "Peut utiliser toutes les fonctionnalit\u00e9s du module Administratif.", - "available": true, - "txt_idx": "secretarial_dept", - "groups": [ - 1, - 2, - 4, - 6, - 8, - 9, - 10, - 13, - 14, - 17, - 18, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 70, - 71, - 72, - 73, - 79 - ], - "label": "Secr\u00e9tariat" - } - }, - { - "pk": 5, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "Pour des entreprises, collectivit\u00e9s territoriales ou autres organisations.", - "available": true, - "txt_idx": "general_contractor", - "label": "Am\u00e9nageur" - } - }, - { - "pk": 7, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "Cette organisation et ses membres travaillent b\u00e9n\u00e9volement.", - "available": true, - "txt_idx": "volunteer", - "label": "Association de b\u00e9n\u00e9voles" - } - }, - { - "pk": 6, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "Laboratoire de recherche public (CNRS). Peut \u00eatre une UMR et donc int\u00e9grer des chercheurs de l'universit\u00e9. ", - "available": true, - "txt_idx": "research_laboratory", - "label": "Laboratoire de recherche" - } - }, - { - "pk": 4, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "Laboratoire ayant sous sa responsabilit\u00e9 du mobilier arch\u00e9ologique de mani\u00e8re temporaire. C'est un type de d\u00e9p\u00f4t. C'est un lieu de traitement.", - "available": true, - "txt_idx": "restoration_laboratory", - "label": "Laboratoire de restauration" - } - }, - { - "pk": 9, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "museum", - "label": "Mus\u00e9e" - } - }, - { - "pk": 10, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "undefined", - "label": "Non pr\u00e9cis\u00e9" - } - }, - { - "pk": 2, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "Selon le d\u00e9cret n\u00b0 2004-490 qui d\u00e9nomme \u00ab Op\u00e9rateurs \u00bb les personnes qui r\u00e9alisent les op\u00e9rations arch\u00e9ologiques.", - "available": true, - "txt_idx": "operator", - "label": "Op\u00e9rateur d'arch\u00e9ologie pr\u00e9ventive" - } - }, - { - "pk": 8, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "Les services qui d\u00e9livrent les autorisations requises pour les diff\u00e9rents projets (DDE, services\r\nurbanisme des collectivit\u00e9s, pr\u00e9fectures, Drire, etc.).", - "available": true, - "txt_idx": "planning_service", - "label": "Service instructeur" - } - }, - { - "pk": 1, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "sra", - "label": "Service R\u00e9gional d'Arch\u00e9ologie" - } - }, - { - "pk": 11, - "model": "ishtar_common.organizationtype", - "fields": { - "comment": "Par exemple une mairie portant un projet de fouille programm\u00e9e.", - "available": true, - "txt_idx": "public_struct", - "label": "Structure publique porteuse de projet programm\u00e9" - } - }, - { - "pk": 18, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "waterpaint", - "label": "Aquarelle" - } - }, - { - "pk": 17, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "comics_book", - "label": "Bande dessin\u00e9e" - } - }, - { - "pk": 14, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "Mesh", - "label": "Mod\u00e8le 3D (mesh)" - } - }, - { - "pk": 15, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "point_cloud", - "label": "Mod\u00e8le 3D (nuage de points)" - } - }, - { - "pk": 10, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "undefined", - "label": "Non pr\u00e9cis\u00e9" - } - }, - { - "pk": 21, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "photo_negative", - "label": "Photographie argentique (n\u00e9gatif)" - } - }, - { - "pk": 1, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Tirage de photographie argentique.", - "available": true, - "txt_idx": "photo_print", - "label": "Photographie argentique (tirage)" - } - }, - { - "pk": 5, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Source photographique num\u00e9rique.", - "available": true, - "txt_idx": "digital_photo", - "label": "Photographie num\u00e9rique" - } - }, - { - "pk": 13, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "x_ray", - "label": "Radiographie argentique" - } - }, - { - "pk": 20, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "digital_x_ray", - "label": "Radiographie num\u00e9rique" - } - }, - { - "pk": 6, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Rapport de laboratoire d'analyse.", - "available": true, - "txt_idx": "lab_report", - "label": "Rapport d'analyse" - } - }, - { - "pk": 4, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Rapport li\u00e9 \u00e0 un arr\u00eat\u00e9 de prescription de diagnostic arch\u00e9ologique.", - "available": true, - "txt_idx": "diagnostic_report", - "label": "Rapport de diagnostic" - } - }, - { - "pk": 19, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "stange_report", - "label": "Rapport de nature ind\u00e9termin\u00e9e" - } - }, - { - "pk": 8, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Rapport li\u00e9 \u00e0 une autorisation de prospection inventaire.", - "available": true, - "txt_idx": "general_survey_report", - "label": "Rapport de prospection inventaire" - } - }, - { - "pk": 9, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Rapport li\u00e9 \u00e0 une autorisation de prospection th\u00e9matique. Ce type de rapport passe d'ordinaire en CIRA.", - "available": true, - "txt_idx": "thematic_survey_report", - "label": "Rapport de prospection th\u00e9matique" - } - }, - { - "pk": 7, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Rapport li\u00e9 \u00e0 la restauration ou la stabilisation d'un lot de mobilier ou d'un objet isol\u00e9.", - "available": true, - "txt_idx": "restoration_report", - "label": "Rapport de restauration" - } - }, - { - "pk": 3, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Rapport li\u00e9 \u00e0 une autorisation de sondage.", - "available": true, - "txt_idx": "survey_report", - "label": "Rapport de sondage" - } - }, - { - "pk": 2, - "model": "ishtar_common.sourcetype", - "fields": { - "comment": "Rapport de fouille arch\u00e9ologique.", - "available": true, - "txt_idx": "final_archaeological_report", - "label": "Rapport final d'op\u00e9ration (fouille)" - } - }, - { - "pk": 115, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Autre \u00e9tude", - "preventive": true, - "order": 1, - "txt_idx": "other_study" - } - }, - { - "pk": 1, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "Une op\u00e9ration arch\u00e9ologique visant \u00e0 qualifier et quantifier la pr\u00e9sence de vestiges sur une surface donn\u00e9e.", - "available": true, - "label": "Diagnostic arch\u00e9ologique", - "preventive": true, - "order": 1, - "txt_idx": "arch_diagnostic" - } - }, - { - "pk": 7, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "\u00c9tude de b\u00e2ti (pr\u00e9ventif)", - "preventive": true, - "order": 1, - "txt_idx": "building_study" - } - }, - { - "pk": 10, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "\u00c9tude documentaire (pr\u00e9ventif)", - "preventive": true, - "order": 1, - "txt_idx": "documents_study" - } - }, - { - "pk": 12, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "\u00c9valuation", - "preventive": true, - "order": 1, - "txt_idx": "evaluation" - } - }, - { - "pk": 113, - "model": "ishtar_common.operationtype", - "fields": { - "comment": null, - "available": true, - "label": "Fouille ancienne", - "preventive": true, - "order": 1, - "txt_idx": "ancient_excavation" - } - }, - { - "pk": 2, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "A pr\u00e9ciser", - "available": true, - "label": "Fouille arch\u00e9ologique pr\u00e9ventive", - "preventive": true, - "order": 1, - "txt_idx": "prev_excavation" - } - }, - { - "pk": 22, - "model": "ishtar_common.operationtype", - "fields": { - "comment": null, - "available": true, - "label": "Sauvetage urgent", - "preventive": true, - "order": 1, - "txt_idx": "emergency_excavation" - } - }, - { - "pk": 133, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "\u00c0 d\u00e9terminer", - "preventive": false, - "order": 1, - "txt_idx": "unknown" - } - }, - { - "pk": 118, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Aide \u00e0 la pr\u00e9paration de publication", - "preventive": false, - "order": 1, - "txt_idx": "assistance_preparation_help" - } - }, - { - "pk": 130, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Aide \u00e0 l'\u00e9dition", - "preventive": false, - "order": 1, - "txt_idx": "AE" - } - }, - { - "pk": 132, - "model": "ishtar_common.operationtype", - "fields": { - "comment": null, - "available": true, - "label": "Diagnostic arch\u00e9ologique (programm\u00e9)", - "preventive": false, - "order": 1, - "txt_idx": "arch_diagnostic_research" - } - }, - { - "pk": 131, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Diffusion (pour les colloques, expo, s\u00e9minaires...)", - "preventive": false, - "order": 1, - "txt_idx": "communication" - } - }, - { - "pk": 8, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "\u00c9tude de b\u00e2ti (programm\u00e9)", - "preventive": false, - "order": 1, - "txt_idx": "building_study_research" - } - }, - { - "pk": 11, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "\u00c9tude documentaire (programm\u00e9)", - "preventive": false, - "order": 1, - "txt_idx": "documents_study_research" - } - }, - { - "pk": 3, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Fouille arch\u00e9ologique programm\u00e9e", - "preventive": false, - "order": 1, - "txt_idx": "prog_excavation" - } - }, - { - "pk": 13, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Fouille arch\u00e9ologique programm\u00e9e pluriannuelle", - "preventive": false, - "order": 1, - "txt_idx": "prog_excavation_multiyear" - } - }, - { - "pk": 122, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Programme d'analyses", - "preventive": false, - "order": 1, - "txt_idx": "analysis_program" - } - }, - { - "pk": 16, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Projet Collectif de Recherche", - "preventive": false, - "order": 1, - "txt_idx": "collective_research_project" - } - }, - { - "pk": 14, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Prospection a\u00e9rienne", - "preventive": false, - "order": 1, - "txt_idx": "aerial_survey_research" - } - }, - { - "pk": 117, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Prospection avec mat\u00e9riel sp\u00e9cialis\u00e9", - "preventive": false, - "order": 1, - "txt_idx": "specialized_eqp_prospection" - } - }, - { - "pk": 20, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Prospection avec relev\u00e9 d'art rupestre", - "preventive": false, - "order": 1, - "txt_idx": "rock_art_survey" - } - }, - { - "pk": 120, - "model": "ishtar_common.operationtype", - "fields": { - "comment": null, - "available": true, - "label": "Prospection d\u00e9tecteur de m\u00e9taux", - "preventive": false, - "order": 1, - "txt_idx": "metal_detector_prospection" - } - }, - { - "pk": 17, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Prospection inventaire", - "preventive": false, - "order": 1, - "txt_idx": "inventory_survey_research" - } - }, - { - "pk": 134, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Prospection sondage", - "preventive": false, - "order": 1, - "txt_idx": "survey_dig" - } - }, - { - "pk": 5, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "Une campagne de prospection sur un th\u00e8me particulier", - "available": true, - "label": "Prospection th\u00e9matique", - "preventive": false, - "order": 1, - "txt_idx": "thematic_survey" - } - }, - { - "pk": 121, - "model": "ishtar_common.operationtype", - "fields": { - "comment": null, - "available": true, - "label": "Relev\u00e9 d'art rupestre", - "preventive": false, - "order": 1, - "txt_idx": "cave_art_record" - } - }, - { - "pk": 127, - "model": "ishtar_common.operationtype", - "fields": { - "comment": "", - "available": true, - "label": "Sondage (programm\u00e9)", - "preventive": false, - "order": 1, - "txt_idx": "sampling" - } - }, - { - "pk": 5, - "model": "ishtar_common.titletype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dr", - "label": "Dr." - } - }, - { - "pk": 1, - "model": "ishtar_common.titletype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mr", - "label": "M." - } - }, - { - "pk": 3, - "model": "ishtar_common.titletype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "mr-and-mrs", - "label": "M. et Mme" - } - }, - { - "pk": 2, - "model": "ishtar_common.titletype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "miss", - "label": "Mlle" - } - }, - { - "pk": 4, - "model": "ishtar_common.titletype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "mrs", - "label": "Mme" - } - }, - { - "pk": 1, - "model": "ishtar_common.supporttype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "tracing-paper", - "label": "Papier calque" - } - }, - { - "pk": 2, - "model": "ishtar_common.supporttype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "graph-paper", - "label": "Papier millim\u00e9tr\u00e9" - } - }, - { - "pk": 3, - "model": "ishtar_common.format", - "fields": { - "comment": "841 \u00d7 1189 mm", - "available": true, - "txt_idx": "a0", - "label": "A0" - } - }, - { - "pk": 4, - "model": "ishtar_common.format", - "fields": { - "comment": "594 \u00d7 841 mm", - "available": true, - "txt_idx": "a1", - "label": "A1" - } - }, - { - "pk": 5, - "model": "ishtar_common.format", - "fields": { - "comment": "420 \u00d7 594 mm", - "available": true, - "txt_idx": "a2", - "label": "A2" - } - }, - { - "pk": 2, - "model": "ishtar_common.format", - "fields": { - "comment": "297 \u00d7 420 mm", - "available": true, - "txt_idx": "a3", - "label": "A3" - } - }, - { - "pk": 1, - "model": "ishtar_common.format", - "fields": { - "comment": "210 \u00d7 297 mm\r\n", - "available": true, - "txt_idx": "a4", - "label": "A4" - } - }, - { - "pk": 6, - "model": "ishtar_common.format", - "fields": { - "comment": "148 \u00d7 210 mm\r\n", - "available": true, - "txt_idx": "a5", - "label": "A5" - } - }, - { - "pk": 7, - "model": "ishtar_common.format", - "fields": { - "comment": "105 \u00d7 148 mm", - "available": true, - "txt_idx": "a6", - "label": "A6" - } - }, - { - "pk": 2, - "model": "ishtar_common.documenttemplate", - "fields": { - "associated_object_name": "archaeological_operations.models.AdministrativeAct", - "available": true, - "name": "Accus\u00e9 de r\u00e9ception d'un dossier", - "template": "upload/templates/ISHTAR_FILE_ACT_AR_Neutre_1.odt" - } - }, - { - "pk": 1, - "model": "ishtar_common.documenttemplate", - "fields": { - "associated_object_name": "archaeological_operations.models.AdministrativeAct", - "available": true, - "name": "Document de r\u00e9f\u00e9rence", - "template": "upload/templates/document_reference.odt" - } - } -]
\ No newline at end of file +{ + "model": "ishtar_common.authortype", + "fields": { + "label": "Co-auteur ", + "txt_idx": "co_author", + "comment": "Il y a plusieurs auteurs pour une m\u00eame source. Au m\u00eame niveau de responsabilit\u00e9.", + "available": true, + "order": 1 + } +}, +{ + "model": "ishtar_common.authortype", + "fields": { + "label": "Auteur principal", + "txt_idx": "main_author", + "comment": "Cette personne est l'auteur principal de la source. Les autres auteurs sont des collaborateurs.", + "available": true, + "order": 1 + } +}, +{ + "model": "ishtar_common.authortype", + "fields": { + "label": "Collaborateur", + "txt_idx": "associate_author", + "comment": "Cet auteur n'est pas l'auteur principal de la source mais un collaborateur. Il n'est pas auteur au m\u00eame niveau que l'auteur principal.", + "available": true, + "order": 1 + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Administrateur", + "txt_idx": "administrator", + "comment": "", + "available": true, + "groups": [ + [ + "Op\u00e9rations : lecture" + ], + [ + "Dossiers : lecture" + ], + [ + "UE : lecture" + ], + [ + "D\u00e9p\u00f4ts : lecture" + ], + [ + "Mobilier : lecture" + ], + [ + "Traitements : lecture" + ], + [ + "Actes administratifs : lecture" + ], + [ + "Actes administratifs : ajout" + ], + [ + "Actes administratifs : modification/suppression" + ], + [ + "D\u00e9p\u00f4ts : ajout" + ], + [ + "D\u00e9p\u00f4ts : modification/suppression" + ], + [ + "Dossiers : ajout" + ], + [ + "Dossiers : modification/suppression" + ], + [ + "Mobilier : ajout" + ], + [ + "Mobilier : modification/suppression" + ], + [ + "Op\u00e9rations : ajout" + ], + [ + "Op\u00e9rations : modification/suppression" + ], + [ + "Traitements : ajout" + ], + [ + "Traitements : modification/suppression" + ], + [ + "UE : ajout" + ], + [ + "UE : modification/suppression" + ], + [ + "Personnes : ajout" + ], + [ + "Personnes : modification/suppression" + ], + [ + "Organisations : lecture" + ], + [ + "Organisations : modification/suppression" + ], + [ + "Organisations : ajout" + ], + [ + "Op\u00e9rations : cl\u00f4ture" + ], + [ + "Dossiers : cl\u00f4ture" + ], + [ + "Documents op\u00e9ration : lecture" + ], + [ + "Documents op\u00e9ration : modification/suppression" + ], + [ + "Documents op\u00e9ration : ajout" + ], + [ + "Personnes : lecture" + ], + [ + "Actes administratifs rattach\u00e9s : ajout" + ], + [ + "Actes administratifs rattach\u00e9s : modification/suppression" + ], + [ + "Actes administratifs rattach\u00e9s : lecture" + ], + [ + "D\u00e9p\u00f4ts rattach\u00e9s : ajout" + ], + [ + "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression" + ], + [ + "D\u00e9p\u00f4ts rattach\u00e9s : lecture" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : ajout" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : modification/suppression" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : lecture" + ], + [ + "Dossiers rattach\u00e9s : ajout" + ], + [ + "Dossiers rattach\u00e9s : modification/suppression" + ], + [ + "Dossiers rattach\u00e9s : lecture" + ], + [ + "Mobilier rattach\u00e9 : ajout" + ], + [ + "Mobilier rattach\u00e9 : modification/suppression" + ], + [ + "Mobilier rattach\u00e9 : lecture" + ], + [ + "Op\u00e9rations rattach\u00e9es : ajout" + ], + [ + "Op\u00e9rations rattach\u00e9es : modification/suppression" + ], + [ + "Op\u00e9rations rattach\u00e9es : lecture" + ], + [ + "Organisations rattach\u00e9es : ajout" + ], + [ + "Organisations rattach\u00e9es : modification/suppression" + ], + [ + "Organisations rattach\u00e9es : lecture" + ], + [ + "Traitements rattach\u00e9s : ajout" + ], + [ + "Traitements rattach\u00e9s : modification/suppression" + ], + [ + "Traitements rattach\u00e9s : lecture" + ], + [ + "UE rattach\u00e9es : ajout" + ], + [ + "UE rattach\u00e9es : modification/suppression" + ], + [ + "UE rattach\u00e9es : lecture" + ], + [ + "Personnes rattach\u00e9es : ajout" + ], + [ + "Personnes rattach\u00e9es : modification/suppression" + ], + [ + "Personnes rattach\u00e9es : lecture" + ], + [ + "Demandes de traitement : ajout" + ], + [ + "Demandes de traitement : modification/suppression" + ], + [ + "Demandes de traitement : lecture" + ], + [ + "Demandes de traitement rattach\u00e9es : ajout" + ], + [ + "Demandes de traitement rattach\u00e9es : lecture" + ], + [ + "Demandes de traitement rattach\u00e9es : modification/suppression" + ], + [ + "Auteurs : ajout" + ], + [ + "Auteurs : modification/suppression" + ], + [ + "Auteurs : lecture" + ], + [ + "Documents UE : lecture" + ], + [ + "Documents UE rattach\u00e9s : lecture" + ], + [ + "Documents UE : ajout" + ], + [ + "Documents UE : modification/suppression" + ], + [ + "Documents UE rattach\u00e9s : modification/suppression" + ], + [ + "Documents UE rattach\u00e9s : ajout" + ], + [ + "Documents mobilier : lecture" + ], + [ + "Documents mobilier : ajout" + ], + [ + "Documents mobilier : modification/suppression" + ], + [ + "Documents mobilier rattach\u00e9s : ajout" + ], + [ + "Documents mobilier rattach\u00e9s : lecture" + ], + [ + "Documents mobilier rattach\u00e9s : modification/suppression" + ], + [ + "Documents de traitement : lecture" + ], + [ + "Documents de traitement : ajout" + ], + [ + "Documents de traitement : modification/suppression" + ], + [ + "Documents de traitement rattach\u00e9s : lecture" + ], + [ + "Documents de traitement rattach\u00e9s : ajout" + ], + [ + "Documents de traitement rattach\u00e9s : modification/suppression" + ], + [ + "Documents de demande de traitement : lecture" + ], + [ + "Documents de demande de traitement : ajout" + ], + [ + "Documents de demande de traitement : modification/suppression" + ], + [ + "Documents de demande de traitement rattach\u00e9s : lecture" + ], + [ + "Documents de demande de traitement rattach\u00e9s : ajout" + ], + [ + "Documents de demande de traitement rattach\u00e9s : modification/suppression" + ] + ] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Responsable scientifique", + "txt_idx": "head_scientist", + "comment": "Responsable d'op\u00e9ration arch\u00e9ologique.", + "available": true, + "groups": [ + [ + "Organisations : lecture" + ], + [ + "Personnes : lecture" + ], + [ + "Actes administratifs rattach\u00e9s : lecture" + ], + [ + "D\u00e9p\u00f4ts rattach\u00e9s : lecture" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : ajout" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : modification/suppression" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : lecture" + ], + [ + "Dossiers rattach\u00e9s : lecture" + ], + [ + "Mobilier rattach\u00e9 : ajout" + ], + [ + "Mobilier rattach\u00e9 : modification/suppression" + ], + [ + "Mobilier rattach\u00e9 : lecture" + ], + [ + "Op\u00e9rations rattach\u00e9es : modification/suppression" + ], + [ + "Op\u00e9rations rattach\u00e9es : lecture" + ], + [ + "Organisations rattach\u00e9es : ajout" + ], + [ + "Traitements rattach\u00e9s : lecture" + ], + [ + "UE rattach\u00e9es : ajout" + ], + [ + "UE rattach\u00e9es : modification/suppression" + ], + [ + "UE rattach\u00e9es : lecture" + ], + [ + "Personnes rattach\u00e9es : ajout" + ], + [ + "Demandes de traitement rattach\u00e9es : lecture" + ], + [ + "Auteurs : ajout" + ], + [ + "Auteurs : modification/suppression" + ], + [ + "Auteurs : lecture" + ], + [ + "Documents UE rattach\u00e9s : lecture" + ], + [ + "Documents UE rattach\u00e9s : modification/suppression" + ], + [ + "Documents UE rattach\u00e9s : ajout" + ], + [ + "Documents mobilier rattach\u00e9s : ajout" + ], + [ + "Documents mobilier rattach\u00e9s : lecture" + ], + [ + "Documents mobilier rattach\u00e9s : modification/suppression" + ], + [ + "Documents de traitement rattach\u00e9s : lecture" + ], + [ + "Documents de demande de traitement rattach\u00e9s : lecture" + ] + ] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Responsable de suivi scientifique", + "txt_idx": "sra_agent", + "comment": "", + "available": true, + "groups": [ + [ + "Op\u00e9rations : lecture" + ], + [ + "Dossiers : lecture" + ], + [ + "UE : lecture" + ], + [ + "D\u00e9p\u00f4ts : lecture" + ], + [ + "Mobilier : lecture" + ], + [ + "Traitements : lecture" + ], + [ + "Actes administratifs : lecture" + ], + [ + "Actes administratifs : ajout" + ], + [ + "Actes administratifs : modification/suppression" + ], + [ + "Dossiers : ajout" + ], + [ + "Dossiers : modification/suppression" + ], + [ + "Mobilier : ajout" + ], + [ + "Mobilier : modification/suppression" + ], + [ + "Op\u00e9rations : ajout" + ], + [ + "Op\u00e9rations : modification/suppression" + ], + [ + "UE : ajout" + ], + [ + "UE : modification/suppression" + ], + [ + "Personnes : ajout" + ], + [ + "Personnes : modification/suppression" + ], + [ + "Organisations : lecture" + ], + [ + "Organisations : modification/suppression" + ], + [ + "Organisations : ajout" + ], + [ + "Op\u00e9rations : cl\u00f4ture" + ], + [ + "Dossiers : cl\u00f4ture" + ], + [ + "Documents op\u00e9ration : lecture" + ], + [ + "Documents op\u00e9ration : modification/suppression" + ], + [ + "Documents op\u00e9ration : ajout" + ], + [ + "Personnes : lecture" + ], + [ + "Demandes de traitement : lecture" + ], + [ + "Auteurs : ajout" + ], + [ + "Auteurs : modification/suppression" + ], + [ + "Auteurs : lecture" + ], + [ + "Documents UE : lecture" + ], + [ + "Documents UE : ajout" + ], + [ + "Documents UE : modification/suppression" + ], + [ + "Documents mobilier : lecture" + ], + [ + "Documents mobilier : ajout" + ], + [ + "Documents mobilier : modification/suppression" + ], + [ + "Documents de traitement : lecture" + ], + [ + "Documents de demande de traitement : lecture" + ] + ] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Secr\u00e9tariat", + "txt_idx": "secretarial_dept", + "comment": "Peut utiliser toutes les fonctionnalit\u00e9s du module Administratif.", + "available": true, + "groups": [ + [ + "Op\u00e9rations : lecture" + ], + [ + "Dossiers : lecture" + ], + [ + "UE : lecture" + ], + [ + "D\u00e9p\u00f4ts : lecture" + ], + [ + "Mobilier : lecture" + ], + [ + "Traitements : lecture" + ], + [ + "Actes administratifs : lecture" + ], + [ + "Actes administratifs : ajout" + ], + [ + "Actes administratifs : modification/suppression" + ], + [ + "Dossiers : ajout" + ], + [ + "Dossiers : modification/suppression" + ], + [ + "Op\u00e9rations : ajout" + ], + [ + "Op\u00e9rations : modification/suppression" + ], + [ + "Personnes : ajout" + ], + [ + "Personnes : modification/suppression" + ], + [ + "Organisations : lecture" + ], + [ + "Organisations : modification/suppression" + ], + [ + "Organisations : ajout" + ], + [ + "Op\u00e9rations : cl\u00f4ture" + ], + [ + "Dossiers : cl\u00f4ture" + ], + [ + "Documents op\u00e9ration : lecture" + ], + [ + "Documents op\u00e9ration : modification/suppression" + ], + [ + "Documents op\u00e9ration : ajout" + ], + [ + "Personnes : lecture" + ], + [ + "Demandes de traitement : lecture" + ], + [ + "Auteurs : ajout" + ], + [ + "Auteurs : modification/suppression" + ], + [ + "Auteurs : lecture" + ], + [ + "Documents UE : lecture" + ], + [ + "Documents mobilier : lecture" + ], + [ + "Documents de traitement : lecture" + ], + [ + "Documents de demande de traitement : lecture" + ] + ] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "R\u00e9gisseur de collection", + "txt_idx": "collection_manager", + "comment": "Peut g\u00e9rer du mobilier qu'il n'a pas cr\u00e9\u00e9.\r\n\r\n", + "available": true, + "groups": [ + [ + "Op\u00e9rations : lecture" + ], + [ + "Dossiers : lecture" + ], + [ + "UE : lecture" + ], + [ + "D\u00e9p\u00f4ts : lecture" + ], + [ + "Mobilier : lecture" + ], + [ + "Traitements : lecture" + ], + [ + "Actes administratifs : lecture" + ], + [ + "D\u00e9p\u00f4ts : ajout" + ], + [ + "D\u00e9p\u00f4ts : modification/suppression" + ], + [ + "Mobilier : ajout" + ], + [ + "Mobilier : modification/suppression" + ], + [ + "Traitements : ajout" + ], + [ + "Traitements : modification/suppression" + ], + [ + "Organisations : lecture" + ], + [ + "Documents op\u00e9ration : lecture" + ], + [ + "Personnes : lecture" + ], + [ + "Demandes de traitement : ajout" + ], + [ + "Demandes de traitement : modification/suppression" + ], + [ + "Demandes de traitement : lecture" + ], + [ + "Auteurs : ajout" + ], + [ + "Auteurs : modification/suppression" + ], + [ + "Auteurs : lecture" + ], + [ + "Documents UE : lecture" + ], + [ + "Documents mobilier : lecture" + ], + [ + "Documents mobilier : ajout" + ], + [ + "Documents mobilier : modification/suppression" + ], + [ + "Documents de traitement : lecture" + ], + [ + "Documents de traitement : ajout" + ], + [ + "Documents de traitement : modification/suppression" + ], + [ + "Documents de demande de traitement : lecture" + ], + [ + "Documents de demande de traitement : ajout" + ], + [ + "Documents de demande de traitement : modification/suppression" + ] + ] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Am\u00e9nageur", + "txt_idx": "general_contractor", + "comment": "Responsable de l'am\u00e9nagement (pr\u00e9ventif).", + "available": true, + "groups": [] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Acc\u00e8s en lecture", + "txt_idx": "reader_access", + "comment": "Un acc\u00e8s limit\u00e9 - uniquement en lecture - \u00e0 la totalit\u00e9 de la base, apr\u00e8s enregistrement.", + "available": true, + "groups": [ + [ + "Op\u00e9rations : lecture" + ], + [ + "Demandes de traitement : lecture" + ], + [ + "UE : lecture" + ], + [ + "D\u00e9p\u00f4ts : lecture" + ], + [ + "Mobilier : lecture" + ], + [ + "Personnes : lecture" + ], + [ + "Actes administratifs : lecture" + ], + [ + "Documents UE : lecture" + ], + [ + "Traitements : lecture" + ], + [ + "Dossiers : lecture" + ], + [ + "Documents mobilier : lecture" + ], + [ + "Auteurs : lecture" + ], + [ + "Documents de traitement : lecture" + ], + [ + "Organisations : lecture" + ], + [ + "Documents de demande de traitement : lecture" + ], + [ + "Documents op\u00e9ration : lecture" + ] + ] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Chef de service instructeur", + "txt_idx": "responsible_planning_service", + "comment": "", + "available": true, + "groups": [] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Collaborateur scientifique", + "txt_idx": "collaborator", + "comment": "Peut intervenir sur les donn\u00e9es d'une op\u00e9ration sans en \u00eatre responsable.", + "available": true, + "groups": [ + [ + "Organisations : lecture" + ], + [ + "Personnes : lecture" + ], + [ + "D\u00e9p\u00f4ts rattach\u00e9s : lecture" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : ajout" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : modification/suppression" + ], + [ + "Documents op\u00e9ration rattach\u00e9s : lecture" + ], + [ + "Mobilier rattach\u00e9 : ajout" + ], + [ + "Mobilier rattach\u00e9 : modification/suppression" + ], + [ + "Mobilier rattach\u00e9 : lecture" + ], + [ + "Op\u00e9rations rattach\u00e9es : lecture" + ], + [ + "Organisations rattach\u00e9es : ajout" + ], + [ + "Traitements rattach\u00e9s : lecture" + ], + [ + "UE rattach\u00e9es : ajout" + ], + [ + "UE rattach\u00e9es : modification/suppression" + ], + [ + "UE rattach\u00e9es : lecture" + ], + [ + "Personnes rattach\u00e9es : ajout" + ], + [ + "Demandes de traitement rattach\u00e9es : lecture" + ], + [ + "Auteurs : ajout" + ], + [ + "Auteurs : modification/suppression" + ], + [ + "Auteurs : lecture" + ], + [ + "Documents UE rattach\u00e9s : lecture" + ], + [ + "Documents UE rattach\u00e9s : modification/suppression" + ], + [ + "Documents UE rattach\u00e9s : ajout" + ], + [ + "Documents mobilier rattach\u00e9s : ajout" + ], + [ + "Documents mobilier rattach\u00e9s : lecture" + ], + [ + "Documents mobilier rattach\u00e9s : modification/suppression" + ], + [ + "Documents de traitement rattach\u00e9s : lecture" + ], + [ + "Documents de demande de traitement rattach\u00e9s : lecture" + ] + ] + } +}, +{ + "model": "ishtar_common.persontype", + "fields": { + "label": "Demandeur", + "txt_idx": "applicant", + "comment": "Personne demandant une action sur le mobilier (traitements).", + "available": true, + "groups": [] + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Service R\u00e9gional d'Arch\u00e9ologie", + "txt_idx": "sra", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Op\u00e9rateur d'arch\u00e9ologie pr\u00e9ventive", + "txt_idx": "operator", + "comment": "Selon le d\u00e9cret n\u00b0 2004-490 qui d\u00e9nomme \u00ab Op\u00e9rateurs \u00bb les personnes qui r\u00e9alisent les op\u00e9rations arch\u00e9ologiques.", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Laboratoire de restauration", + "txt_idx": "restoration_laboratory", + "comment": "Laboratoire ayant sous sa responsabilit\u00e9 du mobilier arch\u00e9ologique de mani\u00e8re temporaire. C'est un type de d\u00e9p\u00f4t. C'est un lieu de traitement.", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Am\u00e9nageur", + "txt_idx": "general_contractor", + "comment": "Pour des entreprises, collectivit\u00e9s territoriales ou autres organisations.", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Laboratoire de recherche", + "txt_idx": "research_laboratory", + "comment": "Laboratoire de recherche public (CNRS). Peut \u00eatre une UMR et donc int\u00e9grer des chercheurs de l'universit\u00e9. ", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Association de b\u00e9n\u00e9voles", + "txt_idx": "volunteer", + "comment": "Cette organisation et ses membres travaillent b\u00e9n\u00e9volement.", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Service instructeur", + "txt_idx": "planning_service", + "comment": "Les services qui d\u00e9livrent les autorisations requises pour les diff\u00e9rents projets (DDE, services\r\nurbanisme des collectivit\u00e9s, pr\u00e9fectures, Drire, etc.).", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Mus\u00e9e", + "txt_idx": "museum", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Non pr\u00e9cis\u00e9", + "txt_idx": "undefined", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.organizationtype", + "fields": { + "label": "Structure publique porteuse de projet programm\u00e9", + "txt_idx": "public_struct", + "comment": "Par exemple une mairie portant un projet de fouille programm\u00e9e.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Photographie argentique (tirage)", + "txt_idx": "photo_print", + "comment": "Tirage de photographie argentique.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Rapport final d'op\u00e9ration (fouille)", + "txt_idx": "final_archaeological_report", + "comment": "Rapport de fouille arch\u00e9ologique.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Rapport de sondage", + "txt_idx": "survey_report", + "comment": "Rapport li\u00e9 \u00e0 une autorisation de sondage.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Rapport de diagnostic", + "txt_idx": "diagnostic_report", + "comment": "Rapport li\u00e9 \u00e0 un arr\u00eat\u00e9 de prescription de diagnostic arch\u00e9ologique.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Photographie num\u00e9rique", + "txt_idx": "digital_photo", + "comment": "Source photographique num\u00e9rique.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Rapport d'analyse", + "txt_idx": "lab_report", + "comment": "Rapport de laboratoire d'analyse.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Rapport de restauration", + "txt_idx": "restoration_report", + "comment": "Rapport li\u00e9 \u00e0 la restauration ou la stabilisation d'un lot de mobilier ou d'un objet isol\u00e9.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Rapport de prospection inventaire", + "txt_idx": "general_survey_report", + "comment": "Rapport li\u00e9 \u00e0 une autorisation de prospection inventaire.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Rapport de prospection th\u00e9matique", + "txt_idx": "thematic_survey_report", + "comment": "Rapport li\u00e9 \u00e0 une autorisation de prospection th\u00e9matique. Ce type de rapport passe d'ordinaire en CIRA.", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Non pr\u00e9cis\u00e9", + "txt_idx": "undefined", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Radiographie argentique", + "txt_idx": "x_ray", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Mod\u00e8le 3D (mesh)", + "txt_idx": "Mesh", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Mod\u00e8le 3D (nuage de points)", + "txt_idx": "point_cloud", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Bande dessin\u00e9e", + "txt_idx": "comics_book", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Aquarelle", + "txt_idx": "waterpaint", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Rapport de nature ind\u00e9termin\u00e9e", + "txt_idx": "stange_report", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Radiographie num\u00e9rique", + "txt_idx": "digital_x_ray", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.sourcetype", + "fields": { + "label": "Photographie argentique (n\u00e9gatif)", + "txt_idx": "photo_negative", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Diagnostic arch\u00e9ologique", + "txt_idx": "arch_diagnostic", + "comment": "Une op\u00e9ration arch\u00e9ologique visant \u00e0 qualifier et quantifier la pr\u00e9sence de vestiges sur une surface donn\u00e9e.", + "available": true, + "order": 1, + "preventive": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Fouille arch\u00e9ologique pr\u00e9ventive", + "txt_idx": "prev_excavation", + "comment": "A pr\u00e9ciser", + "available": true, + "order": 1, + "preventive": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Fouille arch\u00e9ologique programm\u00e9e", + "txt_idx": "prog_excavation", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Prospection th\u00e9matique", + "txt_idx": "thematic_survey", + "comment": "Une campagne de prospection sur un th\u00e8me particulier", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "\u00c9tude de b\u00e2ti (pr\u00e9ventif)", + "txt_idx": "building_study", + "comment": "", + "available": true, + "order": 1, + "preventive": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "\u00c9tude de b\u00e2ti (programm\u00e9)", + "txt_idx": "building_study_research", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "\u00c9tude documentaire (pr\u00e9ventif)", + "txt_idx": "documents_study", + "comment": "", + "available": true, + "order": 1, + "preventive": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "\u00c9tude documentaire (programm\u00e9)", + "txt_idx": "documents_study_research", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "\u00c9valuation", + "txt_idx": "evaluation", + "comment": "", + "available": true, + "order": 1, + "preventive": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Fouille arch\u00e9ologique programm\u00e9e pluriannuelle", + "txt_idx": "prog_excavation_multiyear", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Prospection a\u00e9rienne", + "txt_idx": "aerial_survey_research", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Projet Collectif de Recherche", + "txt_idx": "collective_research_project", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Prospection inventaire", + "txt_idx": "inventory_survey_research", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Prospection avec relev\u00e9 d'art rupestre", + "txt_idx": "rock_art_survey", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Sauvetage urgent", + "txt_idx": "emergency_excavation", + "comment": null, + "available": true, + "order": 1, + "preventive": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Fouille ancienne", + "txt_idx": "ancient_excavation", + "comment": null, + "available": true, + "order": 1, + "preventive": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Autre \u00e9tude", + "txt_idx": "other_study", + "comment": "", + "available": true, + "order": 1, + "preventive": true + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Prospection avec mat\u00e9riel sp\u00e9cialis\u00e9", + "txt_idx": "specialized_eqp_prospection", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Aide \u00e0 la pr\u00e9paration de publication", + "txt_idx": "assistance_preparation_help", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Prospection d\u00e9tecteur de m\u00e9taux", + "txt_idx": "metal_detector_prospection", + "comment": null, + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Relev\u00e9 d'art rupestre", + "txt_idx": "cave_art_record", + "comment": null, + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Programme d'analyses", + "txt_idx": "analysis_program", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Sondage (programm\u00e9)", + "txt_idx": "sampling", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Aide \u00e0 l'\u00e9dition", + "txt_idx": "AE", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Diffusion (pour les colloques, expo, s\u00e9minaires...)", + "txt_idx": "communication", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Diagnostic arch\u00e9ologique (programm\u00e9)", + "txt_idx": "arch_diagnostic_research", + "comment": null, + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "\u00c0 d\u00e9terminer", + "txt_idx": "unknown", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.operationtype", + "fields": { + "label": "Prospection sondage", + "txt_idx": "survey_dig", + "comment": "", + "available": true, + "order": 1, + "preventive": false + } +}, +{ + "model": "ishtar_common.titletype", + "fields": { + "label": "M.", + "txt_idx": "mr", + "comment": null, + "available": true + } +}, +{ + "model": "ishtar_common.titletype", + "fields": { + "label": "Mlle", + "txt_idx": "miss", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.titletype", + "fields": { + "label": "M. et Mme", + "txt_idx": "mr-and-mrs", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.titletype", + "fields": { + "label": "Mme", + "txt_idx": "mrs", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.titletype", + "fields": { + "label": "Dr.", + "txt_idx": "dr", + "comment": null, + "available": true + } +}, +{ + "model": "ishtar_common.supporttype", + "fields": { + "label": "Papier calque", + "txt_idx": "tracing-paper", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.supporttype", + "fields": { + "label": "Papier millim\u00e9tr\u00e9", + "txt_idx": "graph-paper", + "comment": "", + "available": true + } +}, +{ + "model": "ishtar_common.format", + "fields": { + "label": "A4", + "txt_idx": "a4", + "comment": "210 \u00d7 297 mm\r\n", + "available": true + } +}, +{ + "model": "ishtar_common.format", + "fields": { + "label": "A3", + "txt_idx": "a3", + "comment": "297 \u00d7 420 mm", + "available": true + } +}, +{ + "model": "ishtar_common.format", + "fields": { + "label": "A0", + "txt_idx": "a0", + "comment": "841 \u00d7 1189 mm", + "available": true + } +}, +{ + "model": "ishtar_common.format", + "fields": { + "label": "A1", + "txt_idx": "a1", + "comment": "594 \u00d7 841 mm", + "available": true + } +}, +{ + "model": "ishtar_common.format", + "fields": { + "label": "A2", + "txt_idx": "a2", + "comment": "420 \u00d7 594 mm", + "available": true + } +}, +{ + "model": "ishtar_common.format", + "fields": { + "label": "A5", + "txt_idx": "a5", + "comment": "148 \u00d7 210 mm\r\n", + "available": true + } +}, +{ + "model": "ishtar_common.format", + "fields": { + "label": "A6", + "txt_idx": "a6", + "comment": "105 \u00d7 148 mm", + "available": true + } +}, +{ + "model": "ishtar_common.documenttemplate", + "fields": { + "name": "Document de r\u00e9f\u00e9rence", + "slug": "document-de-reference", + "template": "upload/templates/document_reference.odt", + "associated_object_name": "archaeological_operations.models.AdministrativeAct", + "available": true + } +}, +{ + "model": "ishtar_common.documenttemplate", + "fields": { + "name": "Accus\u00e9 de r\u00e9ception d'un dossier", + "slug": "accuse-de-reception-dun-dossier", + "template": "upload/templates/ISHTAR_FILE_ACT_AR_Neutre_1.odt", + "associated_object_name": "archaeological_operations.models.AdministrativeAct", + "available": true + } +} +] diff --git a/ishtar_common/fixtures/initial_importtypes-fr.json b/ishtar_common/fixtures/initial_importtypes-fr.json index 3b43f0003..c5ca39297 100644 --- a/ishtar_common/fixtures/initial_importtypes-fr.json +++ b/ishtar_common/fixtures/initial_importtypes-fr.json @@ -1,6640 +1,8464 @@ [ - { - "pk": 17, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Auteur", - "klass": "ishtar_common.models.Author" - } - }, - { - "pk": 11, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Datation", - "klass": "archaeological_context_records.models.Dating" - } - }, - { - "pk": 16, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Documentation de demande de traitement", - "klass": "archaeological_finds.models_treatments.TreatmentFileSource" - } - }, - { - "pk": 15, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Documentation de traitement", - "klass": "archaeological_finds.models_treatments.TreatmentSource" - } - }, - { - "pk": 8, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Documentation d'op\u00e9ration", - "klass": "archaeological_operations.models.OperationSource" - } - }, - { - "pk": 13, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Documentation d'UE", - "klass": "archaeological_context_records.models.ContextRecordSource" - } - }, - { - "pk": 14, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Documentation mobilier", - "klass": "archaeological_finds.models_finds.FindSource" - } - }, - { - "pk": 2, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Dossier arch\u00e9ologique", - "klass": "archaeological_files.models.File" - } - }, - { - "pk": 4, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Entit\u00e9 arch\u00e9ologique", - "klass": "archaeological_operations.models.ArchaeologicalSite" - } - }, - { - "pk": 12, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Find", - "klass": "archaeological_finds.models_finds.Find" - } - }, - { - "pk": 3, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Mobilier de base", - "klass": "archaeological_finds.models.BaseFind" - } - }, - { - "pk": 6, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Op\u00e9ration", - "klass": "archaeological_operations.models.Operation" - } - }, - { - "pk": 1, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Organisation", - "klass": "ishtar_common.models.Organization" - } - }, - { - "pk": 9, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Parcelle", - "klass": "archaeological_operations.models.Parcel" - } - }, - { - "pk": 5, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Personne", - "klass": "ishtar_common.models.Person" - } - }, - { - "pk": 10, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Relation entre Unit\u00e9s d'Enregistrement", - "klass": "archaeological_context_records.models.RecordRelations" - } - }, - { - "pk": 7, - "model": "ishtar_common.importermodel", - "fields": { - "name": "Unit\u00e9 d'Enregistrement", - "klass": "archaeological_context_records.models.ContextRecord" - } - }, - { - "pk": 20, - "model": "ishtar_common.importertype", - "fields": { - "description": "Mobilier", - "created_models": [], - "is_template": true, - "unicity_keys": "external_id", - "users": [], - "slug": "ishtar-finds", - "associated_models": 12, - "name": "Ishtar - Mobilier" - } - }, - { - "pk": 23, - "model": "ishtar_common.importertype", - "fields": { - "description": "Importeur de mobilier + parcelles et UE", - "created_models": [ - 9, - 7 - ], - "is_template": true, - "unicity_keys": "external_id", - "users": [], - "slug": "ishtar_finds_parcels_and_cr", - "associated_models": 12, - "name": "Ishtar - Mobilier_COMBO" - } - }, - { - "pk": 17, - "model": "ishtar_common.importertype", - "fields": { - "description": "Import complet standard operations", - "created_models": [], - "is_template": true, - "unicity_keys": "code_patriarche", - "users": [], - "slug": "ishtar-operations", - "associated_models": 6, - "name": "Ishtar - Op\u00e9rations" - } - }, - { - "pk": 22, - "model": "ishtar_common.importertype", - "fields": { - "description": "Documentation d'op\u00e9ration", - "created_models": [ - 17, - 8, - 5 - ], - "is_template": true, - "unicity_keys": "external_id", - "users": [], - "slug": "ishtar-operations-sources", - "associated_models": 8, - "name": "Ishtar - Op\u00e9rations - Documentation" - } - }, - { - "pk": 19, - "model": "ishtar_common.importertype", - "fields": { - "description": "Parcelles de terrain", - "created_models": [], - "is_template": true, - "unicity_keys": "external_id", - "users": [], - "slug": "ishtar-parcels", - "associated_models": 9, - "name": "Ishtar - Parcelles" - } - }, - { - "pk": 21, - "model": "ishtar_common.importertype", - "fields": { - "description": "", - "created_models": [ - 10 - ], - "is_template": true, - "unicity_keys": "", - "users": [], - "slug": "ishtar-ue-relations", - "associated_models": 10, - "name": "Ishtar - Relations entre UE" - } - }, - { - "pk": 18, - "model": "ishtar_common.importertype", - "fields": { - "description": "Unit\u00e9s d'enregisttrement", - "created_models": [], - "is_template": true, - "unicity_keys": "external_id", - "users": [], - "slug": "ishtar-context-record", - "associated_models": 7, - "name": "Ishtar - UE" - } - }, - { - "pk": 3, - "model": "ishtar_common.importertype", - "fields": { - "description": "", - "created_models": [], - "is_template": true, - "unicity_keys": "", - "users": [], - "slug": "mcc-documentation", - "associated_models": 8, - "name": "MCC - Documentation" - } - }, - { - "pk": 5, - "model": "ishtar_common.importertype", - "fields": { - "description": "", - "created_models": [], - "is_template": true, - "unicity_keys": "external_id", - "users": [], - "slug": "mcc-mobilier", - "associated_models": 12, - "name": "MCC - Mobilier" - } - }, - { - "pk": 1, - "model": "ishtar_common.importertype", - "fields": { - "description": "", - "created_models": [], - "is_template": true, - "unicity_keys": "code_patriarche", - "users": [], - "slug": "mcc-operations", - "associated_models": 6, - "name": "MCC - Op\u00e9rations" - } - }, - { - "pk": 2, - "model": "ishtar_common.importertype", - "fields": { - "description": "", - "created_models": [], - "is_template": true, - "unicity_keys": "external_id", - "users": [], - "slug": "mcc-parcelles", - "associated_models": 9, - "name": "MCC - Parcelles" - } - }, - { - "pk": 4, - "model": "ishtar_common.importertype", - "fields": { - "description": "", - "created_models": [], - "is_template": true, - "unicity_keys": "external_id", - "users": [], - "slug": "mcc-ue", - "associated_models": 7, - "name": "MCC - UE" - } - }, - { - "pk": 2, - "model": "ishtar_common.regexp", - "fields": { - "regexp": "([0-9]*)", - "name": "Num\u00e9ro INSEE", - "description": "" - } - }, - { - "pk": 1, - "model": "ishtar_common.importerdefault", - "fields": { - "importer_type": 1, - "target": "operator" - } - }, - { - "pk": 2, - "model": "ishtar_common.importerdefault", - "fields": { - "importer_type": 3, - "target": "authors" - } - }, - { - "pk": 23, - "model": "ishtar_common.importerdefault", - "fields": { - "importer_type": 17, - "target": "operator" - } - }, - { - "pk": 24, - "model": "ishtar_common.importerdefault", - "fields": { - "importer_type": 17, - "target": "scientist__person_types" - } - }, - { - "pk": 25, - "model": "ishtar_common.importerdefault", - "fields": { - "importer_type": 22, - "target": "authors" - } - }, - { - "pk": 26, - "model": "ishtar_common.importerdefault", - "fields": { - "importer_type": 19, - "target": "public_domain" - } - }, - { - "pk": 1, - "model": "ishtar_common.importerdefaultvalues", - "fields": { - "default_target": 1, - "target": "organization_type", - "value": "operator" - } - }, - { - "pk": 2, - "model": "ishtar_common.importerdefaultvalues", - "fields": { - "default_target": 2, - "target": "author_type", - "value": "main_author" - } - }, - { - "pk": 29, - "model": "ishtar_common.importerdefaultvalues", - "fields": { - "default_target": 23, - "target": "organization_type", - "value": "operator" - } - }, - { - "pk": 30, - "model": "ishtar_common.importerdefaultvalues", - "fields": { - "default_target": 24, - "target": "txt_idx", - "value": "head_scientist" - } - }, - { - "pk": 31, - "model": "ishtar_common.importerdefaultvalues", - "fields": { - "default_target": 25, - "target": "author_type", - "value": "main_author" - } - }, - { - "pk": 32, - "model": "ishtar_common.importerdefaultvalues", - "fields": { - "default_target": 26, - "target": "public_domain", - "value": "False" - } - }, - { - "pk": 336, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code PATRIARCHE ou code num\u00e9rique (entier) UNIQUE pour une op\u00e9ration.", - "regexp_pre_filter": null, - "required": true, - "label": "Code op\u00e9ration", - "importer_type": 20, - "export_field_name": "base_finds__context_record__operation__code_patriarche" - } - }, - { - "pk": 337, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Commune (via num\u00e9ro INSEE).", - "regexp_pre_filter": null, - "required": true, - "label": "INSEE", - "importer_type": 20, - "export_field_name": "base_finds__context_record__parcel__town__numero_insee" - } - }, - { - "pk": 338, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "Parcelle (identifiant externe), soit la section plus la parcelle sans espaces. Exemple : \"ZA253\".", - "regexp_pre_filter": null, - "required": true, - "label": "Parcelle", - "importer_type": 20, - "export_field_name": "base_finds__context_record__parcel__section|base_finds__context_record__parcel__parcel_number" - } - }, - { - "pk": 339, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Label / Identifiant (externe) de l'UE. Exemple : \"US 145\", \"Tranch\u00e9e 145\", \"145\", \"St 17\", etc. Doit \u00eatre unique pour une parcelle donn\u00e9e.", - "regexp_pre_filter": null, - "required": true, - "label": "Label UE", - "importer_type": 20, - "export_field_name": "base_finds__context_record__label" - } - }, - { - "pk": 340, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "Identifiant libre pour le mobilier. Exemple : \"12\", \"Lot 24\", \"Sac vert\", etc.\r\nDoit \u00eatre unique \u00e0 l'\u00e9chelle de l'UE associ\u00e9e.", - "regexp_pre_filter": null, - "required": true, - "label": "Label mobilier", - "importer_type": 20, - "export_field_name": "label" - } - }, - { - "pk": 341, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "Identifiant pr\u00e9c\u00e9dent, li\u00e9 \u00e0 une base de donn\u00e9e ou un autre mode d'enregistrement. Exemple : \"400.01.05\", \"Beau biface\", \"inv. 4523\", \"Iso.4220\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Identifiant pr\u00e9c\u00e9dent", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 343, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 7, - "description": "R\u00e9f\u00e9rence du point topo, d'ordinaire un entier mais peut \u00eatre autre chose. Champ texte, max. 120 caract\u00e8res. Exemple : \"7220\", \"pt. 72\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Ref. point topo", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 342, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 8, - "description": "Description du mobilier, objet ou lot. Exemple : \"Fibule aviforme\".", - "regexp_pre_filter": null, - "required": false, - "label": "Description", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 344, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "D\u00e9finit si on enregistre ici un objet seul (parfois appel\u00e9 Isolation) ou un lot d'objets. Exemple : \"lot\", \"objet\", \"Iso\", \"vrac\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Lot ou objet", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 345, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 10, - "description": "D\u00e9finit si un objet est complet ou non. Exemple : \"complet\", \"est complet\", \"incomplet\".\r\nEst ici traduit en binaire : \"complet\" (vrai) ou \"incomplet\" (faux). ", - "regexp_pre_filter": null, - "required": false, - "label": "Compl\u00e9tude", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 346, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 11, - "description": "Type(s) de mat\u00e9riau(x) s\u00e9par\u00e9s par des \"&\". Exemple : \"m\u00e9tal & os\", \"LT\", \"Min\u00e9ral\", \"Granito\u00efde & Basalte & Ardoise\".", - "regexp_pre_filter": null, - "required": false, - "label": "Mat\u00e9riau(x)", - "importer_type": 20, - "export_field_name": "material_types__label" - } - }, - { - "pk": 347, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 12, - "description": "\u00c9tat de conservation. Exemple : \"Instable\", \"Stable\", \"Inconnu\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "\u00c9tat de conservation", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 348, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 13, - "description": "Commentaire relatif \u00e0 la conservation. Exemple : \"Devrait \u00eatre conserv\u00e9 dans une chambre climatis\u00e9e\", \"Ne sera plus qu'une poudre, si on ne s'en occupe pas sous peu\", \" \u00e0 jeter\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire conservation", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 349, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 14, - "description": "Type(s) d'objet(s), s\u00e9par\u00e9s par des \"&\". Exemple : \"tesson & charbon\", \"os & m\u00e9tal\", \"faune\", \"fibule & bague\", \"lame & lamelle\", \"\u00e9clat & nucl\u00e9us\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Type(s) d'objet(s)", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 350, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 15, - "description": "Type(s) d'actions de conservation \u00e0 mener, s\u00e9par\u00e9s par des \"&\". Exemple : \"\u00c0 restaurer\", \"reconditionnement\", \"\u00c0 reconditionner & \u00e0 stabiliser\"", - "regexp_pre_filter": null, - "required": false, - "label": "Type(s) d'actions de conservation \u00e0 mener", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 351, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 16, - "description": "Type(s) d'int\u00e9r\u00eat scientifique ou d'int\u00e9grit\u00e9, s\u00e9par\u00e9s par des \"&\". Exemple : \"Arch\u00e9ologiquement complet\", \"absent\", \"perdu\", etc.\r\nPeut \u00e9galement qualifier (selon votre usage) des qualit\u00e9s de fragmentation : \"proximal\", \"distal\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Type(s) d'int\u00e9grit\u00e9(s) et/ou int\u00e9r\u00eat(s)", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 352, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 17, - "description": "Type(s) de remarquabilit\u00e9(s), s\u00e9par\u00e9s par des \"&\". Exemple : \"Mus\u00e9e\", \"Publication\", \"Tessonier & Publication\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Type(s) de remarqualibit\u00e9(s)", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 353, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 18, - "description": "Longueur en cm (nombre d\u00e9cimal).", - "regexp_pre_filter": null, - "required": false, - "label": "Longueur (cm)", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 354, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 19, - "description": "Largeur en cm (nombre d\u00e9cimal).", - "regexp_pre_filter": null, - "required": false, - "label": "Largeur (cm)", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 355, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 20, - "description": "Hauteur en cm (nombre d\u00e9cimal).", - "regexp_pre_filter": null, - "required": false, - "label": "Hauteur (cm)", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 356, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 21, - "description": "Diam\u00e8tre en cm (nombre d\u00e9cimal).", - "regexp_pre_filter": null, - "required": false, - "label": "Diam\u00e8tre (cm)", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 357, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 22, - "description": "Commentaire permettant de donner des pr\u00e9cisions (ou d'importer des donn\u00e9es mixtes). Exemple : \"18 x 12 x 5\", \"col de 43 mm\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire / Pr\u00e9cisions sur les dimensions ", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 372, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 23, - "description": "Poids en grammes.", - "regexp_pre_filter": null, - "required": false, - "label": "Poids (g)", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 358, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 24, - "description": "Nombre d'objet(s) li\u00e9(s) \u00e0 cet enregistrement (entier). Exemple : \"12\".\r\nAttention, ce champ n'est pas contraint par l'information de type OBJET/LOT (colonne n\u00b09).", - "regexp_pre_filter": null, - "required": false, - "label": "Nombre", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 359, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 25, - "description": "Marquage visible sur le mobilier. Exemple : \"id1234 la Roche aux F\u00e9es\", \"MTX-45\", etc.\r\nCeci reproduit d'ordinaire un marquage r\u00e9alis\u00e9 par un arch\u00e9ologue. Il ne s'agit pas ici de reproduire une \u00e9pigraphie ou tout autre inscription arch\u00e9ologique (graffito, d\u00e9dicaces, defixio, etc.) , mais vous pouvez l'utiliser pour cela si vous n'avez pas \u00e0 utiliser de marquage arch\u00e9ologique.", - "regexp_pre_filter": null, - "required": false, - "label": "Marque", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 360, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 26, - "description": "Commentaire g\u00e9n\u00e9ral libre. Exemple : \"habillage en nid d'abeille, poli g\u00e9n\u00e9ralis\u00e9, encoche emmanchement lat\u00e9ral ouvert sur la face sup\u00e9rieure\", \"1 bord + bec tubulaire\", \"fibule de Langton Down\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire g\u00e9n\u00e9ral", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 361, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 27, - "description": "Commentaire g\u00e9n\u00e9ral sur les datations, si besoin. Exemple : \"plut\u00f4t fin IIe s. ou d\u00e9but IIIe s.\", \"Datation \u00e0 pr\u00e9ciser avant publication\", \" Datation rapide faite par M. Dupont\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire g\u00e9n\u00e9ral sur les datations", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 362, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 28, - "description": "Valeur estim\u00e9e (\u20ac), sous la forme d'un nombre d\u00e9cimal. Exemple : \"4500\", \"0.2\", etc.\r\nUtile essentiellement pour les probl\u00e8mes de partage, vente, assurance etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Valeur estim\u00e9e", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 363, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 29, - "description": "Nom exact du fichier image, sous la forme XXXXX.jpg.\r\nAttention au respect strict des caract\u00e8res et majuscules lors d'un import de ce type, \".JPG\" ou \"*.jpg\", etc.\r\nExemple : \"P1030831.JPG\", \"IMG_6485.JPG\", \"fibule.jpg\", etc.\r\nLors de l'import il faut ajouter ces images sous la forme d'un fichier zip (joint au csv import\u00e9) pour que les images soient automatiquement int\u00e9gr\u00e9es.\r\n", - "regexp_pre_filter": null, - "required": false, - "label": "Image", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 364, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 30, - "description": "Chronologies associ\u00e9es (plusieurs possibles s\u00e9par\u00e9es par &). Exemple : \"Gallo-romain & M\u00e9di\u00e9val\", \"GR&MED\", \"M\u00e9solithique final & M\u00e9so moyen & Epipal\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "P\u00e9riodes", - "importer_type": 20, - "export_field_name": "datings__period__label" - } - }, - { - "pk": 365, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 31, - "description": "Coordonn\u00e9e X pour cet objet.", - "regexp_pre_filter": null, - "required": false, - "label": "Coordonn\u00e9e X", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 366, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 32, - "description": "Coordonn\u00e9e Y pour cet objet.", - "regexp_pre_filter": null, - "required": false, - "label": "Coordonn\u00e9e Y", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 367, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 33, - "description": "Coordonn\u00e9e Z pour cet objet (altitude NGF ou arbitraire).", - "regexp_pre_filter": null, - "required": false, - "label": "Coordonn\u00e9e Z", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 368, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 34, - "description": "Code permettant de qualifier le mode de projection des donn\u00e9es (SRS /EPSG). Exemple : \"2154\" pour le Lambert 93.", - "regexp_pre_filter": null, - "required": false, - "label": "Syst\u00e8me de r\u00e9f\u00e9rence spatiale", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 373, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 35, - "description": "Identifiant textuel du d\u00e9p\u00f4t. Cet identifiant doit correspondre \u00e0 un d\u00e9p\u00f4t existant en base de donn\u00e9es.", - "regexp_pre_filter": null, - "required": false, - "label": "Identifiant d\u00e9p\u00f4t", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 374, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 36, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "R\u00e9f\u00e9rence de caisse", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 375, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 37, - "description": "Champ n\u00e9cessaire si vous indiquez une caisse", - "regexp_pre_filter": null, - "required": false, - "label": "Type de caisse", - "importer_type": 20, - "export_field_name": null - } - }, - { - "pk": 391, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code PATRIARCHE ou code num\u00e9rique (entier) UNIQUE pour une op\u00e9ration.", - "regexp_pre_filter": null, - "required": true, - "label": "Code op\u00e9ration", - "importer_type": 23, - "export_field_name": "base_finds__context_record__operation__code_patriarche" - } - }, - { - "pk": 392, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Commune (via num\u00e9ro INSEE).", - "regexp_pre_filter": null, - "required": true, - "label": "INSEE", - "importer_type": 23, - "export_field_name": "base_finds__context_record__parcel__town__numero_insee" - } - }, - { - "pk": 393, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "Section (identifiant externe), soit des lettres formant la section . Exemple : \"ZA\".", - "regexp_pre_filter": null, - "required": true, - "label": "Section de parcellaire", - "importer_type": 23, - "export_field_name": "base_finds__context_record__parcel__section" - } - }, - { - "pk": 394, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Num\u00e9ro de la parcelle, soit des chiffres sans espaces. Exemple : \"253\".", - "regexp_pre_filter": null, - "required": true, - "label": "Num\u00e9ro de parcelle", - "importer_type": 23, - "export_field_name": "base_finds__context_record__parcel__parcel_number" - } - }, - { - "pk": 395, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "Label / Identifiant (externe) de l'UE. Exemple : \"US 145\", \"Tranch\u00e9e 145\", \"145\", \"St 17\", etc. Doit \u00eatre unique pour une parcelle donn\u00e9e.", - "regexp_pre_filter": null, - "required": true, - "label": "Label UE", - "importer_type": 23, - "export_field_name": "base_finds__context_record__label" - } - }, - { - "pk": 396, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "Identifiant libre pour le mobilier. Exemple : \"12\", \"Lot 24\", \"Sac vert\", etc.\r\nDoit \u00eatre unique \u00e0 l'\u00e9chelle de l'UE associ\u00e9e.", - "regexp_pre_filter": null, - "required": true, - "label": "Label mobilier", - "importer_type": 23, - "export_field_name": "label" - } - }, - { - "pk": 265, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code PATRIARCHE ou code num\u00e9rique (entier) UNIQUE pour une op\u00e9ration.", - "regexp_pre_filter": null, - "required": true, - "label": "Code op\u00e9ration", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 266, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Nom usuel de l'op\u00e9ration.", - "regexp_pre_filter": null, - "required": true, - "label": "Nom", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 267, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "Ann\u00e9e de r\u00e9f\u00e9rence (peut \u00eatre celle o\u00f9 le projet d'op\u00e9ration a \u00e9t\u00e9 cr\u00e9\u00e9 ou bien celle de la r\u00e9alisation selon votre usage).", - "regexp_pre_filter": null, - "required": true, - "label": "Ann\u00e9e", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 268, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Index (num\u00e9ro par ann\u00e9e), le couple ann\u00e9e + index doit \u00eatre unique.", - "regexp_pre_filter": null, - "required": false, - "label": "Index (num\u00e9ro par ann\u00e9e)", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 269, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "Type d'op\u00e9ration (parmi une liste).", - "regexp_pre_filter": null, - "required": true, - "label": "Type d'op\u00e9ration", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 335, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "Ancien code unique de l'op\u00e9ration, peut \u00eatre la r\u00e9f\u00e9rence unique d'une op\u00e9ration pass\u00e9e comme un code DRACAR par exemple, 200 carac. max.", - "regexp_pre_filter": null, - "required": false, - "label": "Ancien code", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 270, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 7, - "description": "R\u00e9f\u00e9rence du dossier administratif associ\u00e9 \u00e0 l'op\u00e9ration sous la forme ANNEE-INDEX. Exemple : \"2002-4\".", - "regexp_pre_filter": null, - "required": false, - "label": "R\u00e9f\u00e9rence du dossier administratif", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 271, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 8, - "description": "Identifiants des sites (entit\u00e9s arch\u00e9ologiques) concern\u00e9es par l'op\u00e9ration, s\u00e9par\u00e9es par \u00ab\u00a0&\u00a0\u00bb. Exemple : \"44 125 0028 & 44 125 0029\".", - "regexp_pre_filter": null, - "required": false, - "label": "Identifiants des sites (EAs)", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 272, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "Types de vestiges (s\u00e9par\u00e9s par un \u00ab\u00a0&\u00a0\u00bb). Exemple : \"four & fosses & villa\".", - "regexp_pre_filter": null, - "required": false, - "label": "Types de vestiges", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 273, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 10, - "description": "P\u00e9riodes concern\u00e9es (s\u00e9par\u00e9es par un \u00ab\u00a0&\u00a0\u00bb). \r\nExemple : \"Gallo-romain & Fer & Med\".", - "regexp_pre_filter": null, - "required": false, - "label": "P\u00e9riodes", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 274, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 11, - "description": "Titre (M., Mme, etc.) du responsable scientifique.", - "regexp_pre_filter": null, - "required": false, - "label": "Titre du responsable scientifique", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 275, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 12, - "description": "Pr\u00e9nom du responsable scientifique (responsable d'op\u00e9ration).", - "regexp_pre_filter": null, - "required": false, - "label": "Pr\u00e9nom du responsable scientifique", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 276, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 13, - "description": "Nom du responsable scientifique (responsable d'op\u00e9ration).", - "regexp_pre_filter": null, - "required": false, - "label": "Nom du responsable scientifique", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 277, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 14, - "description": "Rattachement du responsable scientifique (responsable d'op\u00e9ration). Exemple : \"INRAP\" ou plus pr\u00e9cis \"INRAP Direction interr\u00e9gionale Grand Ouest\" selon votre degr\u00e9 de pr\u00e9cision dans la gestion des rattachements et des organisations.", - "regexp_pre_filter": null, - "required": false, - "label": "Rattachement du responsable scientifique", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 278, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 15, - "description": "Nom de l'op\u00e9rateur (organisation). Peut \u00eatre diff\u00e9rent de l'organisation de rattachement du responsable d'op\u00e9ration.", - "regexp_pre_filter": null, - "required": false, - "label": "Nom de l'op\u00e9rateur", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 279, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 16, - "description": "R\u00e9f\u00e9rence de l'op\u00e9rateur (code ou autre r\u00e9f\u00e9rence interne de l'op\u00e9rateur).", - "regexp_pre_filter": null, - "required": false, - "label": "R\u00e9f\u00e9rence de l'op\u00e9rateur", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 280, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 17, - "description": "Titre (M., Mme, etc.) du responsable du suivi scientifique.", - "regexp_pre_filter": null, - "required": false, - "label": "Titre du responsable du suivi scientifique", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 281, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 18, - "description": "Pr\u00e9nom du responsable du suivi scientifique. Exemple\u00a0: resp. SRA ou pilote de l'op\u00e9ration, mais non responsable de celle-ci.", - "regexp_pre_filter": null, - "required": false, - "label": "Pr\u00e9nom du responsable du suivi scientifique", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 282, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 19, - "description": "Nom du responsable du suivi scientifique. Exemple : resp. SRA ou pilote de l'op\u00e9ration, mais non responsable de celle-ci.", - "regexp_pre_filter": null, - "required": false, - "label": "Nom du responsable du suivi scientifique", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 283, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 20, - "description": "Rattachement du responsable du suivi scientifique.", - "regexp_pre_filter": null, - "required": false, - "label": "Rattachement du responsable du suivi scientifique", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 284, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 21, - "description": "Surface couverte par l'op\u00e9ration (m2).", - "regexp_pre_filter": null, - "required": false, - "label": "Surface couverte par l'op\u00e9ration", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 285, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 22, - "description": "Date de d\u00e9but de l'op\u00e9ration (habituellement d\u00e9but du terrain mais vous pouvez utiliser autre chose).", - "regexp_pre_filter": null, - "required": false, - "label": "Date de d\u00e9but de l'op\u00e9ration", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 286, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 23, - "description": "Date de fin de l'op\u00e9ration (habituellement fin du terrain mais vous pouvez utiliser autre chose).", - "regexp_pre_filter": null, - "required": false, - "label": "Date de fin de l'op\u00e9ration", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 287, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 24, - "description": "Date de cl\u00f4ture (peut \u00eatre la date de rendu de la documentation, la fin de la recherche associ\u00e9e ou autre). Habituellement cela repr\u00e9sente la date \u00e0 partir de laquelle la documentation issue de l'op\u00e9ration n'est plus du ressort du responsable d'op\u00e9ration, mais vous pouvez utiliser autre chose.", - "regexp_pre_filter": null, - "required": false, - "label": "Date de cl\u00f4ture", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 288, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 25, - "description": "Date d'avis. Exemple\u00a0: avis de CIRA ou autre selon votre usage.", - "regexp_pre_filter": null, - "required": false, - "label": "Date d'avis", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 289, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 26, - "description": "R\u00e9sultats consid\u00e9r\u00e9s comme n\u00e9gatif (d\u2019ordinaire utilis\u00e9 pour les diagnostics n\u00e9gatifs).", - "regexp_pre_filter": null, - "required": false, - "label": "R\u00e9sultats consid\u00e9r\u00e9s comme n\u00e9gatif", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 290, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 27, - "description": "Pr\u00e9nom du rapporteur (CIRA ou autre selon votre usage de la notion d'avis).", - "regexp_pre_filter": null, - "required": false, - "label": "Pr\u00e9nom du rapporteur", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 291, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 28, - "description": "Nom du rapporteur (CIRA ou autre selon votre usage de la notion d'avis).", - "regexp_pre_filter": null, - "required": false, - "label": "Nom du rapporteur", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 292, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 29, - "description": "Rattachement rapporteur (organisation).", - "regexp_pre_filter": null, - "required": false, - "label": "Rattachement du rapporteur", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 293, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 30, - "description": "Date limite pr\u00e9vue pour le rendu de la documentation scientifique.", - "regexp_pre_filter": null, - "required": false, - "label": "Date limite pour le rendu de la documentation", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 294, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 31, - "description": "Documentation re\u00e7ue.", - "regexp_pre_filter": null, - "required": false, - "label": "Documentation re\u00e7ue", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 295, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 32, - "description": "Date limite pr\u00e9vue pour le rendu du mobilier.", - "regexp_pre_filter": null, - "required": false, - "label": "Date limite rendu du mobilier", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 296, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 33, - "description": "Mobilier re\u00e7u ou livr\u00e9 selon vos usages et proc\u00e9dures.", - "regexp_pre_filter": null, - "required": false, - "label": "Mobilier re\u00e7u", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 297, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 34, - "description": "Commentaire g\u00e9n\u00e9ral.", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire g\u00e9n\u00e9ral", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 298, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 35, - "description": "Date de livraison du rapport.", - "regexp_pre_filter": null, - "required": false, - "label": "Date de livraison du rapport", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 299, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 36, - "description": "\u00c9tat de traitement du rapport.", - "regexp_pre_filter": null, - "required": false, - "label": "\u00c9tat de traitement du rapport", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 300, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 37, - "description": "Commentaire sur la documentation scientifique (y compris mobilier).", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire sur la documentation", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 301, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 38, - "description": "Nom du fichier image (jpg ou png. Exemple \"IMG_5023.jpg\". Les fichiers images doivent \u00eatre joints \u00e0 l'import dans un fichier ZIP.", - "regexp_pre_filter": null, - "required": false, - "label": "Image", - "importer_type": 17, - "export_field_name": null - } - }, - { - "pk": 376, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code UNIQUE pour une op\u00e9ration (par exemple : code PATRIARCHE)", - "regexp_pre_filter": null, - "required": true, - "label": "Code op\u00e9ration", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 379, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Num\u00e9ro unique par op\u00e9ration", - "regexp_pre_filter": null, - "required": true, - "label": "Index (num\u00e9ro par op\u00e9ration)", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 378, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "Type de document", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 377, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Titre du document (max. 300 caract\u00e8res)", - "regexp_pre_filter": null, - "required": true, - "label": "Titre", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 380, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "R\u00e9f\u00e9rence libre (max. 100 caract\u00e8res)", - "regexp_pre_filter": null, - "required": false, - "label": "R\u00e9f\u00e9rence", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 381, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "R\u00e9f\u00e9rence interne libre (max. 100 caract\u00e8res)", - "regexp_pre_filter": null, - "required": false, - "label": "R\u00e9f\u00e9rence interne", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 382, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 7, - "description": "Adresse web compl\u00e8te (avec la partie http:// ou https://)", - "regexp_pre_filter": null, - "required": false, - "label": "Adresse web associ\u00e9e", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 383, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 8, - "description": "Date de r\u00e9ception (format JJ/MM/AAAA ou AAAA-MM-JJ)", - "regexp_pre_filter": null, - "required": false, - "label": "Date de r\u00e9ception", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 384, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "Date de cr\u00e9ation (format JJ/MM/AAAA ou AAAA-MM-JJ)", - "regexp_pre_filter": null, - "required": false, - "label": "Date de cr\u00e9ation", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 385, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 10, - "description": "Date de r\u00e9ception en documentation (format JJ/MM/AAAA ou AAAA-MM-JJ)", - "regexp_pre_filter": null, - "required": false, - "label": "Date de r\u00e9ception en documentation", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 386, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 11, - "description": "Texte libre", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 387, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 12, - "description": "Texte libre", - "regexp_pre_filter": null, - "required": false, - "label": "Description", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 388, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 13, - "description": "Texte libre", - "regexp_pre_filter": null, - "required": false, - "label": "Information suppl\u00e9mentaire", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 390, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 14, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Existe en doublon", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 389, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 15, - "description": "Nom (en casse haute) suivi du pr\u00e9nom de l'auteur (maximum 300 caract\u00e8res). Exemple : DUPONT Jean.", - "regexp_pre_filter": null, - "required": false, - "label": "Auteur principal", - "importer_type": 22, - "export_field_name": "" - } - }, - { - "pk": 303, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code PATRIARCHE ou code num\u00e9rique (entier) UNIQUE pour une op\u00e9ration.", - "regexp_pre_filter": null, - "required": true, - "label": "Code op\u00e9ration", - "importer_type": 19, - "export_field_name": "" - } - }, - { - "pk": 304, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Commune (via num\u00e9ro INSEE).", - "regexp_pre_filter": 2, - "required": true, - "label": "Commune", - "importer_type": 19, - "export_field_name": null - } - }, - { - "pk": 305, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "Identifiant externe.", - "regexp_pre_filter": null, - "required": true, - "label": "ID externe", - "importer_type": 19, - "export_field_name": "" - } - }, - { - "pk": 306, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Section. Exemple : \"ZA\". Maximum 4 caract\u00e8res.", - "regexp_pre_filter": null, - "required": true, - "label": "Section", - "importer_type": 19, - "export_field_name": null - } - }, - { - "pk": 307, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "Num\u00e9ro de la parcelle. Exemple : \"253\". Peut accueillir une r\u00e9f\u00e9rence sous la forme de caract\u00e8res (maximum 6).", - "regexp_pre_filter": null, - "required": true, - "label": "Parcelle", - "importer_type": 19, - "export_field_name": null - } - }, - { - "pk": 308, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "Ann\u00e9e de la r\u00e9f\u00e9rence cadastrale. Exemple : \"1980\".", - "regexp_pre_filter": null, - "required": false, - "label": "Ann\u00e9e cadastrale", - "importer_type": 19, - "export_field_name": null - } - }, - { - "pk": 309, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 7, - "description": "Lieu-dit ou adresse associ\u00e9s \u00e0 la parcelle.", - "regexp_pre_filter": null, - "required": false, - "label": "Adresse", - "importer_type": 19, - "export_field_name": null - } - }, - { - "pk": 310, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 8, - "description": "Parcelle dans le domaine public ou non (oui/non).", - "regexp_pre_filter": null, - "required": false, - "label": "Domaine public", - "importer_type": 19, - "export_field_name": null - } - }, - { - "pk": 369, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "UE (identifiant externe) - membre de gauche", - "importer_type": 21, - "export_field_name": null - } - }, - { - "pk": 370, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "Type de relation entre UE", - "importer_type": 21, - "export_field_name": null - } - }, - { - "pk": 371, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "UE (identifiant externe) - membre de droite", - "importer_type": 21, - "export_field_name": null - } - }, - { - "pk": 302, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code PATRIARCHE ou code UNIQUE de l'op\u00e9ration associ\u00e9e.", - "regexp_pre_filter": null, - "required": true, - "label": "Code op\u00e9ration", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 311, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Commune (via num\u00e9ro INSEE).", - "regexp_pre_filter": null, - "required": true, - "label": "INSEE", - "importer_type": 18, - "export_field_name": "parcel__town__numero_insee" - } - }, - { - "pk": 312, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "Parcelle (identifiant externe), soit la section plus la parcelle sans espaces. Exemple : \"ZA253\".", - "regexp_pre_filter": null, - "required": true, - "label": "Parcelle", - "importer_type": 18, - "export_field_name": "parcel__section|parcel__parcel_number" - } - }, - { - "pk": 313, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Ann\u00e9e de la r\u00e9f\u00e9rence cadastrale. Exemple : \"1980\".", - "regexp_pre_filter": null, - "required": false, - "label": "Ann\u00e9e cadastre", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 314, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "Identifiant (externe) de l'UE. Exemple : \"US 145\", \"Tranch\u00e9e 145\", \"145\", \"St 17\", etc. Doit \u00eatre unique pour une parcelle donn\u00e9e. Maximum 200 caract\u00e8res.", - "regexp_pre_filter": null, - "required": true, - "label": "Identifiant UE", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 315, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "Type d'UE. Exemple : \"US\", \"Couche\", \"Tranch\u00e9e\", \"zone\", \"Secteur\", \"Log\", \"Carr\u00e9\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Type", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 316, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 7, - "description": "Description.", - "regexp_pre_filter": null, - "required": false, - "label": "Description", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 317, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 8, - "description": "Commentaire g\u00e9n\u00e9ral.", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire g\u00e9n\u00e9ral", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 318, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "Taille ou longueur (en m\u00e8tre). Exemple : \"1.2\", \"12\".", - "regexp_pre_filter": null, - "required": false, - "label": "Taille ou longueur", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 319, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 10, - "description": "Largeur (en m\u00e8tre). Exemple : \"1.2\", \"12\".", - "regexp_pre_filter": null, - "required": false, - "label": "Largeur", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 320, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 11, - "description": "\u00c9paisseur (en m\u00e8tre). Exemple : \"0.2\", \"2\".", - "regexp_pre_filter": null, - "required": false, - "label": "\u00c9paisseur", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 321, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 12, - "description": "Profondeur (en m\u00e8tre). Exemple : \"0.2\", \"2\".", - "regexp_pre_filter": null, - "required": false, - "label": "Profondeur", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 322, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 13, - "description": "Lieu, description textuelle de la localisation. Exemple : \"Au pied de l'arbre du P\u00e8re Jahouen\", \"En limite nord de la parcelle\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Lieu, localisation", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 323, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 14, - "description": "Champ \u00e0 choix multiple (s\u00e9par\u00e9 par \u00ab & \u00bb) permettant de pr\u00e9ciser : contient du mobilier, dispose d'une photo, etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Documentations", - "importer_type": 18, - "export_field_name": "" - } - }, - { - "pk": 324, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 15, - "description": "Nom du fichier image (jpg ou png). Exemple : \"IMG_5023.jpg\". Les fichiers images doivent \u00eatre joints \u00e0 l'import dans un fichier ZIP.", - "regexp_pre_filter": null, - "required": false, - "label": "Image", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 325, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 16, - "description": "Chronologies associ\u00e9es (plusieurs possibles s\u00e9par\u00e9es par &). Exemple : \"Gallo-romain & M\u00e9di\u00e9val\", \"GR&MED\", \"M\u00e9solithique final & M\u00e9so moyen & Epipal\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "P\u00e9riodes", - "importer_type": 18, - "export_field_name": "datings__period__label" - } - }, - { - "pk": 326, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 17, - "description": "Commentaire sur les datations. Exemple : \"IIe - IIIe s.\", \"fin XVe ou plus tard\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire sur les datations", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 327, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 18, - "description": "Description du remplissage. Exemple : \"Limons argileux brun riche en charbons\".", - "regexp_pre_filter": null, - "required": false, - "label": "Description du remplissage", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 328, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 19, - "description": "Interpr\u00e9tation. Exemple : \"Mur de cl\u00f4ture\", \"Sol couvert d'une mosa\u00efque, \"Pal\u00e9osol du d\u00e9but de l'Holoc\u00e8ne\", \"Four de r\u00e9duction de minerai de fer\", \"TP\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Interpr\u00e9tation", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 329, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 20, - "description": "Activit\u00e9, r\u00e9f\u00e9rence \u00e0 des types. Exemple : \"Naturelle\", \"Construction\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Type d'activit\u00e9", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 330, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 21, - "description": "Identification (type). Exemple : \"Niveau d'occupation\", \"Mur\", \"Colluvions\", \"Chablis\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "Identification (type)", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 331, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 22, - "description": "Terminus ante quem, limite temporelle avant laquelle l'UE s'est form\u00e9e, ici sous la forme de valeurs enti\u00e8res. Exemple : \"322\", \"-45\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "TAQ", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 332, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 23, - "description": "Terminus post quem, limite temporelle apr\u00e8s laquelle l'UE s'est form\u00e9e, ici sous la forme de valeurs enti\u00e8res. Exemple : \"322\", \"-45\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "TPQ", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 333, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 24, - "description": "Terminus ante quem estim\u00e9, limite temporelle avant laquelle l'UE s'est form\u00e9e, ici sous la forme de valeurs enti\u00e8res. Exemple : \"322\", \"-45\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "TAQ estim\u00e9", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 334, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 25, - "description": "Terminus post quem estim\u00e9, limite temporelle avant laquelle l'UE s'est form\u00e9e, ici sous la forme de valeurs enti\u00e8res. Exemple : \"322\", \"-45\", etc.", - "regexp_pre_filter": null, - "required": false, - "label": "TPQ estim\u00e9", - "importer_type": 18, - "export_field_name": null - } - }, - { - "pk": 14, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code Patriarche de l'op\u00e9ration associ\u00e9e", - "regexp_pre_filter": null, - "required": true, - "label": "Code Patriarche", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 15, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "Identifiant externe", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 16, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "Type de document", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 17, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Type de support", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 18, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Num\u00e9ro", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 19, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Nom de l'auteur", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 20, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 7, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Date de cr\u00e9ation", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 21, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 8, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Type de format", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 22, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Description", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 23, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 12, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 24, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 13, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "\u00c9chelle", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 25, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 16, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "Information suppl\u00e9mentaire", - "importer_type": 3, - "export_field_name": null - } - }, - { - "pk": 36, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code patriarche de l'op\u00e9ration associ\u00e9e", - "regexp_pre_filter": null, - "required": true, - "label": "Code Patriarche", - "importer_type": 5, - "export_field_name": "base_finds__context_record__operation__code_patriarche" - } - }, - { - "pk": 227, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Commune (via num\u00e9ro INSEE)", - "regexp_pre_filter": null, - "required": true, - "label": "Commune", - "importer_type": 5, - "export_field_name": "base_finds__context_record__parcel__town__numero_insee" - } - }, - { - "pk": 226, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "Identifiant parcelle", - "regexp_pre_filter": null, - "required": true, - "label": "Parcelle", - "importer_type": 5, - "export_field_name": "base_finds__context_record__parcel__section|base_finds__context_record__parcel__parcel_number" - } - }, - { - "pk": 43, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Identifiant UE", - "regexp_pre_filter": null, - "required": true, - "label": "UE", - "importer_type": 5, - "export_field_name": "base_finds__context_record__label" - } - }, - { - "pk": 37, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "Identifiant externe", - "regexp_pre_filter": null, - "required": true, - "label": "Identifiant externe", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 39, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "Sous classe de mat\u00e9riaux", - "regexp_pre_filter": null, - "required": false, - "label": "Mat\u00e9riau", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 229, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 12, - "description": "Ref. du contenant / label temporaire utilis\u00e9 pour le mobilier = label libre = Label pour l'instant", - "regexp_pre_filter": null, - "required": false, - "label": "Libell\u00e9 contenant", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 40, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 13, - "description": "Nombre d'\u00e9l\u00e9ments", - "regexp_pre_filter": null, - "required": false, - "label": "Nombre d'\u00e9l\u00e9ments", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 41, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 14, - "description": "Poids", - "regexp_pre_filter": null, - "required": false, - "label": "Poids", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 42, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 15, - "description": "Unit\u00e9 de poids", - "regexp_pre_filter": null, - "required": false, - "label": "Unit\u00e9 de poids", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 44, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 16, - "description": "Date de d\u00e9couverte", - "regexp_pre_filter": null, - "required": false, - "label": "Date de d\u00e9couverte", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 45, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 17, - "description": "\u00c9tat de conservation", - "regexp_pre_filter": null, - "required": false, - "label": "\u00c9tat de conservation", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 46, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 18, - "description": "Mesure de conservation", - "regexp_pre_filter": null, - "required": false, - "label": "Mesure de conservation", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 47, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 19, - "description": "Commentaire", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 228, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 20, - "description": "Datations s\u00e9par\u00e9es par des \"&\"", - "regexp_pre_filter": null, - "required": false, - "label": "Datation", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 48, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 21, - "description": "Localisation topographique", - "regexp_pre_filter": null, - "required": false, - "label": "Localisation topographique", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 49, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 22, - "description": "Int\u00e9r\u00eat sp\u00e9cifique", - "regexp_pre_filter": null, - "required": false, - "label": "Int\u00e9r\u00eat sp\u00e9cifique", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 50, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 23, - "description": "Description", - "regexp_pre_filter": null, - "required": false, - "label": "Description", - "importer_type": 5, - "export_field_name": null - } - }, - { - "pk": 1, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code Patriarche", - "regexp_pre_filter": null, - "required": true, - "label": "Code Patriarche", - "importer_type": 1, - "export_field_name": null - } - }, - { - "pk": 2, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "Type d'op\u00e9ration", - "importer_type": 1, - "export_field_name": null - } - }, - { - "pk": 3, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "Nom de l'op\u00e9ration", - "importer_type": 1, - "export_field_name": null - } - }, - { - "pk": 4, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "", - "regexp_pre_filter": null, - "required": true, - "label": "Nom de l'op\u00e9rateur", - "importer_type": 1, - "export_field_name": null - } - }, - { - "pk": 5, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "Nom du responsable de l'op\u00e9ration. Nom et Pr\u00e9nom sont group\u00e9s et donc mis dans le NOM seul dans l'annuaire.", - "regexp_pre_filter": null, - "required": true, - "label": "Nom du responsable de l'op\u00e9ration", - "importer_type": 1, - "export_field_name": null - } - }, - { - "pk": 6, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 7, - "description": "Date de d\u00e9but de l'op\u00e9ration avec le format ANN\u00c9E/MOIS/JOUR", - "regexp_pre_filter": null, - "required": true, - "label": "Date d\u00e9but", - "importer_type": 1, - "export_field_name": null - } - }, - { - "pk": 7, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 8, - "description": "Date de fin de l'op\u00e9ration avec le format ANN\u00c9E/MOIS/JOUR", - "regexp_pre_filter": null, - "required": true, - "label": "Date fin", - "importer_type": 1, - "export_field_name": null - } - }, - { - "pk": 8, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "", - "regexp_pre_filter": null, - "required": false, - "label": "P\u00e9riodes", - "importer_type": 1, - "export_field_name": null - } - }, - { - "pk": 9, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code Patriarche de l'op\u00e9ration associ\u00e9e", - "regexp_pre_filter": null, - "required": true, - "label": "Code Patriarche", - "importer_type": 2, - "export_field_name": null - } - }, - { - "pk": 12, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Commune (via num\u00e9ro INSEE)", - "regexp_pre_filter": 2, - "required": true, - "label": "Commune", - "importer_type": 2, - "export_field_name": null - } - }, - { - "pk": 53, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "Identifiant externe", - "regexp_pre_filter": null, - "required": true, - "label": "Identifiant externe", - "importer_type": 2, - "export_field_name": null - } - }, - { - "pk": 51, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Num\u00e9ro", - "regexp_pre_filter": null, - "required": false, - "label": "Parcelle", - "importer_type": 2, - "export_field_name": null - } - }, - { - "pk": 52, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "Section", - "regexp_pre_filter": null, - "required": false, - "label": "Section cadastrale", - "importer_type": 2, - "export_field_name": null - } - }, - { - "pk": 11, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "Ann\u00e9e", - "regexp_pre_filter": null, - "required": false, - "label": "Ann\u00e9e cadastrale", - "importer_type": 2, - "export_field_name": null - } - }, - { - "pk": 13, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "Lieu dit / adresse", - "regexp_pre_filter": null, - "required": false, - "label": "Adresse", - "importer_type": 2, - "export_field_name": null - } - }, - { - "pk": 26, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 1, - "description": "Code Patriarche de l'op\u00e9ration associ\u00e9e", - "regexp_pre_filter": null, - "required": true, - "label": "Code Patriarche", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 225, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 2, - "description": "Commune (via num\u00e9ro INSEE)", - "regexp_pre_filter": null, - "required": true, - "label": "Commune", - "importer_type": 4, - "export_field_name": "parcel__town__numero_insee" - } - }, - { - "pk": 33, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 3, - "description": "Parcelle (identifiant externe)", - "regexp_pre_filter": null, - "required": true, - "label": "Parcelle", - "importer_type": 4, - "export_field_name": "parcel__section|parcel__parcel_number" - } - }, - { - "pk": 27, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 4, - "description": "Identifiant externe ", - "regexp_pre_filter": null, - "required": true, - "label": "Identifiant externe", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 28, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 5, - "description": "Type", - "regexp_pre_filter": null, - "required": false, - "label": "Type", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 29, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 6, - "description": "Description", - "regexp_pre_filter": null, - "required": false, - "label": "Description", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 30, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 7, - "description": "Identification", - "regexp_pre_filter": null, - "required": false, - "label": "Identification", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 31, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 8, - "description": "Date d'ouverture", - "regexp_pre_filter": null, - "required": false, - "label": "Date d\u00e9but", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 32, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 9, - "description": "Date de fermeture", - "regexp_pre_filter": null, - "required": false, - "label": "Date fin", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 34, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 11, - "description": "Commentaire", - "regexp_pre_filter": null, - "required": false, - "label": "Commentaire", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 54, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 12, - "description": "Nature", - "regexp_pre_filter": null, - "required": false, - "label": "Nature", - "importer_type": 4, - "export_field_name": null - } - }, - { - "pk": 35, - "model": "ishtar_common.importercolumn", - "fields": { - "col_number": 13, - "description": "Chronologie (plusieurs possibles s\u00e9par\u00e9es par &)", - "regexp_pre_filter": null, - "required": false, - "label": "Chronologie", - "importer_type": 4, - "export_field_name": "datings__period__label" - } - }, - { - "pk": 15, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "operation__code_patriarche", - "column": 14, - "formater_type": 1, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 28, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "label", - "column": 27, - "formater_type": 3, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 13, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "town__numero_insee", - "column": 12, - "formater_type": 11, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 2, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "operation_type", - "column": 2, - "formater_type": 2, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 4, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "operator__name", - "column": 4, - "formater_type": 3, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 6, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "start_date", - "column": 6, - "formater_type": 5, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 7, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "excavation_end_date", - "column": 7, - "formater_type": 5, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 8, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "periods", - "column": 8, - "formater_type": 6, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 14, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "address", - "column": 13, - "formater_type": 10, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 16, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "external_id", - "column": 15, - "formater_type": 11, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 17, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "source_type", - "column": 16, - "formater_type": 12, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 18, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "support_type", - "column": 17, - "formater_type": 13, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 19, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "item_number", - "column": 18, - "formater_type": 1, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 20, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "authors__person__raw_name", - "column": 19, - "formater_type": 4, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 21, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "creation_date", - "column": 20, - "formater_type": 14, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 22, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "format_type", - "column": 21, - "formater_type": 15, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 23, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "description", - "column": 22, - "formater_type": 16, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 24, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "comment", - "column": 23, - "formater_type": 16, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 25, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "scale", - "column": 24, - "formater_type": 17, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 53, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "parcel_number", - "column": 51, - "formater_type": 8, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 54, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "section", - "column": 52, - "formater_type": 7, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 5, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "scientist__raw_name", - "column": 5, - "formater_type": 4, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 56, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "year", - "column": 11, - "formater_type": 14, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 35, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "comment", - "column": 34, - "formater_type": 16, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 31, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "identification", - "column": 30, - "formater_type": 24, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 57, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "interpretation", - "column": 54, - "formater_type": 16, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 26, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "additional_information", - "column": 25, - "formater_type": 16, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 29, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "unit", - "column": 28, - "formater_type": 18, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 30, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "description", - "column": 29, - "formater_type": 16, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 32, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "opening_date", - "column": 31, - "formater_type": 5, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 33, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "closing_date", - "column": 32, - "formater_type": 5, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 1, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "code_patriarche", - "column": 1, - "formater_type": 1, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 36, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "datings__period", - "column": 35, - "formater_type": 6, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": true - } - }, - { - "pk": 55, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "external_id", - "column": 53, - "formater_type": 11, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 27, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operation__code_patriarche", - "column": 26, - "formater_type": 1, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 250, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "parcel__external_id", - "column": 225, - "formater_type": 28, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 34, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "parcel__external_id", - "column": 33, - "formater_type": 11, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 9, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operation__code_patriarche", - "column": 9, - "formater_type": 1, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 290, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "code_patriarche", - "column": 265, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 293, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operation_code", - "column": 268, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 296, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "periods", - "column": 273, - "formater_type": 6, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 299, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "scientist__surname", - "column": 275, - "formater_type": 3, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 365, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__label", - "column": 340, - "formater_type": 3, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 308, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "surface", - "column": 284, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 311, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "end_date", - "column": 287, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 368, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__batch", - "column": 344, - "formater_type": 48, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 317, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "documentation_deadline", - "column": 293, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 320, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "finds_received", - "column": 296, - "formater_type": 19, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 323, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "report_processing", - "column": 299, - "formater_type": 37, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 325, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "image", - "column": 301, - "formater_type": 27, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 328, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "town__numero_insee", - "column": 304, - "formater_type": 11, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 331, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "parcel_number", - "column": 307, - "formater_type": 8, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 334, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "public_domain", - "column": 310, - "formater_type": 19, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 338, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "remains", - "column": 272, - "formater_type": 41, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 371, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "conservatory_state", - "column": 347, - "formater_type": 22, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 344, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "width", - "column": 319, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 374, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "preservation_to_considers", - "column": 350, - "formater_type": 23, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 349, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "image", - "column": 324, - "formater_type": 27, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 377, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "length", - "column": 353, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 356, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "taq", - "column": 331, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 359, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "tpq_estimated", - "column": 334, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 379, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "height", - "column": 355, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 382, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "find_number", - "column": 358, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 384, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "comment", - "column": 360, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 385, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "dating_comment", - "column": 361, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 350, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "datings__period", - "column": 325, - "formater_type": 6, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": true - } - }, - { - "pk": 335, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "parcel__external_id", - "column": 311, - "formater_type": 28, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 3, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "common_name", - "column": 3, - "formater_type": 3, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 291, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "common_name", - "column": 266, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 294, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operation_type", - "column": 269, - "formater_type": 2, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 300, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "scientist__name", - "column": 276, - "formater_type": 30, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 303, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operator_reference", - "column": 279, - "formater_type": 3, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 388, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "datings__period", - "column": 364, - "formater_type": 6, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": true - } - }, - { - "pk": 309, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "start_date", - "column": 285, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 312, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "cira_date", - "column": 288, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 37, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 36, - "formater_type": 11, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 318, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "documentation_received", - "column": 294, - "formater_type": 19, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 321, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "comment", - "column": 297, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 324, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "scientific_documentation_comment", - "column": 300, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 326, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operation__code_patriarche", - "column": 302, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 332, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "year", - "column": 308, - "formater_type": 14, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 252, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 227, - "formater_type": 28, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 251, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 226, - "formater_type": 35, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 345, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "thickness", - "column": 320, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 351, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "datings_comment", - "column": 326, - "formater_type": 16, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 354, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "activity", - "column": 329, - "formater_type": 42, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 357, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "tpq", - "column": 332, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 360, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "old_code", - "column": 335, - "formater_type": 30, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 38, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__label", - "column": 37, - "formater_type": 3, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 342, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "comment", - "column": 317, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 347, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "location", - "column": 322, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 353, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "interpretation", - "column": 328, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 341, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "description", - "column": 316, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 339, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "label", - "column": 314, - "formater_type": 30, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 302, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operator__name", - "column": 278, - "formater_type": 10, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 305, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "in_charge__surname", - "column": 281, - "formater_type": 39, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 306, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "in_charge__name", - "column": 282, - "formater_type": 30, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 314, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "cira_rapporteur__surname", - "column": 290, - "formater_type": 39, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 315, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "cira_rapporteur__name", - "column": 291, - "formater_type": 30, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 40, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "material_types", - "column": 39, - "formater_type": 20, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 41, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "find_number", - "column": 40, - "formater_type": 1, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 42, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "weight", - "column": 41, - "formater_type": 21, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 43, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "weight_unit", - "column": 42, - "formater_type": 7, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 45, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "base_finds__discovery_date", - "column": 44, - "formater_type": 5, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 46, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "conservatory_state", - "column": 45, - "formater_type": 22, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 47, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "preservation_to_considers", - "column": 46, - "formater_type": 23, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 48, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__comment", - "column": 47, - "formater_type": 35, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 253, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "datings__period", - "column": 228, - "formater_type": 6, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": true - } - }, - { - "pk": 49, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "base_finds__topographic_localisation", - "column": 48, - "formater_type": 3, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 50, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "base_finds__special_interest", - "column": 49, - "formater_type": 3, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 51, - "model": "ishtar_common.importtarget", - "fields": { - "comment": null, - "target": "base_finds__description", - "column": 50, - "formater_type": 16, - "concat_str": null, - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 329, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "external_id", - "column": 305, - "formater_type": 11, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 348, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "documentations", - "column": 323, - "formater_type": 52, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 395, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "relation_type", - "column": 370, - "formater_type": 49, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 394, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "left_record__external_id", - "column": 369, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 297, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "archaeological_sites__reference", - "column": 271, - "formater_type": 45, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 336, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "parcel__external_id", - "column": 312, - "formater_type": 11, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 366, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "previous_id", - "column": 341, - "formater_type": 3, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 369, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "is_complete", - "column": 345, - "formater_type": 19, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 372, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "conservatory_comment", - "column": 348, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 375, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "integrities", - "column": 351, - "formater_type": 43, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 378, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "width", - "column": 354, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 380, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "diameter", - "column": 356, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 383, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "mark", - "column": 359, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 386, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "estimated_value", - "column": 362, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 398, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "container__responsible__external_id", - "column": 373, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 400, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "container__container_type", - "column": 375, - "formater_type": 50, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 254, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "label", - "column": 229, - "formater_type": 3, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 402, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "title", - "column": 377, - "formater_type": 4, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 404, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "index", - "column": 379, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 406, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "internal_reference", - "column": 381, - "formater_type": 51, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 408, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "receipt_date", - "column": 383, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 410, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "receipt_date_in_documentation", - "column": 385, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 412, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "description", - "column": 387, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 414, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "authors__person__raw_name", - "column": 389, - "formater_type": 4, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 417, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 392, - "formater_type": 28, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 421, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__label", - "column": 396, - "formater_type": 3, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 419, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 394, - "formater_type": 35, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 423, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__parcel__section", - "column": 393, - "formater_type": 7, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 425, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__parcel__town__numero_insee", - "column": 337, - "formater_type": 28, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 396, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "right_record__external_id", - "column": 371, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 361, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 336, - "formater_type": 11, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 362, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 337, - "formater_type": 28, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 363, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 338, - "formater_type": 35, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 364, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 339, - "formater_type": 3, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 389, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__topographic_localisation", - "column": 343, - "formater_type": 3, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 367, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "description", - "column": 342, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 370, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "material_types", - "column": 346, - "formater_type": 20, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 373, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "object_types", - "column": 349, - "formater_type": 26, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 376, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "remarkabilities", - "column": 352, - "formater_type": 44, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 381, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "dimensions_comment", - "column": 357, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 397, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "weight", - "column": 372, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 387, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "image", - "column": 363, - "formater_type": 27, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 390, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__x", - "column": 365, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 391, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__y", - "column": 366, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 392, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__z", - "column": 367, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 393, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__spatial_reference_system", - "column": 368, - "formater_type": 46, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 399, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "container__reference", - "column": 374, - "formater_type": 17, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 44, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 43, - "formater_type": 3, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 327, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operation__code_patriarche", - "column": 303, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 403, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "source_type", - "column": 378, - "formater_type": 12, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 401, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "operation__code_patriarche", - "column": 376, - "formater_type": 35, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 405, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "reference", - "column": 380, - "formater_type": 51, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 407, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "associated_url", - "column": 382, - "formater_type": 4, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 409, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "creation_date", - "column": 384, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 411, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "comment", - "column": 386, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 413, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "additional_information", - "column": 388, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 295, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "associated_file__external_id", - "column": 270, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 415, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "duplicate", - "column": 390, - "formater_type": 19, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 416, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 391, - "formater_type": 11, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 310, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "excavation_end_date", - "column": 286, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 313, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "negative_result", - "column": 289, - "formater_type": 19, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 319, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "finds_deadline", - "column": 295, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 322, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "report_delivery_date", - "column": 298, - "formater_type": 25, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 330, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "section", - "column": 306, - "formater_type": 7, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 333, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "address", - "column": 309, - "formater_type": 10, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 292, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "year", - "column": 267, - "formater_type": 14, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 337, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "parcel__year", - "column": 313, - "formater_type": 14, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 340, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "unit", - "column": 315, - "formater_type": 18, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 343, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "length", - "column": 318, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 346, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "depth", - "column": 321, - "formater_type": 21, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 301, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "scientist__attached_to__name", - "column": 277, - "formater_type": 30, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 418, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 393, - "formater_type": 35, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 420, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__external_id", - "column": 395, - "formater_type": 3, - "concat_str": "-", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 355, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "identification", - "column": 330, - "formater_type": 24, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 358, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "taq_estimated", - "column": 333, - "formater_type": 1, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 422, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__parcel__town__numero_insee", - "column": 392, - "formater_type": 11, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 424, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "base_finds__context_record__parcel__parcel_number", - "column": 394, - "formater_type": 8, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 352, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "filling", - "column": 327, - "formater_type": 35, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 304, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "in_charge__title", - "column": 280, - "formater_type": 47, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 298, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "scientist__title", - "column": 274, - "formater_type": 47, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 307, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "in_charge__attached_to__name", - "column": 283, - "formater_type": 10, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 316, - "model": "ishtar_common.importtarget", - "fields": { - "comment": "", - "target": "cira_rapporteur__attached_to__name", - "column": 292, - "formater_type": 10, - "concat_str": "", - "regexp_filter": null, - "concat": false, - "force_new": false - } - }, - { - "pk": 25, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "DateFormater", - "many_split": " | ", - "options": "%d/%m/%Y | %Y-%m-%d" - } - }, - { - "pk": 5, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "DateFormater", - "many_split": "", - "options": "%Y/%m/%d" - } - }, - { - "pk": 27, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "FileFormater", - "many_split": "", - "options": "" - } - }, - { - "pk": 21, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "FloatFormater", - "many_split": "", - "options": "" - } - }, - { - "pk": 1, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "IntegerFormater", - "many_split": "", - "options": "" - } - }, - { - "pk": 19, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "StrToBoolean", - "many_split": "", - "options": "" - } - }, - { - "pk": 42, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_context_records.models.ActivityType" - } - }, - { - "pk": 52, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "&", - "options": "archaeological_context_records.models.DocumentationType" - } - }, - { - "pk": 24, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_context_records.models.IdentificationType" - } - }, - { - "pk": 49, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_context_records.models.RelationType" - } - }, - { - "pk": 18, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_context_records.models.Unit" - } - }, - { - "pk": 34, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_files.models.PermitType" - } - }, - { - "pk": 32, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_files.models.SaisineType" - } - }, - { - "pk": 48, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_finds.models.BatchType" - } - }, - { - "pk": 22, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_finds.models.ConservatoryState" - } - }, - { - "pk": 43, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "&", - "options": "archaeological_finds.models.IntegrityType" - } - }, - { - "pk": 20, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "&", - "options": "archaeological_finds.models.MaterialType" - } - }, - { - "pk": 26, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_finds.models.ObjectType" - } - }, - { - "pk": 23, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_finds.models.PreservationType" - } - }, - { - "pk": 44, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "&", - "options": "archaeological_finds.models.RemarkabilityType" - } - }, - { - "pk": 2, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_operations.models.OperationType" - } - }, - { - "pk": 6, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "&", - "options": "archaeological_operations.models.Period" - } - }, - { - "pk": 41, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "&", - "options": "archaeological_operations.models.RemainType" - } - }, - { - "pk": 37, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_operations.models.ReportState" - } - }, - { - "pk": 50, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "archaeological_warehouse.models.ContainerType" - } - }, - { - "pk": 15, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "Format" - } - }, - { - "pk": 12, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "SourceType" - } - }, - { - "pk": 46, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "SpatialReferenceSystem" - } - }, - { - "pk": 13, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "SupportType" - } - }, - { - "pk": 47, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "TypeFormater", - "many_split": "", - "options": "TitleType" - } - }, - { - "pk": 35, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "" - } - }, - { - "pk": 38, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "10" - } - }, - { - "pk": 51, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "100" - } - }, - { - "pk": 16, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "1000" - } - }, - { - "pk": 11, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "12" - } - }, - { - "pk": 3, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "120" - } - }, - { - "pk": 45, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "20" - } - }, - { - "pk": 30, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "200" - } - }, - { - "pk": 33, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "2000" - } - }, - { - "pk": 17, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "30" - } - }, - { - "pk": 4, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "300" - } - }, - { - "pk": 7, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "4" - } - }, - { - "pk": 28, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "5" - } - }, - { - "pk": 39, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "50" - } - }, - { - "pk": 10, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "500" - } - }, - { - "pk": 8, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "6" - } - }, - { - "pk": 36, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "60" - } - }, - { - "pk": 31, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnicodeFormater", - "many_split": "", - "options": "70" - } - }, - { - "pk": 29, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "UnknowType", - "many_split": "", - "options": "" - } - }, - { - "pk": 14, - "model": "ishtar_common.formatertype", - "fields": { - "formater_type": "YearFormater", - "many_split": "", - "options": "%Y" - } - }, - { - "pk": 5, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 5, - "concat_str": null, - "field_name": "scientist__name", - "concat": false, - "force_new": false - } - }, - { - "pk": 15, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 9, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 16, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 12, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 17, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 26, - "concat_str": "-", - "field_name": "parcel__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 18, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 26, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 19, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 225, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 20, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 33, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 6, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 27, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 34, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 303, - "concat_str": "", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 33, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 304, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 31, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 302, - "concat_str": "-", - "field_name": "parcel__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 32, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 302, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 35, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 311, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 36, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 312, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 37, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 314, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 38, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 336, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 39, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 336, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 40, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 337, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 41, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 337, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 42, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 338, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 43, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 338, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 44, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 339, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 45, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 339, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 46, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 340, - "concat_str": "", - "field_name": "label", - "concat": false, - "force_new": false - } - }, - { - "pk": 47, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 340, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 48, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 340, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 49, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 373, - "concat_str": "", - "field_name": "container__location__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 50, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 373, - "concat_str": "", - "field_name": "container__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 51, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 374, - "concat_str": "", - "field_name": "container__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 21, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 36, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 29, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 36, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 22, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 227, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 28, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 227, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 23, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 226, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 27, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 226, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 24, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 43, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 26, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 43, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 1, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 37, - "concat_str": null, - "field_name": "label", - "concat": false, - "force_new": false - } - }, - { - "pk": 3, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 37, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 25, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 37, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 52, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 376, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 53, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 379, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 54, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 391, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 55, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 391, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 56, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 392, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 57, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 392, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 58, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 393, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 59, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 393, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 62, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 395, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 63, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 395, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 64, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 396, - "concat_str": "", - "field_name": "label", - "concat": false, - "force_new": false - } - }, - { - "pk": 65, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 396, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 66, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 396, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 60, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 394, - "concat_str": "-", - "field_name": "base_finds__external_id", - "concat": false, - "force_new": false - } - }, - { - "pk": 61, - "model": "ishtar_common.importerduplicatefield", - "fields": { - "column": 394, - "concat_str": "-", - "field_name": "external_id", - "concat": false, - "force_new": false - } - } -]
\ No newline at end of file +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Organisation", + "klass": "ishtar_common.models.Organization" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Dossier arch\u00e9ologique", + "klass": "archaeological_files.models.File" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Mobilier de base", + "klass": "archaeological_finds.models.BaseFind" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Entit\u00e9 arch\u00e9ologique", + "klass": "archaeological_operations.models.ArchaeologicalSite" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Personne", + "klass": "ishtar_common.models.Person" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Op\u00e9ration", + "klass": "archaeological_operations.models.Operation" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Unit\u00e9 d'Enregistrement", + "klass": "archaeological_context_records.models.ContextRecord" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Documentation d'op\u00e9ration", + "klass": "archaeological_operations.models.OperationSource" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Parcelle", + "klass": "archaeological_operations.models.Parcel" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Relation entre Unit\u00e9s d'Enregistrement", + "klass": "archaeological_context_records.models.RecordRelations" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Datation", + "klass": "archaeological_context_records.models.Dating" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Find", + "klass": "archaeological_finds.models_finds.Find" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Documentation d'UE", + "klass": "archaeological_context_records.models.ContextRecordSource" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Documentation mobilier", + "klass": "archaeological_finds.models_finds.FindSource" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Documentation de traitement", + "klass": "archaeological_finds.models_treatments.TreatmentSource" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Documentation de demande de traitement", + "klass": "archaeological_finds.models_treatments.TreatmentFileSource" + } +}, +{ + "model": "ishtar_common.importermodel", + "fields": { + "name": "Auteur", + "klass": "ishtar_common.models.Author" + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "MCC - Op\u00e9rations", + "slug": "mcc-operations", + "description": "", + "associated_models": [ + "archaeological_operations.models.Operation" + ], + "is_template": true, + "unicity_keys": "code_patriarche", + "users": [], + "created_models": [] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "MCC - Parcelles", + "slug": "mcc-parcelles", + "description": "", + "associated_models": [ + "archaeological_operations.models.Parcel" + ], + "is_template": true, + "unicity_keys": "external_id", + "users": [], + "created_models": [] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "MCC - Documentation", + "slug": "mcc-documentation", + "description": "", + "associated_models": [ + "archaeological_operations.models.OperationSource" + ], + "is_template": true, + "unicity_keys": "", + "users": [], + "created_models": [] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "MCC - UE", + "slug": "mcc-ue", + "description": "", + "associated_models": [ + "archaeological_context_records.models.ContextRecord" + ], + "is_template": true, + "unicity_keys": "external_id", + "users": [], + "created_models": [] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "MCC - Mobilier", + "slug": "mcc-mobilier", + "description": "", + "associated_models": [ + "archaeological_finds.models_finds.Find" + ], + "is_template": true, + "unicity_keys": "external_id", + "users": [], + "created_models": [] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "Ishtar - Op\u00e9rations", + "slug": "ishtar-operations", + "description": "Import complet standard operations", + "associated_models": [ + "archaeological_operations.models.Operation" + ], + "is_template": true, + "unicity_keys": "code_patriarche", + "users": [], + "created_models": [ + [ + "archaeological_operations.models.ArchaeologicalSite" + ], + [ + "archaeological_operations.models.Operation" + ], + [ + "ishtar_common.models.Person" + ] + ] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "Ishtar - UE", + "slug": "ishtar-context-record", + "description": "Unit\u00e9s d'enregisttrement", + "associated_models": [ + "archaeological_context_records.models.ContextRecord" + ], + "is_template": true, + "unicity_keys": "external_id", + "users": [], + "created_models": [ + [ + "archaeological_context_records.models.Dating" + ], + [ + "archaeological_context_records.models.ContextRecord" + ] + ] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "Ishtar - Parcelles", + "slug": "ishtar-parcels", + "description": "Parcelles de terrain", + "associated_models": [ + "archaeological_operations.models.Parcel" + ], + "is_template": true, + "unicity_keys": "external_id", + "users": [], + "created_models": [] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "Ishtar - Mobilier", + "slug": "ishtar-finds", + "description": "Mobilier", + "associated_models": [ + "archaeological_finds.models_finds.Find" + ], + "is_template": true, + "unicity_keys": "external_id", + "users": [], + "created_models": [] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "Ishtar - Relations entre UE", + "slug": "ishtar-ue-relations", + "description": "", + "associated_models": [ + "archaeological_context_records.models.RecordRelations" + ], + "is_template": true, + "unicity_keys": "", + "users": [], + "created_models": [ + [ + "archaeological_context_records.models.RecordRelations" + ] + ] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "Ishtar - Op\u00e9rations - Documentation", + "slug": "ishtar-operations-sources", + "description": "Documentation d'op\u00e9ration", + "associated_models": [ + "archaeological_operations.models.OperationSource" + ], + "is_template": true, + "unicity_keys": "external_id", + "users": [], + "created_models": [ + [ + "ishtar_common.models.Author" + ], + [ + "archaeological_operations.models.OperationSource" + ], + [ + "ishtar_common.models.Person" + ] + ] + } +}, +{ + "model": "ishtar_common.importertype", + "fields": { + "name": "Ishtar - Mobilier COMBO", + "slug": "ishtar_finds_parcels_and_cr", + "description": "Importeur de mobilier + parcelles et UE", + "associated_models": [ + "archaeological_finds.models_finds.Find" + ], + "is_template": true, + "unicity_keys": "external_id", + "users": [], + "created_models": [ + [ + "archaeological_finds.models_finds.Find" + ], + [ + "archaeological_finds.models.BaseFind" + ], + [ + "archaeological_operations.models.Parcel" + ], + [ + "archaeological_context_records.models.ContextRecord" + ] + ] + } +}, +{ + "model": "ishtar_common.regexp", + "fields": { + "name": "Num\u00e9ro INSEE", + "description": "", + "regexp": "([0-9]*)" + } +}, +{ + "model": "ishtar_common.importerdefault", + "fields": { + "importer_type": [ + "mcc-operations" + ], + "target": "operator" + } +}, +{ + "model": "ishtar_common.importerdefault", + "fields": { + "importer_type": [ + "mcc-documentation" + ], + "target": "authors" + } +}, +{ + "model": "ishtar_common.importerdefault", + "fields": { + "importer_type": [ + "ishtar-operations" + ], + "target": "operator" + } +}, +{ + "model": "ishtar_common.importerdefault", + "fields": { + "importer_type": [ + "ishtar-operations" + ], + "target": "scientist__person_types" + } +}, +{ + "model": "ishtar_common.importerdefault", + "fields": { + "importer_type": [ + "ishtar-operations-sources" + ], + "target": "authors" + } +}, +{ + "model": "ishtar_common.importerdefault", + "fields": { + "importer_type": [ + "ishtar-parcels" + ], + "target": "public_domain" + } +}, +{ + "model": "ishtar_common.importerdefaultvalues", + "fields": { + "default_target": [ + "mcc-operations", + "operator" + ], + "target": "organization_type", + "value": "operator" + } +}, +{ + "model": "ishtar_common.importerdefaultvalues", + "fields": { + "default_target": [ + "mcc-documentation", + "authors" + ], + "target": "author_type", + "value": "main_author" + } +}, +{ + "model": "ishtar_common.importerdefaultvalues", + "fields": { + "default_target": [ + "ishtar-operations", + "operator" + ], + "target": "organization_type", + "value": "operator" + } +}, +{ + "model": "ishtar_common.importerdefaultvalues", + "fields": { + "default_target": [ + "ishtar-operations", + "scientist__person_types" + ], + "target": "txt_idx", + "value": "head_scientist" + } +}, +{ + "model": "ishtar_common.importerdefaultvalues", + "fields": { + "default_target": [ + "ishtar-operations-sources", + "authors" + ], + "target": "author_type", + "value": "main_author" + } +}, +{ + "model": "ishtar_common.importerdefaultvalues", + "fields": { + "default_target": [ + "ishtar-parcels", + "public_domain" + ], + "target": "public_domain", + "value": "False" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code Patriarche", + "importer_type": [ + "mcc-operations" + ], + "col_number": 1, + "description": "Code Patriarche", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type d'op\u00e9ration", + "importer_type": [ + "mcc-operations" + ], + "col_number": 3, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom de l'op\u00e9ration", + "importer_type": [ + "mcc-operations" + ], + "col_number": 4, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom de l'op\u00e9rateur", + "importer_type": [ + "mcc-operations" + ], + "col_number": 5, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom du responsable de l'op\u00e9ration", + "importer_type": [ + "mcc-operations" + ], + "col_number": 6, + "description": "Nom du responsable de l'op\u00e9ration. Nom et Pr\u00e9nom sont group\u00e9s et donc mis dans le NOM seul dans l'annuaire.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date d\u00e9but", + "importer_type": [ + "mcc-operations" + ], + "col_number": 7, + "description": "Date de d\u00e9but de l'op\u00e9ration avec le format ANN\u00c9E/MOIS/JOUR", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date fin", + "importer_type": [ + "mcc-operations" + ], + "col_number": 8, + "description": "Date de fin de l'op\u00e9ration avec le format ANN\u00c9E/MOIS/JOUR", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "P\u00e9riodes", + "importer_type": [ + "mcc-operations" + ], + "col_number": 9, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code Patriarche", + "importer_type": [ + "mcc-parcelles" + ], + "col_number": 1, + "description": "Code Patriarche de l'op\u00e9ration associ\u00e9e", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Ann\u00e9e cadastrale", + "importer_type": [ + "mcc-parcelles" + ], + "col_number": 6, + "description": "Ann\u00e9e", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commune", + "importer_type": [ + "mcc-parcelles" + ], + "col_number": 2, + "description": "Commune (via num\u00e9ro INSEE)", + "regexp_pre_filter": [ + "Num\u00e9ro INSEE" + ], + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Adresse", + "importer_type": [ + "mcc-parcelles" + ], + "col_number": 9, + "description": "Lieu dit / adresse", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code Patriarche", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 1, + "description": "Code Patriarche de l'op\u00e9ration associ\u00e9e", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identifiant externe", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 2, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type de document", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 3, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type de support", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 4, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Num\u00e9ro", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 5, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom de l'auteur", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 6, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de cr\u00e9ation", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 7, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type de format", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 8, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Description", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 9, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 12, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "\u00c9chelle", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 13, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Information suppl\u00e9mentaire", + "importer_type": [ + "mcc-documentation" + ], + "col_number": 16, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code Patriarche", + "importer_type": [ + "mcc-ue" + ], + "col_number": 1, + "description": "Code Patriarche de l'op\u00e9ration associ\u00e9e", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identifiant externe", + "importer_type": [ + "mcc-ue" + ], + "col_number": 4, + "description": "Identifiant externe ", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type", + "importer_type": [ + "mcc-ue" + ], + "col_number": 5, + "description": "Type", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Description", + "importer_type": [ + "mcc-ue" + ], + "col_number": 6, + "description": "Description", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identification", + "importer_type": [ + "mcc-ue" + ], + "col_number": 7, + "description": "Identification", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date d\u00e9but", + "importer_type": [ + "mcc-ue" + ], + "col_number": 8, + "description": "Date d'ouverture", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date fin", + "importer_type": [ + "mcc-ue" + ], + "col_number": 9, + "description": "Date de fermeture", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Parcelle", + "importer_type": [ + "mcc-ue" + ], + "col_number": 3, + "description": "Parcelle (identifiant externe)", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "parcel__section|parcel__parcel_number" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire", + "importer_type": [ + "mcc-ue" + ], + "col_number": 11, + "description": "Commentaire", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Chronologie", + "importer_type": [ + "mcc-ue" + ], + "col_number": 13, + "description": "Chronologie (plusieurs possibles s\u00e9par\u00e9es par &)", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "datings__period__label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code Patriarche", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 1, + "description": "Code patriarche de l'op\u00e9ration associ\u00e9e", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__operation__code_patriarche" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identifiant externe", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 5, + "description": "Identifiant externe", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Mat\u00e9riau", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 9, + "description": "Sous classe de mat\u00e9riaux", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nombre d'\u00e9l\u00e9ments", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 13, + "description": "Nombre d'\u00e9l\u00e9ments", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Poids", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 14, + "description": "Poids", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Unit\u00e9 de poids", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 15, + "description": "Unit\u00e9 de poids", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "UE", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 4, + "description": "Identifiant UE", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de d\u00e9couverte", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 16, + "description": "Date de d\u00e9couverte", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "\u00c9tat de conservation", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 17, + "description": "\u00c9tat de conservation", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Mesure de conservation", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 18, + "description": "Mesure de conservation", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 19, + "description": "Commentaire", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Localisation topographique", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 21, + "description": "Localisation topographique", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Int\u00e9r\u00eat sp\u00e9cifique", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 22, + "description": "Int\u00e9r\u00eat sp\u00e9cifique", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Description", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 23, + "description": "Description", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Parcelle", + "importer_type": [ + "mcc-parcelles" + ], + "col_number": 4, + "description": "Num\u00e9ro", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Section cadastrale", + "importer_type": [ + "mcc-parcelles" + ], + "col_number": 5, + "description": "Section", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identifiant externe", + "importer_type": [ + "mcc-parcelles" + ], + "col_number": 3, + "description": "Identifiant externe", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nature", + "importer_type": [ + "mcc-ue" + ], + "col_number": 12, + "description": "Nature", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commune", + "importer_type": [ + "mcc-ue" + ], + "col_number": 2, + "description": "Commune (via num\u00e9ro INSEE)", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "parcel__town__numero_insee" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Parcelle", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 3, + "description": "Identifiant parcelle", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__parcel__section|base_finds__context_record__parcel__parcel_number" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commune", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 2, + "description": "Commune (via num\u00e9ro INSEE)", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__parcel__town__numero_insee" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Datation", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 20, + "description": "Datations s\u00e9par\u00e9es par des \"&\"", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Libell\u00e9 contenant", + "importer_type": [ + "mcc-mobilier" + ], + "col_number": 12, + "description": "Ref. du contenant / label temporaire utilis\u00e9 pour le mobilier = label libre = Label pour l'instant", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code op\u00e9ration", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 1, + "description": "Code PATRIARCHE ou code num\u00e9rique (entier) UNIQUE pour une op\u00e9ration.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 2, + "description": "Nom usuel de l'op\u00e9ration.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Ann\u00e9e", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 3, + "description": "Ann\u00e9e de r\u00e9f\u00e9rence (peut \u00eatre celle o\u00f9 le projet d'op\u00e9ration a \u00e9t\u00e9 cr\u00e9\u00e9 ou bien celle de la r\u00e9alisation selon votre usage).", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Index (num\u00e9ro par ann\u00e9e)", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 4, + "description": "Index (num\u00e9ro par ann\u00e9e), le couple ann\u00e9e + index doit \u00eatre unique.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type d'op\u00e9ration", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 5, + "description": "Type d'op\u00e9ration (parmi une liste).", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "R\u00e9f\u00e9rence du dossier administratif", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 7, + "description": "R\u00e9f\u00e9rence du dossier administratif associ\u00e9 \u00e0 l'op\u00e9ration sous la forme ANNEE-INDEX. Exemple : \"2002-4\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identifiants des sites (EAs)", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 8, + "description": "Identifiants des sites (entit\u00e9s arch\u00e9ologiques) concern\u00e9es par l'op\u00e9ration, s\u00e9par\u00e9es par \u00ab\u00a0&\u00a0\u00bb. Exemple : \"44 125 0028 & 44 125 0029\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Types de vestiges", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 9, + "description": "Types de vestiges (s\u00e9par\u00e9s par un \u00ab\u00a0&\u00a0\u00bb). Exemple : \"four & fosses & villa\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "P\u00e9riodes", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 10, + "description": "P\u00e9riodes concern\u00e9es (s\u00e9par\u00e9es par un \u00ab\u00a0&\u00a0\u00bb). \r\nExemple : \"Gallo-romain & Fer & Med\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Titre du responsable scientifique", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 11, + "description": "Titre (M., Mme, etc.) du responsable scientifique.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Pr\u00e9nom du responsable scientifique", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 12, + "description": "Pr\u00e9nom du responsable scientifique (responsable d'op\u00e9ration).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom du responsable scientifique", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 13, + "description": "Nom du responsable scientifique (responsable d'op\u00e9ration).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Rattachement du responsable scientifique", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 14, + "description": "Rattachement du responsable scientifique (responsable d'op\u00e9ration). Exemple : \"INRAP\" ou plus pr\u00e9cis \"INRAP Direction interr\u00e9gionale Grand Ouest\" selon votre degr\u00e9 de pr\u00e9cision dans la gestion des rattachements et des organisations.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom de l'op\u00e9rateur", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 15, + "description": "Nom de l'op\u00e9rateur (organisation). Peut \u00eatre diff\u00e9rent de l'organisation de rattachement du responsable d'op\u00e9ration.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "R\u00e9f\u00e9rence de l'op\u00e9rateur", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 16, + "description": "R\u00e9f\u00e9rence de l'op\u00e9rateur (code ou autre r\u00e9f\u00e9rence interne de l'op\u00e9rateur).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Titre du responsable du suivi scientifique", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 17, + "description": "Titre (M., Mme, etc.) du responsable du suivi scientifique.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Pr\u00e9nom du responsable du suivi scientifique", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 18, + "description": "Pr\u00e9nom du responsable du suivi scientifique. Exemple\u00a0: resp. SRA ou pilote de l'op\u00e9ration, mais non responsable de celle-ci.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom du responsable du suivi scientifique", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 19, + "description": "Nom du responsable du suivi scientifique. Exemple : resp. SRA ou pilote de l'op\u00e9ration, mais non responsable de celle-ci.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Rattachement du responsable du suivi scientifique", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 20, + "description": "Rattachement du responsable du suivi scientifique.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Surface couverte par l'op\u00e9ration", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 21, + "description": "Surface couverte par l'op\u00e9ration (m2).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de d\u00e9but de l'op\u00e9ration", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 22, + "description": "Date de d\u00e9but de l'op\u00e9ration (habituellement d\u00e9but du terrain mais vous pouvez utiliser autre chose).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de fin de l'op\u00e9ration", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 23, + "description": "Date de fin de l'op\u00e9ration (habituellement fin du terrain mais vous pouvez utiliser autre chose).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de cl\u00f4ture", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 24, + "description": "Date de cl\u00f4ture (peut \u00eatre la date de rendu de la documentation, la fin de la recherche associ\u00e9e ou autre). Habituellement cela repr\u00e9sente la date \u00e0 partir de laquelle la documentation issue de l'op\u00e9ration n'est plus du ressort du responsable d'op\u00e9ration, mais vous pouvez utiliser autre chose.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date d'avis", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 25, + "description": "Date d'avis. Exemple\u00a0: avis de CIRA ou autre selon votre usage.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "R\u00e9sultats consid\u00e9r\u00e9s comme n\u00e9gatif", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 26, + "description": "R\u00e9sultats consid\u00e9r\u00e9s comme n\u00e9gatif (d\u2019ordinaire utilis\u00e9 pour les diagnostics n\u00e9gatifs).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Pr\u00e9nom du rapporteur", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 27, + "description": "Pr\u00e9nom du rapporteur (CIRA ou autre selon votre usage de la notion d'avis).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nom du rapporteur", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 28, + "description": "Nom du rapporteur (CIRA ou autre selon votre usage de la notion d'avis).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Rattachement du rapporteur", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 29, + "description": "Rattachement rapporteur (organisation).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date limite pour le rendu de la documentation", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 30, + "description": "Date limite pr\u00e9vue pour le rendu de la documentation scientifique.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Documentation re\u00e7ue", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 31, + "description": "Documentation re\u00e7ue.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date limite rendu du mobilier", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 32, + "description": "Date limite pr\u00e9vue pour le rendu du mobilier.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Mobilier re\u00e7u", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 33, + "description": "Mobilier re\u00e7u ou livr\u00e9 selon vos usages et proc\u00e9dures.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire g\u00e9n\u00e9ral", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 34, + "description": "Commentaire g\u00e9n\u00e9ral.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de livraison du rapport", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 35, + "description": "Date de livraison du rapport.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "\u00c9tat de traitement du rapport", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 36, + "description": "\u00c9tat de traitement du rapport.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire sur la documentation", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 37, + "description": "Commentaire sur la documentation scientifique (y compris mobilier).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Image", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 38, + "description": "Nom du fichier image (jpg ou png. Exemple \"IMG_5023.jpg\". Les fichiers images doivent \u00eatre joints \u00e0 l'import dans un fichier ZIP.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code op\u00e9ration", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 1, + "description": "Code PATRIARCHE ou code UNIQUE de l'op\u00e9ration associ\u00e9e.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code op\u00e9ration", + "importer_type": [ + "ishtar-parcels" + ], + "col_number": 1, + "description": "Code PATRIARCHE ou code num\u00e9rique (entier) UNIQUE pour une op\u00e9ration.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commune", + "importer_type": [ + "ishtar-parcels" + ], + "col_number": 2, + "description": "Commune (via num\u00e9ro INSEE).", + "regexp_pre_filter": [ + "Num\u00e9ro INSEE" + ], + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "ID externe", + "importer_type": [ + "ishtar-parcels" + ], + "col_number": 3, + "description": "Identifiant externe.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Section", + "importer_type": [ + "ishtar-parcels" + ], + "col_number": 4, + "description": "Section. Exemple : \"ZA\". Maximum 4 caract\u00e8res.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Parcelle", + "importer_type": [ + "ishtar-parcels" + ], + "col_number": 5, + "description": "Num\u00e9ro de la parcelle. Exemple : \"253\". Peut accueillir une r\u00e9f\u00e9rence sous la forme de caract\u00e8res (maximum 6).", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Ann\u00e9e cadastrale", + "importer_type": [ + "ishtar-parcels" + ], + "col_number": 6, + "description": "Ann\u00e9e de la r\u00e9f\u00e9rence cadastrale. Exemple : \"1980\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Adresse", + "importer_type": [ + "ishtar-parcels" + ], + "col_number": 7, + "description": "Lieu-dit ou adresse associ\u00e9s \u00e0 la parcelle.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Domaine public", + "importer_type": [ + "ishtar-parcels" + ], + "col_number": 8, + "description": "Parcelle dans le domaine public ou non (oui/non).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "INSEE", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 2, + "description": "Commune (via num\u00e9ro INSEE).", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "parcel__town__numero_insee" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Parcelle", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 3, + "description": "Parcelle (identifiant externe), soit la section plus la parcelle sans espaces. Exemple : \"ZA253\".", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "parcel__section|parcel__parcel_number" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Ann\u00e9e cadastre", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 4, + "description": "Ann\u00e9e de la r\u00e9f\u00e9rence cadastrale. Exemple : \"1980\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identifiant UE", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 5, + "description": "Identifiant (externe) de l'UE. Exemple : \"US 145\", \"Tranch\u00e9e 145\", \"145\", \"St 17\", etc. Doit \u00eatre unique pour une parcelle donn\u00e9e. Maximum 200 caract\u00e8res.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 6, + "description": "Type d'UE. Exemple : \"US\", \"Couche\", \"Tranch\u00e9e\", \"zone\", \"Secteur\", \"Log\", \"Carr\u00e9\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Description", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 7, + "description": "Description.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire g\u00e9n\u00e9ral", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 8, + "description": "Commentaire g\u00e9n\u00e9ral.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Taille ou longueur", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 9, + "description": "Taille ou longueur (en m\u00e8tre). Exemple : \"1.2\", \"12\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Largeur", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 10, + "description": "Largeur (en m\u00e8tre). Exemple : \"1.2\", \"12\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "\u00c9paisseur", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 11, + "description": "\u00c9paisseur (en m\u00e8tre). Exemple : \"0.2\", \"2\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Profondeur", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 12, + "description": "Profondeur (en m\u00e8tre). Exemple : \"0.2\", \"2\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Lieu, localisation", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 13, + "description": "Lieu, description textuelle de la localisation. Exemple : \"Au pied de l'arbre du P\u00e8re Jahouen\", \"En limite nord de la parcelle\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Documentations", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 14, + "description": "Champ \u00e0 choix multiple (s\u00e9par\u00e9 par \u00ab & \u00bb) permettant de pr\u00e9ciser : contient du mobilier, dispose d'une photo, etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Image", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 15, + "description": "Nom du fichier image (jpg ou png). Exemple : \"IMG_5023.jpg\". Les fichiers images doivent \u00eatre joints \u00e0 l'import dans un fichier ZIP.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "P\u00e9riodes", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 16, + "description": "Chronologies associ\u00e9es (plusieurs possibles s\u00e9par\u00e9es par &). Exemple : \"Gallo-romain & M\u00e9di\u00e9val\", \"GR&MED\", \"M\u00e9solithique final & M\u00e9so moyen & Epipal\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "datings__period__label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire sur les datations", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 17, + "description": "Commentaire sur les datations. Exemple : \"IIe - IIIe s.\", \"fin XVe ou plus tard\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Description du remplissage", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 18, + "description": "Description du remplissage. Exemple : \"Limons argileux brun riche en charbons\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Interpr\u00e9tation", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 19, + "description": "Interpr\u00e9tation. Exemple : \"Mur de cl\u00f4ture\", \"Sol couvert d'une mosa\u00efque, \"Pal\u00e9osol du d\u00e9but de l'Holoc\u00e8ne\", \"Four de r\u00e9duction de minerai de fer\", \"TP\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type d'activit\u00e9", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 20, + "description": "Activit\u00e9, r\u00e9f\u00e9rence \u00e0 des types. Exemple : \"Naturelle\", \"Construction\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identification (type)", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 21, + "description": "Identification (type). Exemple : \"Niveau d'occupation\", \"Mur\", \"Colluvions\", \"Chablis\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "TAQ", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 22, + "description": "Terminus ante quem, limite temporelle avant laquelle l'UE s'est form\u00e9e, ici sous la forme de valeurs enti\u00e8res. Exemple : \"322\", \"-45\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "TPQ", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 23, + "description": "Terminus post quem, limite temporelle apr\u00e8s laquelle l'UE s'est form\u00e9e, ici sous la forme de valeurs enti\u00e8res. Exemple : \"322\", \"-45\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "TAQ estim\u00e9", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 24, + "description": "Terminus ante quem estim\u00e9, limite temporelle avant laquelle l'UE s'est form\u00e9e, ici sous la forme de valeurs enti\u00e8res. Exemple : \"322\", \"-45\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "TPQ estim\u00e9", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 25, + "description": "Terminus post quem estim\u00e9, limite temporelle avant laquelle l'UE s'est form\u00e9e, ici sous la forme de valeurs enti\u00e8res. Exemple : \"322\", \"-45\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Ancien code", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 6, + "description": "Ancien code unique de l'op\u00e9ration, peut \u00eatre la r\u00e9f\u00e9rence unique d'une op\u00e9ration pass\u00e9e comme un code DRACAR par exemple, 200 carac. max.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code op\u00e9ration", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 1, + "description": "Code PATRIARCHE ou code num\u00e9rique (entier) UNIQUE pour une op\u00e9ration.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__operation__code_patriarche" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "INSEE", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 2, + "description": "Commune (via num\u00e9ro INSEE).", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__parcel__town__numero_insee" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Parcelle", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 3, + "description": "Parcelle (identifiant externe), soit la section plus la parcelle sans espaces. Exemple : \"ZA253\".", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__parcel__section|base_finds__context_record__parcel__parcel_number" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Label UE", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 4, + "description": "Label / Identifiant (externe) de l'UE. Exemple : \"US 145\", \"Tranch\u00e9e 145\", \"145\", \"St 17\", etc. Doit \u00eatre unique pour une parcelle donn\u00e9e.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Label mobilier", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 5, + "description": "Identifiant libre pour le mobilier. Exemple : \"12\", \"Lot 24\", \"Sac vert\", etc.\r\nDoit \u00eatre unique \u00e0 l'\u00e9chelle de l'UE associ\u00e9e.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identifiant pr\u00e9c\u00e9dent", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 6, + "description": "Identifiant pr\u00e9c\u00e9dent, li\u00e9 \u00e0 une base de donn\u00e9e ou un autre mode d'enregistrement. Exemple : \"400.01.05\", \"Beau biface\", \"inv. 4523\", \"Iso.4220\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Description", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 8, + "description": "Description du mobilier, objet ou lot. Exemple : \"Fibule aviforme\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Ref. point topo", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 7, + "description": "R\u00e9f\u00e9rence du point topo, d'ordinaire un entier mais peut \u00eatre autre chose. Champ texte, max. 120 caract\u00e8res. Exemple : \"7220\", \"pt. 72\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Lot ou objet", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 9, + "description": "D\u00e9finit si on enregistre ici un objet seul (parfois appel\u00e9 Isolation) ou un lot d'objets. Exemple : \"lot\", \"objet\", \"Iso\", \"vrac\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Compl\u00e9tude", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 10, + "description": "D\u00e9finit si un objet est complet ou non. Exemple : \"complet\", \"est complet\", \"incomplet\".\r\nEst ici traduit en binaire : \"complet\" (vrai) ou \"incomplet\" (faux). ", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Mat\u00e9riau(x)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 11, + "description": "Type(s) de mat\u00e9riau(x) s\u00e9par\u00e9s par des \"&\". Exemple : \"m\u00e9tal & os\", \"LT\", \"Min\u00e9ral\", \"Granito\u00efde & Basalte & Ardoise\".", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "material_types__label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "\u00c9tat de conservation", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 12, + "description": "\u00c9tat de conservation. Exemple : \"Instable\", \"Stable\", \"Inconnu\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire conservation", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 13, + "description": "Commentaire relatif \u00e0 la conservation. Exemple : \"Devrait \u00eatre conserv\u00e9 dans une chambre climatis\u00e9e\", \"Ne sera plus qu'une poudre, si on ne s'en occupe pas sous peu\", \" \u00e0 jeter\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type(s) d'objet(s)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 14, + "description": "Type(s) d'objet(s), s\u00e9par\u00e9s par des \"&\". Exemple : \"tesson & charbon\", \"os & m\u00e9tal\", \"faune\", \"fibule & bague\", \"lame & lamelle\", \"\u00e9clat & nucl\u00e9us\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type(s) d'actions de conservation \u00e0 mener", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 15, + "description": "Type(s) d'actions de conservation \u00e0 mener, s\u00e9par\u00e9s par des \"&\". Exemple : \"\u00c0 restaurer\", \"reconditionnement\", \"\u00c0 reconditionner & \u00e0 stabiliser\"", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type(s) d'int\u00e9grit\u00e9(s) et/ou int\u00e9r\u00eat(s)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 16, + "description": "Type(s) d'int\u00e9r\u00eat scientifique ou d'int\u00e9grit\u00e9, s\u00e9par\u00e9s par des \"&\". Exemple : \"Arch\u00e9ologiquement complet\", \"absent\", \"perdu\", etc.\r\nPeut \u00e9galement qualifier (selon votre usage) des qualit\u00e9s de fragmentation : \"proximal\", \"distal\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type(s) de remarqualibit\u00e9(s)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 17, + "description": "Type(s) de remarquabilit\u00e9(s), s\u00e9par\u00e9s par des \"&\". Exemple : \"Mus\u00e9e\", \"Publication\", \"Tessonier & Publication\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Longueur (cm)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 18, + "description": "Longueur en cm (nombre d\u00e9cimal).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Largeur (cm)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 19, + "description": "Largeur en cm (nombre d\u00e9cimal).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Hauteur (cm)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 20, + "description": "Hauteur en cm (nombre d\u00e9cimal).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Diam\u00e8tre (cm)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 21, + "description": "Diam\u00e8tre en cm (nombre d\u00e9cimal).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire / Pr\u00e9cisions sur les dimensions ", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 22, + "description": "Commentaire permettant de donner des pr\u00e9cisions (ou d'importer des donn\u00e9es mixtes). Exemple : \"18 x 12 x 5\", \"col de 43 mm\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Nombre", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 24, + "description": "Nombre d'objet(s) li\u00e9(s) \u00e0 cet enregistrement (entier). Exemple : \"12\".\r\nAttention, ce champ n'est pas contraint par l'information de type OBJET/LOT (colonne n\u00b09).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Marque", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 25, + "description": "Marquage visible sur le mobilier. Exemple : \"id1234 la Roche aux F\u00e9es\", \"MTX-45\", etc.\r\nCeci reproduit d'ordinaire un marquage r\u00e9alis\u00e9 par un arch\u00e9ologue. Il ne s'agit pas ici de reproduire une \u00e9pigraphie ou tout autre inscription arch\u00e9ologique (graffito, d\u00e9dicaces, defixio, etc.) , mais vous pouvez l'utiliser pour cela si vous n'avez pas \u00e0 utiliser de marquage arch\u00e9ologique.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire g\u00e9n\u00e9ral", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 26, + "description": "Commentaire g\u00e9n\u00e9ral libre. Exemple : \"habillage en nid d'abeille, poli g\u00e9n\u00e9ralis\u00e9, encoche emmanchement lat\u00e9ral ouvert sur la face sup\u00e9rieure\", \"1 bord + bec tubulaire\", \"fibule de Langton Down\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire g\u00e9n\u00e9ral sur les datations", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 27, + "description": "Commentaire g\u00e9n\u00e9ral sur les datations, si besoin. Exemple : \"plut\u00f4t fin IIe s. ou d\u00e9but IIIe s.\", \"Datation \u00e0 pr\u00e9ciser avant publication\", \" Datation rapide faite par M. Dupont\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Valeur estim\u00e9e", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 28, + "description": "Valeur estim\u00e9e (\u20ac), sous la forme d'un nombre d\u00e9cimal. Exemple : \"4500\", \"0.2\", etc.\r\nUtile essentiellement pour les probl\u00e8mes de partage, vente, assurance etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Image", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 29, + "description": "Nom exact du fichier image, sous la forme XXXXX.jpg.\r\nAttention au respect strict des caract\u00e8res et majuscules lors d'un import de ce type, \".JPG\" ou \"*.jpg\", etc.\r\nExemple : \"P1030831.JPG\", \"IMG_6485.JPG\", \"fibule.jpg\", etc.\r\nLors de l'import il faut ajouter ces images sous la forme d'un fichier zip (joint au csv import\u00e9) pour que les images soient automatiquement int\u00e9gr\u00e9es.\r\n", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "P\u00e9riodes", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 30, + "description": "Chronologies associ\u00e9es (plusieurs possibles s\u00e9par\u00e9es par &). Exemple : \"Gallo-romain & M\u00e9di\u00e9val\", \"GR&MED\", \"M\u00e9solithique final & M\u00e9so moyen & Epipal\", etc.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "datings__period__label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Coordonn\u00e9e X", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 31, + "description": "Coordonn\u00e9e X pour cet objet.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Coordonn\u00e9e Y", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 32, + "description": "Coordonn\u00e9e Y pour cet objet.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Coordonn\u00e9e Z", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 33, + "description": "Coordonn\u00e9e Z pour cet objet (altitude NGF ou arbitraire).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Syst\u00e8me de r\u00e9f\u00e9rence spatiale", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 34, + "description": "Code permettant de qualifier le mode de projection des donn\u00e9es (SRS /EPSG). Exemple : \"2154\" pour le Lambert 93.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "UE (identifiant externe) - membre de gauche", + "importer_type": [ + "ishtar-ue-relations" + ], + "col_number": 1, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type de relation entre UE", + "importer_type": [ + "ishtar-ue-relations" + ], + "col_number": 2, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "UE (identifiant externe) - membre de droite", + "importer_type": [ + "ishtar-ue-relations" + ], + "col_number": 3, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Poids (g)", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 23, + "description": "Poids en grammes.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": null + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Identifiant d\u00e9p\u00f4t", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 36, + "description": "Identifiant textuel du d\u00e9p\u00f4t. Cet identifiant doit correspondre \u00e0 un d\u00e9p\u00f4t existant en base de donn\u00e9es.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "R\u00e9f\u00e9rence de caisse", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 37, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type de caisse", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 38, + "description": "Champ n\u00e9cessaire si vous indiquez une caisse", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code op\u00e9ration", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 1, + "description": "Code UNIQUE pour une op\u00e9ration (par exemple : code PATRIARCHE)", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Titre", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 4, + "description": "Titre du document (max. 300 caract\u00e8res)", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Type de document", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 3, + "description": "", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Index (num\u00e9ro par op\u00e9ration)", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 2, + "description": "Num\u00e9ro unique par op\u00e9ration", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "R\u00e9f\u00e9rence", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 5, + "description": "R\u00e9f\u00e9rence libre (max. 100 caract\u00e8res)", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "R\u00e9f\u00e9rence interne", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 6, + "description": "R\u00e9f\u00e9rence interne libre (max. 100 caract\u00e8res)", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Adresse web associ\u00e9e", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 7, + "description": "Adresse web compl\u00e8te (avec la partie http:// ou https://)", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de r\u00e9ception", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 8, + "description": "Date de r\u00e9ception (format JJ/MM/AAAA ou AAAA-MM-JJ)", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de cr\u00e9ation", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 9, + "description": "Date de cr\u00e9ation (format JJ/MM/AAAA ou AAAA-MM-JJ)", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de r\u00e9ception en documentation", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 10, + "description": "Date de r\u00e9ception en documentation (format JJ/MM/AAAA ou AAAA-MM-JJ)", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Commentaire", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 11, + "description": "Texte libre", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Description", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 12, + "description": "Texte libre", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Information suppl\u00e9mentaire", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 13, + "description": "Texte libre", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Auteur principal", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 15, + "description": "Nom (en casse haute) suivi du pr\u00e9nom de l'auteur (maximum 300 caract\u00e8res). Exemple : DUPONT Jean.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Existe en doublon", + "importer_type": [ + "ishtar-operations-sources" + ], + "col_number": 14, + "description": "", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Code op\u00e9ration", + "importer_type": [ + "ishtar_finds_parcels_and_cr" + ], + "col_number": 1, + "description": "Code PATRIARCHE ou code num\u00e9rique (entier) UNIQUE pour une op\u00e9ration.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__operation__code_patriarche" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "INSEE", + "importer_type": [ + "ishtar_finds_parcels_and_cr" + ], + "col_number": 2, + "description": "Commune (via num\u00e9ro INSEE).", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__parcel__town__numero_insee" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Section de parcellaire", + "importer_type": [ + "ishtar_finds_parcels_and_cr" + ], + "col_number": 3, + "description": "Section (identifiant externe), soit des lettres formant la section . Exemple : \"ZA\".", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__parcel__section" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Num\u00e9ro de parcelle", + "importer_type": [ + "ishtar_finds_parcels_and_cr" + ], + "col_number": 4, + "description": "Num\u00e9ro de la parcelle, soit des chiffres sans espaces. Exemple : \"253\".", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__parcel__parcel_number" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Label UE", + "importer_type": [ + "ishtar_finds_parcels_and_cr" + ], + "col_number": 5, + "description": "Label / Identifiant (externe) de l'UE. Exemple : \"US 145\", \"Tranch\u00e9e 145\", \"145\", \"St 17\", etc. Doit \u00eatre unique pour une parcelle donn\u00e9e.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "base_finds__context_record__label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Label mobilier", + "importer_type": [ + "ishtar_finds_parcels_and_cr" + ], + "col_number": 6, + "description": "Identifiant libre pour le mobilier. Exemple : \"12\", \"Lot 24\", \"Sac vert\", etc.\r\nDoit \u00eatre unique \u00e0 l'\u00e9chelle de l'UE associ\u00e9e.", + "regexp_pre_filter": null, + "required": true, + "export_field_name": "label" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Communes", + "importer_type": [ + "ishtar-operations" + ], + "col_number": 39, + "description": "Code INSEE des communes concern\u00e9es (s\u00e9par\u00e9es par un \u00ab & \u00bb).", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date d'ouverture", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 26, + "description": "Date au format JJ/MM/AAAA ou AAAA-MM-JJ. Par exemple : 2017-07-31 ou 31/07/2017.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de fermeture", + "importer_type": [ + "ishtar-context-record" + ], + "col_number": 27, + "description": "Date au format JJ/MM/AAAA ou AAAA-MM-JJ. Par exemple : 2017-07-31 ou 31/07/2017.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Date de d\u00e9couverte", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 35, + "description": "Date au format JJ/MM/AAAA ou AAAA-MM-JJ. Par exemple : 2017-07-31 ou 31/07/2017.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Localisation 1", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 39, + "description": "Localisation dans le d\u00e9p\u00f4t : r\u00e9f\u00e9rence de la premi\u00e8re localisation. Par exemple si la premi\u00e8re localisation du d\u00e9p\u00f4t concern\u00e9 est \u00ab b\u00e2timent \u00bb mettre : \u00ab A \u00bb pour b\u00e2timent A.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "localisation_1" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Localisation 2", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 40, + "description": "Localisation dans le d\u00e9p\u00f4t : r\u00e9f\u00e9rence de la seconde localisation.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "localisation_2" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Localisation 3", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 41, + "description": "Localisation dans le d\u00e9p\u00f4t : r\u00e9f\u00e9rence de la troisi\u00e8me localisation.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "localisation_3" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Localisation 4", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 42, + "description": "Localisation dans le d\u00e9p\u00f4t : r\u00e9f\u00e9rence de la quatri\u00e8me localisation.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "localisation_4" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Localisation 5", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 43, + "description": "Localisation dans le d\u00e9p\u00f4t : r\u00e9f\u00e9rence de la cinqui\u00e8me localisation.", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "localisation_5" + } +}, +{ + "model": "ishtar_common.importercolumn", + "fields": { + "label": "Localisation 6", + "importer_type": [ + "ishtar-finds" + ], + "col_number": 44, + "description": "Localisation dans le d\u00e9p\u00f4t : r\u00e9f\u00e9rence de la sixi\u00e8me localisation. ", + "regexp_pre_filter": null, + "required": false, + "export_field_name": "localisation_6" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "IntegerFormater", + "options": "", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_operations.models.OperationType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "120", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "300", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "DateFormater", + "options": "%Y/%m/%d", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_operations.models.Period", + "many_split": "&" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "4", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "6", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "500", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "12", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "SourceType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "SupportType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "YearFormater", + "options": "%Y", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "Format", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "1000", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "30", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_context_records.models.Unit", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "StrToBoolean", + "options": "", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_finds.models.MaterialType", + "many_split": "&" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "FloatFormater", + "options": "", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_finds.models.ConservatoryState", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_finds.models.PreservationType", + "many_split": "&" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_context_records.models.IdentificationType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "DateFormater", + "options": "%d/%m/%Y | %Y-%m-%d", + "many_split": " | " + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_finds.models.ObjectType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "FileFormater", + "options": "", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "5", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnknowType", + "options": "", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "200", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "70", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_files.models.SaisineType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "2000", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_files.models.PermitType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "60", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_operations.models.ReportState", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "10", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "50", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_operations.models.RemainType", + "many_split": "&" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_context_records.models.ActivityType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_finds.models.IntegrityType", + "many_split": "&" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_finds.models.RemarkabilityType", + "many_split": "&" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "20", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "SpatialReferenceSystem", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "TitleType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_finds.models.BatchType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_context_records.models.RelationType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_warehouse.models.ContainerType", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "100", + "many_split": "" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "TypeFormater", + "options": "archaeological_context_records.models.DocumentationType", + "many_split": "&" + } +}, +{ + "model": "ishtar_common.formatertype", + "fields": { + "formater_type": "UnicodeFormater", + "options": "6", + "many_split": "&" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 5 + ], + "field_name": "label", + "force_new": false, + "concat": false, + "concat_str": null + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 5 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-operations", + 6 + ], + "field_name": "scientist__name", + "force_new": false, + "concat": false, + "concat_str": null + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-ue", + 4 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-parcelles", + 1 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-parcelles", + 2 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-ue", + 1 + ], + "field_name": "parcel__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-ue", + 1 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-ue", + 2 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-ue", + 3 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 1 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 2 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 3 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 4 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 5 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 4 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 3 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 2 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "mcc-mobilier", + 1 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-context-record", + 1 + ], + "field_name": "parcel__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-context-record", + 1 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-parcels", + 2 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-parcels", + 1 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-context-record", + 2 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-context-record", + 3 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-context-record", + 5 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 1 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 1 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 2 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 2 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 3 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 3 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 4 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 4 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 5 + ], + "field_name": "label", + "force_new": false, + "concat": false, + "concat_str": "" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 5 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 5 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 36 + ], + "field_name": "container__location__external_id", + "force_new": false, + "concat": false, + "concat_str": "" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 36 + ], + "field_name": "container__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-finds", + 37 + ], + "field_name": "container__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-operations-sources", + 1 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar-operations-sources", + 2 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 1 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 1 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 2 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 2 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 3 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 3 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 4 + ], + "field_name": "external_id", + "force_new": false, + "concat": true, + "concat_str": "" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 4 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": true, + "concat_str": "" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 5 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 5 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 6 + ], + "field_name": "external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 6 + ], + "field_name": "base_finds__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 6 + ], + "field_name": "base_finds__label", + "force_new": false, + "concat": false, + "concat_str": "" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 2 + ], + "field_name": "base_finds__context_record__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 1 + ], + "field_name": "base_finds__context_record__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 3 + ], + "field_name": "base_finds__context_record__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 4 + ], + "field_name": "base_finds__context_record__external_id", + "force_new": false, + "concat": true, + "concat_str": "" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 5 + ], + "field_name": "base_finds__context_record__external_id", + "force_new": false, + "concat": false, + "concat_str": "-" + } +}, +{ + "model": "ishtar_common.importerduplicatefield", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 1 + ], + "field_name": "base_finds__context_record__parcel__operation__code_patriarche", + "force_new": false, + "concat": false, + "concat_str": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-operations", + 1 + ], + "target": "code_patriarche", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-operations", + 3 + ], + "target": "operation_type", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.OperationType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-operations", + 4 + ], + "target": "common_name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-operations", + 5 + ], + "target": "operator__name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-operations", + 6 + ], + "target": "scientist__raw_name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "300", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-operations", + 7 + ], + "target": "start_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%Y/%m/%d", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-operations", + 8 + ], + "target": "excavation_end_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%Y/%m/%d", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-operations", + 9 + ], + "target": "periods", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.Period", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-parcelles", + 1 + ], + "target": "operation__code_patriarche", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-parcelles", + 2 + ], + "target": "town__numero_insee", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-parcelles", + 9 + ], + "target": "address", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "500", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 1 + ], + "target": "operation__code_patriarche", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 2 + ], + "target": "external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 3 + ], + "target": "source_type", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "SourceType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 4 + ], + "target": "support_type", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "SupportType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 5 + ], + "target": "item_number", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 6 + ], + "target": "authors__person__raw_name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "300", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 7 + ], + "target": "creation_date", + "regexp_filter": null, + "formater_type": [ + "YearFormater", + "%Y", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 8 + ], + "target": "format_type", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "Format", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 9 + ], + "target": "description", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "1000", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 12 + ], + "target": "comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "1000", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 13 + ], + "target": "scale", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "30", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-documentation", + 16 + ], + "target": "additional_information", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "1000", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 1 + ], + "target": "operation__code_patriarche", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 4 + ], + "target": "label", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 5 + ], + "target": "unit", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_context_records.models.Unit", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 6 + ], + "target": "description", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "1000", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 7 + ], + "target": "identification", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_context_records.models.IdentificationType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 8 + ], + "target": "opening_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%Y/%m/%d", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 9 + ], + "target": "closing_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%Y/%m/%d", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 3 + ], + "target": "parcel__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 11 + ], + "target": "comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "1000", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 13 + ], + "target": "datings__period", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.Period", + "&" + ], + "force_new": true, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 1 + ], + "target": "base_finds__context_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 5 + ], + "target": "base_finds__label", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 9 + ], + "target": "material_types", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.MaterialType", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 13 + ], + "target": "find_number", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 14 + ], + "target": "weight", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 15 + ], + "target": "weight_unit", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "4", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 4 + ], + "target": "base_finds__context_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 16 + ], + "target": "base_finds__discovery_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%Y/%m/%d", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 17 + ], + "target": "conservatory_state", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.ConservatoryState", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 18 + ], + "target": "preservation_to_considers", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.PreservationType", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 19 + ], + "target": "base_finds__comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 21 + ], + "target": "base_finds__topographic_localisation", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 22 + ], + "target": "base_finds__special_interest", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 23 + ], + "target": "base_finds__description", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "1000", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-parcelles", + 4 + ], + "target": "parcel_number", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "6", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-parcelles", + 5 + ], + "target": "section", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "4", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-parcelles", + 3 + ], + "target": "external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-parcelles", + 6 + ], + "target": "year", + "regexp_filter": null, + "formater_type": [ + "YearFormater", + "%Y", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 12 + ], + "target": "interpretation", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "1000", + "" + ], + "force_new": false, + "concat": false, + "concat_str": null, + "comment": null + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-ue", + 2 + ], + "target": "parcel__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "5", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 3 + ], + "target": "base_finds__context_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 2 + ], + "target": "base_finds__context_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "5", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 20 + ], + "target": "datings__period", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.Period", + "&" + ], + "force_new": true, + "concat": false, + "concat_str": null, + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "mcc-mobilier", + 12 + ], + "target": "label", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 1 + ], + "target": "code_patriarche", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "20", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 2 + ], + "target": "common_name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 3 + ], + "target": "year", + "regexp_filter": null, + "formater_type": [ + "YearFormater", + "%Y", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 4 + ], + "target": "operation_code", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 5 + ], + "target": "operation_type", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.OperationType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 7 + ], + "target": "associated_file__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 10 + ], + "target": "periods", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.Period", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 8 + ], + "target": "archaeological_sites__reference", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "20", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 11 + ], + "target": "scientist__title", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "TitleType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 12 + ], + "target": "scientist__surname", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 13 + ], + "target": "scientist__name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 14 + ], + "target": "scientist__attached_to__name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 15 + ], + "target": "operator__name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "500", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 16 + ], + "target": "operator_reference", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 17 + ], + "target": "in_charge__title", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "TitleType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 18 + ], + "target": "in_charge__surname", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "50", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 19 + ], + "target": "in_charge__name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 20 + ], + "target": "in_charge__attached_to__name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "500", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 21 + ], + "target": "surface", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 22 + ], + "target": "start_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 23 + ], + "target": "excavation_end_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 24 + ], + "target": "end_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 25 + ], + "target": "cira_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 26 + ], + "target": "negative_result", + "regexp_filter": null, + "formater_type": [ + "StrToBoolean", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 27 + ], + "target": "cira_rapporteur__surname", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "50", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 28 + ], + "target": "cira_rapporteur__name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 29 + ], + "target": "cira_rapporteur__attached_to__name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "500", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 30 + ], + "target": "documentation_deadline", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 31 + ], + "target": "documentation_received", + "regexp_filter": null, + "formater_type": [ + "StrToBoolean", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 32 + ], + "target": "finds_deadline", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 33 + ], + "target": "finds_received", + "regexp_filter": null, + "formater_type": [ + "StrToBoolean", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 34 + ], + "target": "comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 35 + ], + "target": "report_delivery_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 36 + ], + "target": "report_processing", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.ReportState", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 37 + ], + "target": "scientific_documentation_comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 38 + ], + "target": "image", + "regexp_filter": null, + "formater_type": [ + "FileFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 1 + ], + "target": "operation__code_patriarche", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-parcels", + 1 + ], + "target": "operation__code_patriarche", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "20", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-parcels", + 2 + ], + "target": "town__numero_insee", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-parcels", + 3 + ], + "target": "external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-parcels", + 4 + ], + "target": "section", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "4", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-parcels", + 5 + ], + "target": "parcel_number", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "6", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-parcels", + 6 + ], + "target": "year", + "regexp_filter": null, + "formater_type": [ + "YearFormater", + "%Y", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-parcels", + 7 + ], + "target": "address", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "500", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-parcels", + 8 + ], + "target": "public_domain", + "regexp_filter": null, + "formater_type": [ + "StrToBoolean", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 2 + ], + "target": "parcel__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "5", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 3 + ], + "target": "parcel__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 4 + ], + "target": "parcel__year", + "regexp_filter": null, + "formater_type": [ + "YearFormater", + "%Y", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 9 + ], + "target": "remains", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.RemainType", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 5 + ], + "target": "label", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 6 + ], + "target": "unit", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_context_records.models.Unit", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 7 + ], + "target": "description", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 8 + ], + "target": "comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 9 + ], + "target": "length", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 10 + ], + "target": "width", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 11 + ], + "target": "thickness", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 12 + ], + "target": "depth", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 13 + ], + "target": "location", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 14 + ], + "target": "documentations", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_context_records.models.DocumentationType", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 15 + ], + "target": "image", + "regexp_filter": null, + "formater_type": [ + "FileFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 16 + ], + "target": "datings__period", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.Period", + "&" + ], + "force_new": true, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 17 + ], + "target": "datings_comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "1000", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 18 + ], + "target": "filling", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 19 + ], + "target": "interpretation", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 20 + ], + "target": "activity", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_context_records.models.ActivityType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 21 + ], + "target": "identification", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_context_records.models.IdentificationType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 22 + ], + "target": "taq", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 23 + ], + "target": "tpq", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 24 + ], + "target": "taq_estimated", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 25 + ], + "target": "tpq_estimated", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 6 + ], + "target": "old_code", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 1 + ], + "target": "base_finds__context_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 2 + ], + "target": "base_finds__context_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "5", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 3 + ], + "target": "base_finds__context_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 4 + ], + "target": "base_finds__context_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 5 + ], + "target": "base_finds__label", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 6 + ], + "target": "previous_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 8 + ], + "target": "description", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 9 + ], + "target": "base_finds__batch", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.BatchType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 10 + ], + "target": "is_complete", + "regexp_filter": null, + "formater_type": [ + "StrToBoolean", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 11 + ], + "target": "material_types", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.MaterialType", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 12 + ], + "target": "conservatory_state", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.ConservatoryState", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 13 + ], + "target": "conservatory_comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 14 + ], + "target": "object_types", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.ObjectType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 15 + ], + "target": "preservation_to_considers", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.PreservationType", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 16 + ], + "target": "integrities", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.IntegrityType", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 17 + ], + "target": "remarkabilities", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_finds.models.RemarkabilityType", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 18 + ], + "target": "length", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 19 + ], + "target": "width", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 20 + ], + "target": "height", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 21 + ], + "target": "diameter", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 22 + ], + "target": "dimensions_comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 24 + ], + "target": "find_number", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 25 + ], + "target": "mark", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 26 + ], + "target": "comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 27 + ], + "target": "dating_comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 28 + ], + "target": "estimated_value", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 29 + ], + "target": "image", + "regexp_filter": null, + "formater_type": [ + "FileFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 30 + ], + "target": "datings__period", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_operations.models.Period", + "&" + ], + "force_new": true, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 7 + ], + "target": "base_finds__topographic_localisation", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 31 + ], + "target": "base_finds__x", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 32 + ], + "target": "base_finds__y", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 33 + ], + "target": "base_finds__z", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 34 + ], + "target": "base_finds__spatial_reference_system", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "SpatialReferenceSystem", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-ue-relations", + 1 + ], + "target": "left_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-ue-relations", + 2 + ], + "target": "relation_type", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_context_records.models.RelationType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-ue-relations", + 3 + ], + "target": "right_record__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 23 + ], + "target": "weight", + "regexp_filter": null, + "formater_type": [ + "FloatFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 36 + ], + "target": "container__responsible__external_id", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 37 + ], + "target": "container__reference", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "30", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 38 + ], + "target": "container__container_type", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "archaeological_warehouse.models.ContainerType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 1 + ], + "target": "operation__code_patriarche", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "-", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 4 + ], + "target": "title", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "300", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 3 + ], + "target": "source_type", + "regexp_filter": null, + "formater_type": [ + "TypeFormater", + "SourceType", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 2 + ], + "target": "index", + "regexp_filter": null, + "formater_type": [ + "IntegerFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 5 + ], + "target": "reference", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "100", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 6 + ], + "target": "internal_reference", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "100", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 7 + ], + "target": "associated_url", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "300", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 8 + ], + "target": "receipt_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 9 + ], + "target": "creation_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 10 + ], + "target": "receipt_date_in_documentation", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 11 + ], + "target": "comment", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 12 + ], + "target": "description", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 13 + ], + "target": "additional_information", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 15 + ], + "target": "authors__person__raw_name", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "300", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations-sources", + 14 + ], + "target": "duplicate", + "regexp_filter": null, + "formater_type": [ + "StrToBoolean", + "", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 1 + ], + "target": "base_finds__context_record__operation__code_patriarche", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "12", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 2 + ], + "target": "base_finds__context_record__parcel__town__numero_insee", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "5", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 3 + ], + "target": "base_finds__context_record__parcel__section", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "4", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 4 + ], + "target": "base_finds__context_record__parcel__parcel_number", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "6", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 5 + ], + "target": "base_finds__context_record__label", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar_finds_parcels_and_cr", + 6 + ], + "target": "label", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "120", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 2 + ], + "target": "base_finds__context_record__parcel__town__numero_insee", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "5", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-operations", + 39 + ], + "target": "towns__numero_insee", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "6", + "&" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 26 + ], + "target": "opening_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-context-record", + 27 + ], + "target": "closing_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 35 + ], + "target": "base_finds__discovery_date", + "regexp_filter": null, + "formater_type": [ + "DateFormater", + "%d/%m/%Y | %Y-%m-%d", + " | " + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 39 + ], + "target": "set_localisation_1", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 40 + ], + "target": "set_localisation_2", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 41 + ], + "target": "set_localisation_3", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 42 + ], + "target": "set_localisation_4", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 43 + ], + "target": "set_localisation_5", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +}, +{ + "model": "ishtar_common.importtarget", + "fields": { + "column": [ + "ishtar-finds", + 44 + ], + "target": "set_localisation_6", + "regexp_filter": null, + "formater_type": [ + "UnicodeFormater", + "200", + "" + ], + "force_new": false, + "concat": false, + "concat_str": "", + "comment": "" + } +} +] diff --git a/ishtar_common/fixtures/initial_spatialrefsystem-fr.json b/ishtar_common/fixtures/initial_spatialrefsystem-fr.json index 99d16ea51..ea244e0d0 100644 --- a/ishtar_common/fixtures/initial_spatialrefsystem-fr.json +++ b/ishtar_common/fixtures/initial_spatialrefsystem-fr.json @@ -1,535 +1,494 @@ [ - { - "pk": 35, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "ETRS89 / LAEA Europe", - "auth_name": "EPSG", - "srid": 3035, - "order": 201, - "txt_idx": "laea-europe" - } - }, - { - "pk": 34, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "ETRS89 / LCC Europe", - "auth_name": "EPSG", - "srid": 3034, - "order": 200, - "txt_idx": "lcc-europe" - } - }, - { - "pk": 14, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "NTF (Paris) / Lambert Centre France", - "auth_name": "EPSG", - "srid": 27562, - "order": 31, - "txt_idx": "lambert-centre-france" - } - }, - { - "pk": 16, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "NTF (Paris) / Lambert Corse", - "auth_name": "EPSG", - "srid": 27564, - "order": 33, - "txt_idx": "lambert-corse" - } - }, - { - "pk": 13, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "NTF (Paris) / Lambert Nord France", - "auth_name": "EPSG", - "srid": 27561, - "order": 30, - "txt_idx": "lambert-nord-france" - } - }, - { - "pk": 15, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "NTF (Paris) / Lambert Sud France", - "auth_name": "EPSG", - "srid": 27563, - "order": 32, - "txt_idx": "lambert-sud-france" - } - }, - { - "pk": 17, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "NTF (Paris) / Lambert zone I", - "auth_name": "EPSG", - "srid": 27571, - "order": 34, - "txt_idx": "lambert-zone-i" - } - }, - { - "pk": 19, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "NTF (Paris) / Lambert zone III", - "auth_name": "EPSG", - "srid": 27573, - "order": 36, - "txt_idx": "lambert-zone-iii" - } - }, - { - "pk": 18, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "NTF (Paris) / Lambert zone II (Lambert II \u00e9tendu)", - "auth_name": "EPSG", - "srid": 27572, - "order": 35, - "txt_idx": "lambert-zone-ii" - } - }, - { - "pk": 20, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "NTF (Paris) / Lambert zone IV", - "auth_name": "EPSG", - "srid": 27574, - "order": 37, - "txt_idx": "lambert-zone-iv" - } - }, - { - "pk": 4, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC42", - "auth_name": "EPSG", - "srid": 3942, - "order": 11, - "txt_idx": "lambert-cc42" - } - }, - { - "pk": 5, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC43", - "auth_name": "EPSG", - "srid": 3943, - "order": 12, - "txt_idx": "lambert-cc43" - } - }, - { - "pk": 6, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC44", - "auth_name": "EPSG", - "srid": 3944, - "order": 13, - "txt_idx": "lambert-cc44" - } - }, - { - "pk": 7, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC45", - "auth_name": "EPSG", - "srid": 3945, - "order": 14, - "txt_idx": "lambert-cc45" - } - }, - { - "pk": 8, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC46", - "auth_name": "EPSG", - "srid": 3946, - "order": 15, - "txt_idx": "lambert-cc46" - } - }, - { - "pk": 9, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC47", - "auth_name": "EPSG", - "srid": 3947, - "order": 16, - "txt_idx": "lambert-cc47" - } - }, - { - "pk": 10, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC48", - "auth_name": "EPSG", - "srid": 3948, - "order": 17, - "txt_idx": "lambert-cc48" - } - }, - { - "pk": 11, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC49", - "auth_name": "EPSG", - "srid": 3949, - "order": 18, - "txt_idx": "lambert-cc49" - } - }, - { - "pk": 12, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / CC50", - "auth_name": "EPSG", - "srid": 3950, - "order": 19, - "txt_idx": "lambert-cc50" - } - }, - { - "pk": 3, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGF93 / Lambert-93", - "auth_name": "EPSG", - "srid": 2154, - "order": 10, - "txt_idx": "lambert93" - } - }, - { - "pk": 37, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGFG95 / UTM zone 22N (Guyane)", - "auth_name": "EPSG", - "srid": 2972, - "order": 300, - "txt_idx": "utm-guyane" - } - }, - { - "pk": 40, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGM04 / UTM zone 38S (Mayotte)", - "auth_name": "EPSG", - "srid": 4471, - "order": 330, - "txt_idx": "utm-mayotte" - } - }, - { - "pk": 38, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGR92 / UTM zone 40S (La R\u00e9union)", - "auth_name": "EPSG", - "srid": 2975, - "order": 310, - "txt_idx": "utm-reunion" - } - }, - { - "pk": 39, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RGSPM06 / UTM 21N (St-Pierre-et-Miquelon)", - "auth_name": "EPSG", - "srid": 4467, - "order": 320, - "txt_idx": "utm-miquelon" - } - }, - { - "pk": 41, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "RRAF 1991 / UTM zone 20N (Guadeloupe et Martinique)", - "auth_name": "EPSG", - "srid": 4559, - "order": 340, - "txt_idx": "utm-guadeloupe" - } - }, - { - "pk": 2, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "Syst\u00e8me local (non r\u00e9f\u00e9renc\u00e9)", - "auth_name": "EPSG", - "srid": 0, - "order": 1, - "txt_idx": "local" - } - }, - { - "pk": 1, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS84 (lat-long)", - "auth_name": "EPSG", - "srid": 4326, - "order": 2, - "txt_idx": "wgs84" - } - }, - { - "pk": 21, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 28N", - "auth_name": "EPSG", - "srid": 32628, - "order": 128, - "txt_idx": "utm-28n" - } - }, - { - "pk": 22, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 29N", - "auth_name": "EPSG", - "srid": 32629, - "order": 129, - "txt_idx": "utm-29n" - } - }, - { - "pk": 23, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 30N", - "auth_name": "EPSG", - "srid": 32630, - "order": 130, - "txt_idx": "utm-30n" - } - }, - { - "pk": 24, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 31N", - "auth_name": "EPSG", - "srid": 32631, - "order": 131, - "txt_idx": "utm-31n" - } - }, - { - "pk": 25, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 32N", - "auth_name": "EPSG", - "srid": 32632, - "order": 132, - "txt_idx": "utm-32n" - } - }, - { - "pk": 26, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 33N", - "auth_name": "EPSG", - "srid": 32633, - "order": 133, - "txt_idx": "utm-33n" - } - }, - { - "pk": 27, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 34N", - "auth_name": "EPSG", - "srid": 32634, - "order": 134, - "txt_idx": "utm-34n" - } - }, - { - "pk": 28, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 35N", - "auth_name": "EPSG", - "srid": 32635, - "order": 135, - "txt_idx": "utm-35n" - } - }, - { - "pk": 29, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 36N", - "auth_name": "EPSG", - "srid": 32636, - "order": 136, - "txt_idx": "utm-36n" - } - }, - { - "pk": 30, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 37N", - "auth_name": "EPSG", - "srid": 32637, - "order": 137, - "txt_idx": "utm-37n" - } - }, - { - "pk": 31, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 38N", - "auth_name": "EPSG", - "srid": 32638, - "order": 138, - "txt_idx": "utm-38n" - } - }, - { - "pk": 32, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 39N", - "auth_name": "EPSG", - "srid": 32639, - "order": 139, - "txt_idx": "utm-39n" - } - }, - { - "pk": 33, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / UTM zone 40N", - "auth_name": "EPSG", - "srid": 32640, - "order": 140, - "txt_idx": "utm-40n" - } - }, - { - "pk": 36, - "model": "ishtar_common.spatialreferencesystem", - "fields": { - "comment": "", - "available": true, - "label": "WGS 84 / World Mercator", - "auth_name": "EPSG", - "srid": 3395, - "order": 250, - "txt_idx": "wgs84-mercator" - } - } -]
\ No newline at end of file +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS84 (lat-long)", + "txt_idx": "wgs84", + "comment": "", + "available": true, + "order": 2, + "auth_name": "EPSG", + "srid": 4326 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "Syst\u00e8me local (non r\u00e9f\u00e9renc\u00e9)", + "txt_idx": "local", + "comment": "", + "available": true, + "order": 1, + "auth_name": "EPSG", + "srid": 0 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / Lambert-93", + "txt_idx": "lambert93", + "comment": "", + "available": true, + "order": 10, + "auth_name": "EPSG", + "srid": 2154 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC42", + "txt_idx": "lambert-cc42", + "comment": "", + "available": true, + "order": 11, + "auth_name": "EPSG", + "srid": 3942 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC43", + "txt_idx": "lambert-cc43", + "comment": "", + "available": true, + "order": 12, + "auth_name": "EPSG", + "srid": 3943 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC44", + "txt_idx": "lambert-cc44", + "comment": "", + "available": true, + "order": 13, + "auth_name": "EPSG", + "srid": 3944 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC45", + "txt_idx": "lambert-cc45", + "comment": "", + "available": true, + "order": 14, + "auth_name": "EPSG", + "srid": 3945 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC46", + "txt_idx": "lambert-cc46", + "comment": "", + "available": true, + "order": 15, + "auth_name": "EPSG", + "srid": 3946 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC47", + "txt_idx": "lambert-cc47", + "comment": "", + "available": true, + "order": 16, + "auth_name": "EPSG", + "srid": 3947 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC48", + "txt_idx": "lambert-cc48", + "comment": "", + "available": true, + "order": 17, + "auth_name": "EPSG", + "srid": 3948 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC49", + "txt_idx": "lambert-cc49", + "comment": "", + "available": true, + "order": 18, + "auth_name": "EPSG", + "srid": 3949 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGF93 / CC50", + "txt_idx": "lambert-cc50", + "comment": "", + "available": true, + "order": 19, + "auth_name": "EPSG", + "srid": 3950 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "NTF (Paris) / Lambert Nord France", + "txt_idx": "lambert-nord-france", + "comment": "", + "available": true, + "order": 30, + "auth_name": "EPSG", + "srid": 27561 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "NTF (Paris) / Lambert Centre France", + "txt_idx": "lambert-centre-france", + "comment": "", + "available": true, + "order": 31, + "auth_name": "EPSG", + "srid": 27562 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "NTF (Paris) / Lambert Sud France", + "txt_idx": "lambert-sud-france", + "comment": "", + "available": true, + "order": 32, + "auth_name": "EPSG", + "srid": 27563 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "NTF (Paris) / Lambert Corse", + "txt_idx": "lambert-corse", + "comment": "", + "available": true, + "order": 33, + "auth_name": "EPSG", + "srid": 27564 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "NTF (Paris) / Lambert zone I", + "txt_idx": "lambert-zone-i", + "comment": "", + "available": true, + "order": 34, + "auth_name": "EPSG", + "srid": 27571 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "NTF (Paris) / Lambert zone II (Lambert II \u00e9tendu)", + "txt_idx": "lambert-zone-ii", + "comment": "", + "available": true, + "order": 35, + "auth_name": "EPSG", + "srid": 27572 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "NTF (Paris) / Lambert zone III", + "txt_idx": "lambert-zone-iii", + "comment": "", + "available": true, + "order": 36, + "auth_name": "EPSG", + "srid": 27573 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "NTF (Paris) / Lambert zone IV", + "txt_idx": "lambert-zone-iv", + "comment": "", + "available": true, + "order": 37, + "auth_name": "EPSG", + "srid": 27574 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 28N", + "txt_idx": "utm-28n", + "comment": "", + "available": true, + "order": 128, + "auth_name": "EPSG", + "srid": 32628 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 29N", + "txt_idx": "utm-29n", + "comment": "", + "available": true, + "order": 129, + "auth_name": "EPSG", + "srid": 32629 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 30N", + "txt_idx": "utm-30n", + "comment": "", + "available": true, + "order": 130, + "auth_name": "EPSG", + "srid": 32630 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 31N", + "txt_idx": "utm-31n", + "comment": "", + "available": true, + "order": 131, + "auth_name": "EPSG", + "srid": 32631 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 32N", + "txt_idx": "utm-32n", + "comment": "", + "available": true, + "order": 132, + "auth_name": "EPSG", + "srid": 32632 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 33N", + "txt_idx": "utm-33n", + "comment": "", + "available": true, + "order": 133, + "auth_name": "EPSG", + "srid": 32633 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 34N", + "txt_idx": "utm-34n", + "comment": "", + "available": true, + "order": 134, + "auth_name": "EPSG", + "srid": 32634 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 35N", + "txt_idx": "utm-35n", + "comment": "", + "available": true, + "order": 135, + "auth_name": "EPSG", + "srid": 32635 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 36N", + "txt_idx": "utm-36n", + "comment": "", + "available": true, + "order": 136, + "auth_name": "EPSG", + "srid": 32636 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 37N", + "txt_idx": "utm-37n", + "comment": "", + "available": true, + "order": 137, + "auth_name": "EPSG", + "srid": 32637 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 38N", + "txt_idx": "utm-38n", + "comment": "", + "available": true, + "order": 138, + "auth_name": "EPSG", + "srid": 32638 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 39N", + "txt_idx": "utm-39n", + "comment": "", + "available": true, + "order": 139, + "auth_name": "EPSG", + "srid": 32639 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / UTM zone 40N", + "txt_idx": "utm-40n", + "comment": "", + "available": true, + "order": 140, + "auth_name": "EPSG", + "srid": 32640 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "ETRS89 / LCC Europe", + "txt_idx": "lcc-europe", + "comment": "", + "available": true, + "order": 200, + "auth_name": "EPSG", + "srid": 3034 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "ETRS89 / LAEA Europe", + "txt_idx": "laea-europe", + "comment": "", + "available": true, + "order": 201, + "auth_name": "EPSG", + "srid": 3035 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "WGS 84 / World Mercator", + "txt_idx": "wgs84-mercator", + "comment": "", + "available": true, + "order": 250, + "auth_name": "EPSG", + "srid": 3395 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGFG95 / UTM zone 22N (Guyane)", + "txt_idx": "utm-guyane", + "comment": "", + "available": true, + "order": 300, + "auth_name": "EPSG", + "srid": 2972 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGR92 / UTM zone 40S (La R\u00e9union)", + "txt_idx": "utm-reunion", + "comment": "", + "available": true, + "order": 310, + "auth_name": "EPSG", + "srid": 2975 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGSPM06 / UTM 21N (St-Pierre-et-Miquelon)", + "txt_idx": "utm-miquelon", + "comment": "", + "available": true, + "order": 320, + "auth_name": "EPSG", + "srid": 4467 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RGM04 / UTM zone 38S (Mayotte)", + "txt_idx": "utm-mayotte", + "comment": "", + "available": true, + "order": 330, + "auth_name": "EPSG", + "srid": 4471 + } +}, +{ + "model": "ishtar_common.spatialreferencesystem", + "fields": { + "label": "RRAF 1991 / UTM zone 20N (Guadeloupe et Martinique)", + "txt_idx": "utm-guadeloupe", + "comment": "", + "available": true, + "order": 340, + "auth_name": "EPSG", + "srid": 4559 + } +} +] diff --git a/ishtar_common/fixtures/ishtar-access-control.json b/ishtar_common/fixtures/ishtar-access-control.json deleted file mode 100644 index c44418f07..000000000 --- a/ishtar_common/fixtures/ishtar-access-control.json +++ /dev/null @@ -1 +0,0 @@ -{"content_types": [{"model": "activitytype", "name": "Activity Type", "app_label": "archaeological_context_records"}, {"model": "acttype", "name": "Act type", "app_label": "archaeological_operations"}, {"model": "administrativeact", "name": "Administrative act", "app_label": "archaeological_operations"}, {"model": "file", "name": "Archaeological file", "app_label": "archaeological_files"}, {"model": "filetype", "name": "Archaeological file type", "app_label": "archaeological_files"}, {"model": "archaeologicalsite", "name": "Archaeological site", "app_label": "archaeological_operations"}, {"model": "arrondissement", "name": "arrondissement", "app_label": "ishtar_common"}, {"model": "author", "name": "Author", "app_label": "ishtar_common"}, {"model": "authortype", "name": "Author type", "app_label": "ishtar_common"}, {"model": "basefind", "name": "Base find", "app_label": "archaeological_finds"}, {"model": "batchtype", "name": "Batch type", "app_label": "archaeological_finds"}, {"model": "canton", "name": "canton", "app_label": "ishtar_common"}, {"model": "collection", "name": "Collection", "app_label": "archaeological_warehouse"}, {"model": "conservatorystate", "name": "Conservatory state", "app_label": "archaeological_finds"}, {"model": "container", "name": "Container", "app_label": "archaeological_warehouse"}, {"model": "containerlocalisation", "name": "Container localisation", "app_label": "archaeological_warehouse"}, {"model": "containertype", "name": "Container type", "app_label": "archaeological_warehouse"}, {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}, {"model": "contextrecord", "name": "Context Record", "app_label": "archaeological_context_records"}, {"model": "contextrecordsource", "name": "Context record documentation", "app_label": "archaeological_context_records"}, {"model": "dating", "name": "Dating", "app_label": "archaeological_context_records"}, {"model": "datingquality", "name": "Dating quality", "app_label": "archaeological_context_records"}, {"model": "datingtype", "name": "Dating type", "app_label": "archaeological_context_records"}, {"model": "department", "name": "Department", "app_label": "ishtar_common"}, {"model": "documentationtype", "name": "Documentation type", "app_label": "archaeological_context_records"}, {"model": "documenttemplate", "name": "Document template", "app_label": "ishtar_common"}, {"model": "excavationtechnictype", "name": "Excavation technic type", "app_label": "archaeological_context_records"}, {"model": "filebydepartment", "name": "file by department", "app_label": "archaeological_files"}, {"model": "find", "name": "Find", "app_label": "archaeological_finds"}, {"model": "findbasket", "name": "find basket", "app_label": "archaeological_finds"}, {"model": "findsource", "name": "Find documentation", "app_label": "archaeological_finds"}, {"model": "finddownstreamtreatments", "name": "find downstream treatments", "app_label": "archaeological_finds"}, {"model": "findtreatments", "name": "find treatments", "app_label": "archaeological_finds"}, {"model": "findupstreamtreatments", "name": "find upstream treatments", "app_label": "archaeological_finds"}, {"model": "format", "name": "Format", "app_label": "ishtar_common"}, {"model": "globalvar", "name": "Global variable", "app_label": "ishtar_common"}, {"model": "group", "name": "group", "app_label": "auth"}, {"model": "historicaladministrativeact", "name": "historical administrative act", "app_label": "archaeological_operations"}, {"model": "historicalbasefind", "name": "historical base find", "app_label": "archaeological_finds"}, {"model": "historicalcontextrecord", "name": "historical context record", "app_label": "archaeological_context_records"}, {"model": "historicalfile", "name": "historical file", "app_label": "archaeological_files"}, {"model": "historicalfind", "name": "historical find", "app_label": "archaeological_finds"}, {"model": "historicaloperation", "name": "historical operation", "app_label": "archaeological_operations"}, {"model": "historicalorganization", "name": "historical organization", "app_label": "ishtar_common"}, {"model": "historicalperson", "name": "historical person", "app_label": "ishtar_common"}, {"model": "historicaltreatment", "name": "historical treatment", "app_label": "archaeological_finds"}, {"model": "historicaltreatmentfile", "name": "historical treatment file", "app_label": "archaeological_finds"}, {"model": "identificationtype", "name": "Identification Type", "app_label": "archaeological_context_records"}, {"model": "import", "name": "Import", "app_label": "ishtar_common"}, {"model": "importercolumn", "name": "Importer - Column", "app_label": "ishtar_common"}, {"model": "importerdefault", "name": "Importer - Default", "app_label": "ishtar_common"}, {"model": "importerdefaultvalues", "name": "Importer - Default value", "app_label": "ishtar_common"}, {"model": "importerduplicatefield", "name": "Importer - Duplicate field", "app_label": "ishtar_common"}, {"model": "formatertype", "name": "Importer - Formater type", "app_label": "ishtar_common"}, {"model": "importermodel", "name": "Importer - Model", "app_label": "ishtar_common"}, {"model": "regexp", "name": "Importer - Regular expression", "app_label": "ishtar_common"}, {"model": "importtarget", "name": "Importer - Target", "app_label": "ishtar_common"}, {"model": "targetkey", "name": "Importer - Target key", "app_label": "ishtar_common"}, {"model": "importertype", "name": "Importer - Type", "app_label": "ishtar_common"}, {"model": "integritytype", "name": "Integrity type", "app_label": "archaeological_finds"}, {"model": "ishtarsiteprofile", "name": "Ishtar site profile", "app_label": "ishtar_common"}, {"model": "ishtaruser", "name": "Ishtar user", "app_label": "ishtar_common"}, {"model": "itemkey", "name": "item key", "app_label": "ishtar_common"}, {"model": "logentry", "name": "log entry", "app_label": "admin"}, {"model": "materialtype", "name": "Material type", "app_label": "archaeological_finds"}, {"model": "migrationhistory", "name": "migration history", "app_label": "south"}, {"model": "objecttype", "name": "Object type", "app_label": "archaeological_finds"}, {"model": "operation", "name": "Operation", "app_label": "archaeological_operations"}, {"model": "operationbydepartment", "name": "operation by department", "app_label": "archaeological_operations"}, {"model": "operationsource", "name": "Operation documentation", "app_label": "archaeological_operations"}, {"model": "recordrelations", "name": "Operation record relation", "app_label": "archaeological_operations"}, {"model": "relationtype", "name": "Operation relation type", "app_label": "archaeological_operations"}, {"model": "operationtype", "name": "Operation type", "app_label": "ishtar_common"}, {"model": "operationtypeold", "name": "Operation type old", "app_label": "archaeological_operations"}, {"model": "organization", "name": "Organization", "app_label": "ishtar_common"}, {"model": "organizationtype", "name": "Organization type", "app_label": "ishtar_common"}, {"model": "parcel", "name": "Parcel", "app_label": "archaeological_operations"}, {"model": "parcelowner", "name": "Parcel owner", "app_label": "archaeological_operations"}, {"model": "permission", "name": "permission", "app_label": "auth"}, {"model": "permittype", "name": "Permit type", "app_label": "archaeological_files"}, {"model": "person", "name": "Person", "app_label": "ishtar_common"}, {"model": "persontype", "name": "Person type", "app_label": "ishtar_common"}, {"model": "preservationtype", "name": "Preservation type", "app_label": "archaeological_finds"}, {"model": "property", "name": "Property", "app_label": "archaeological_finds"}, {"model": "recordrelations", "name": "Record relation", "app_label": "archaeological_context_records"}, {"model": "recordrelationview", "name": "record relation view", "app_label": "archaeological_context_records"}, {"model": "registrationprofile", "name": "registration profile", "app_label": "registration"}, {"model": "relationtype", "name": "Relation type", "app_label": "archaeological_context_records"}, {"model": "remaintype", "name": "Remain type", "app_label": "archaeological_operations"}, {"model": "remarkabilitytype", "name": "Remarkability type", "app_label": "archaeological_finds"}, {"model": "reportstate", "name": "Report state", "app_label": "archaeological_operations"}, {"model": "session", "name": "session", "app_label": "sessions"}, {"model": "site", "name": "site", "app_label": "sites"}, {"model": "sourcetype", "name": "Source type", "app_label": "ishtar_common"}, {"model": "spatialreferencesystem", "name": "Spatial reference system", "app_label": "ishtar_common"}, {"model": "state", "name": "State", "app_label": "ishtar_common"}, {"model": "supporttype", "name": "Support type", "app_label": "ishtar_common"}, {"model": "titletype", "name": "Title type", "app_label": "ishtar_common"}, {"model": "town", "name": "Town", "app_label": "ishtar_common"}, {"model": "treatment", "name": "Treatment", "app_label": "archaeological_finds"}, {"model": "treatmentsource", "name": "Treatment documentation", "app_label": "archaeological_finds"}, {"model": "treatmentfile", "name": "Treatment file", "app_label": "archaeological_finds"}, {"model": "treatmentfilesource", "name": "Treatment file documentation", "app_label": "archaeological_finds"}, {"model": "treatmentfiletype", "name": "Treatment file type", "app_label": "archaeological_finds"}, {"model": "treatmenttype", "name": "Treatment type", "app_label": "archaeological_finds"}, {"model": "treatmentstate", "name": "Type of treatment state", "app_label": "archaeological_finds"}, {"model": "period", "name": "Type Period", "app_label": "archaeological_operations"}, {"model": "saisinetype", "name": "Type Saisine", "app_label": "archaeological_files"}, {"model": "unit", "name": "Unit Type", "app_label": "archaeological_context_records"}, {"model": "user", "name": "user", "app_label": "auth"}, {"model": "warehouse", "name": "Warehouse", "app_label": "archaeological_warehouse"}, {"model": "warehousedivision", "name": "Warehouse division", "app_label": "archaeological_warehouse"}, {"model": "warehousedivisionlink", "name": "warehouse division link", "app_label": "archaeological_warehouse"}, {"model": "warehousetype", "name": "Warehouse type", "app_label": "archaeological_warehouse"}], "person_types": [{"comment": "Un acc\u00e8s limit\u00e9 \u00e0 la base, uniquement en lecture. Apr\u00e8s enregistrement.", "available": true, "txt_idx": "reader_access", "label": "Acc\u00e8s en lecture"}, {"comment": "", "available": true, "txt_idx": "administrator", "label": "Administrateur"}, {"comment": "Responsable de l'am\u00e9nagement (pr\u00e9ventif).", "available": true, "txt_idx": "general_contractor", "label": "Am\u00e9nageur"}, {"comment": "", "available": true, "txt_idx": "responsible_planning_service", "label": "Chef de service instructeur"}, {"comment": "Peut intervenir sur les donn\u00e9es d'une op\u00e9ration sans en \u00eatre responsable.", "available": true, "txt_idx": "collaborator", "label": "Collaborateur scientifique"}, {"comment": "Personne demandant une action sur le mobilier (traitements).", "available": true, "txt_idx": "applicant", "label": "Demandeur"}, {"comment": "Peut g\u00e9rer du mobilier qu'il n'a pas cr\u00e9\u00e9.\r\n\r\n", "available": true, "txt_idx": "warehouse_manager", "label": "Gestionnaire de d\u00e9p\u00f4t"}, {"comment": "", "available": true, "txt_idx": "sra_agent", "label": "Responsable de suivi scientifique"}, {"comment": "Responsable d'op\u00e9ration arch\u00e9ologique.", "available": true, "txt_idx": "head_scientist", "label": "Responsable scientifique"}, {"comment": "Peut utiliser toutes les fonctionnalit\u00e9s du module Administratif.", "available": true, "txt_idx": "secretarial_dept", "label": "Secr\u00e9tariat"}], "groups": [{"name": "Documents de demande de traitement : lecture"}, {"name": "Actes administratifs : modification/suppression"}, {"name": "Op\u00e9rations : cl\u00f4ture"}, {"name": "Dossiers : cl\u00f4ture"}, {"name": "D\u00e9p\u00f4ts : ajout"}, {"name": "D\u00e9p\u00f4ts : modification/suppression"}, {"name": "Actes administratifs rattach\u00e9s : lecture"}, {"name": "Demandes de traitement rattach\u00e9es : ajout"}, {"name": "Documents op\u00e9ration : ajout"}, {"name": "Documents op\u00e9ration : modification/suppression"}, {"name": "Demandes de traitement rattach\u00e9es : lecture"}, {"name": "Dossiers : ajout"}, {"name": "Documents de demande de traitement : ajout"}, {"name": "Dossiers : modification/suppression"}, {"name": "Demandes de traitement rattach\u00e9es : modification/suppression"}, {"name": "Mobilier : ajout"}, {"name": "Mobilier : modification/suppression"}, {"name": "Organisations rattach\u00e9es : lecture"}, {"name": "Op\u00e9rations : ajout"}, {"name": "Documents de demande de traitement : modification/suppression"}, {"name": "Op\u00e9rations : modification/suppression"}, {"name": "Organisations rattach\u00e9es : ajout"}, {"name": "Organisations : ajout"}, {"name": "Organisations : modification/suppression"}, {"name": "Organisations rattach\u00e9es : modification/suppression"}, {"name": "Traitements : ajout"}, {"name": "Traitements : modification/suppression"}, {"name": "Actes administratifs : ajout"}, {"name": "Documents UE : lecture"}, {"name": "Documents UE rattach\u00e9s : lecture"}, {"name": "Documents UE : ajout"}, {"name": "Actes administratifs : lecture"}, {"name": "Auteurs : lecture"}, {"name": "Personnes : ajout"}, {"name": "Personnes : modification/suppression"}, {"name": "Actes administratifs rattach\u00e9s : ajout"}, {"name": "Actes administratifs rattach\u00e9s : modification/suppression"}, {"name": "D\u00e9p\u00f4ts rattach\u00e9s : ajout"}, {"name": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression"}, {"name": "Documents op\u00e9ration rattach\u00e9s : ajout"}, {"name": "Documents op\u00e9ration rattach\u00e9s : modification/suppression"}, {"name": "Dossiers rattach\u00e9s : ajout"}, {"name": "Dossiers rattach\u00e9s : modification/suppression"}, {"name": "Traitements rattach\u00e9s : ajout"}, {"name": "Traitements rattach\u00e9s : modification/suppression"}, {"name": "Demandes de traitement : ajout"}, {"name": "Demandes de traitement : lecture"}, {"name": "Demandes de traitement : modification/suppression"}, {"name": "Auteurs : ajout"}, {"name": "Auteurs : modification/suppression"}, {"name": "D\u00e9p\u00f4ts rattach\u00e9s : lecture"}, {"name": "D\u00e9p\u00f4ts : lecture"}, {"name": "Documents op\u00e9ration rattach\u00e9s : lecture"}, {"name": "Documents op\u00e9ration : lecture"}, {"name": "Dossiers rattach\u00e9s : lecture"}, {"name": "Dossiers : lecture"}, {"name": "Mobilier : lecture"}, {"name": "Op\u00e9rations : lecture"}, {"name": "Organisations : lecture"}, {"name": "Personnes : lecture"}, {"name": "Traitements rattach\u00e9s : lecture"}, {"name": "Traitements : lecture"}, {"name": "UE : lecture"}, {"name": "UE : ajout"}, {"name": "UE : modification/suppression"}, {"name": "UE rattach\u00e9es : ajout"}, {"name": "UE rattach\u00e9es : lecture"}, {"name": "UE rattach\u00e9es : modification/suppression"}, {"name": "Personnes rattach\u00e9es : ajout"}, {"name": "Personnes rattach\u00e9es : lecture"}, {"name": "Personnes rattach\u00e9es : modification/suppression"}, {"name": "Op\u00e9rations rattach\u00e9es : ajout"}, {"name": "Op\u00e9rations rattach\u00e9es : lecture"}, {"name": "Op\u00e9rations rattach\u00e9es : modification/suppression"}, {"name": "Mobilier rattach\u00e9 : ajout"}, {"name": "Mobilier rattach\u00e9 : lecture"}, {"name": "Mobilier rattach\u00e9 : modification/suppression"}, {"name": "Documents UE rattach\u00e9s : modification/suppression"}, {"name": "Documents UE : modification/suppression"}, {"name": "Documents UE rattach\u00e9s : ajout"}, {"name": "Documents mobilier : lecture"}, {"name": "Documents mobilier : ajout"}, {"name": "Documents mobilier : modification/suppression"}, {"name": "Documents mobilier rattach\u00e9s : ajout"}, {"name": "Documents mobilier rattach\u00e9s : lecture"}, {"name": "Documents mobilier rattach\u00e9s : modification/suppression"}, {"name": "Documents de traitement : lecture"}, {"name": "Documents de traitement : ajout"}, {"name": "Documents de traitement : modification/suppression"}, {"name": "Documents de traitement rattach\u00e9s : lecture"}, {"name": "Documents de traitement rattach\u00e9s : ajout"}, {"name": "Documents de traitement rattach\u00e9s : modification/suppression"}, {"name": "Documents de demande de traitement rattach\u00e9s : lecture"}, {"name": "Documents de demande de traitement rattach\u00e9s : ajout"}, {"name": "Documents de demande de traitement rattach\u00e9s : modification/suppression"}], "group_perms": [{"group": "Documents de demande de traitement : lecture", "permission": "view_filetreatmentsource"}, {"group": "Actes administratifs : modification/suppression", "permission": "change_administrativeact"}, {"group": "Actes administratifs : modification/suppression", "permission": "delete_administrativeact"}, {"group": "Op\u00e9rations : cl\u00f4ture", "permission": "close_operation"}, {"group": "Dossiers : cl\u00f4ture", "permission": "close_file"}, {"group": "D\u00e9p\u00f4ts : ajout", "permission": "add_warehouse"}, {"group": "D\u00e9p\u00f4ts : modification/suppression", "permission": "change_warehouse"}, {"group": "D\u00e9p\u00f4ts : modification/suppression", "permission": "delete_warehouse"}, {"group": "Actes administratifs rattach\u00e9s : lecture", "permission": "view_own_administrativeact"}, {"group": "Demandes de traitement rattach\u00e9es : ajout", "permission": "add_own_filetreatment"}, {"group": "Documents op\u00e9ration : ajout", "permission": "add_operation"}, {"group": "Documents op\u00e9ration : modification/suppression", "permission": "change_operation"}, {"group": "Documents op\u00e9ration : modification/suppression", "permission": "delete_operation"}, {"group": "Demandes de traitement rattach\u00e9es : lecture", "permission": "view_own_filetreatment"}, {"group": "Dossiers : ajout", "permission": "add_file"}, {"group": "Documents de demande de traitement : ajout", "permission": "add_treatmentfilesource"}, {"group": "Dossiers : modification/suppression", "permission": "change_file"}, {"group": "Dossiers : modification/suppression", "permission": "delete_file"}, {"group": "Demandes de traitement rattach\u00e9es : modification/suppression", "permission": "change_own_filetreatment"}, {"group": "Demandes de traitement rattach\u00e9es : modification/suppression", "permission": "delete_own_filetreatment"}, {"group": "Mobilier : ajout", "permission": "add_basefind"}, {"group": "Mobilier : ajout", "permission": "add_find"}, {"group": "Mobilier : modification/suppression", "permission": "change_basefind"}, {"group": "Mobilier : modification/suppression", "permission": "delete_basefind"}, {"group": "Mobilier : modification/suppression", "permission": "change_find"}, {"group": "Mobilier : modification/suppression", "permission": "delete_find"}, {"group": "Organisations rattach\u00e9es : lecture", "permission": "view_own_organization"}, {"group": "Op\u00e9rations : ajout", "permission": "add_operation"}, {"group": "Documents de demande de traitement : modification/suppression", "permission": "change_treatmentfilesource"}, {"group": "Documents de demande de traitement : modification/suppression", "permission": "delete_treatmentfilesource"}, {"group": "Op\u00e9rations : modification/suppression", "permission": "change_operation"}, {"group": "Op\u00e9rations : modification/suppression", "permission": "delete_operation"}, {"group": "Organisations rattach\u00e9es : ajout", "permission": "add_own_organization"}, {"group": "Organisations : ajout", "permission": "add_organization"}, {"group": "Organisations : modification/suppression", "permission": "change_organization"}, {"group": "Organisations : modification/suppression", "permission": "delete_organization"}, {"group": "Organisations rattach\u00e9es : modification/suppression", "permission": "change_own_organization"}, {"group": "Organisations rattach\u00e9es : modification/suppression", "permission": "delete_own_organization"}, {"group": "Traitements : ajout", "permission": "add_treatment"}, {"group": "Traitements : modification/suppression", "permission": "change_treatment"}, {"group": "Traitements : modification/suppression", "permission": "delete_treatment"}, {"group": "Actes administratifs : ajout", "permission": "add_administrativeact"}, {"group": "Documents UE : lecture", "permission": "view_contextrecordsource"}, {"group": "Documents UE rattach\u00e9s : lecture", "permission": "view_own_contextrecordsource"}, {"group": "Documents UE : ajout", "permission": "add_contextrecordsource"}, {"group": "Actes administratifs : lecture", "permission": "view_administrativeact"}, {"group": "Auteurs : lecture", "permission": "view_author"}, {"group": "Personnes : ajout", "permission": "add_person"}, {"group": "Personnes : modification/suppression", "permission": "change_person"}, {"group": "Personnes : modification/suppression", "permission": "delete_person"}, {"group": "Actes administratifs rattach\u00e9s : ajout", "permission": "add_own_administrativeact"}, {"group": "Actes administratifs rattach\u00e9s : modification/suppression", "permission": "change_own_administrativeact"}, {"group": "Actes administratifs rattach\u00e9s : modification/suppression", "permission": "delete_own_administrativeact"}, {"group": "D\u00e9p\u00f4ts rattach\u00e9s : ajout", "permission": "add_own_warehouse"}, {"group": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression", "permission": "change_own_warehouse"}, {"group": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression", "permission": "delete_own_warehouse"}, {"group": "Documents op\u00e9ration rattach\u00e9s : ajout", "permission": "add_own_operation"}, {"group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression", "permission": "change_own_operation"}, {"group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression", "permission": "delete_own_operation"}, {"group": "Dossiers rattach\u00e9s : ajout", "permission": "add_own_file"}, {"group": "Dossiers rattach\u00e9s : modification/suppression", "permission": "change_own_file"}, {"group": "Dossiers rattach\u00e9s : modification/suppression", "permission": "delete_own_file"}, {"group": "Traitements rattach\u00e9s : ajout", "permission": "add_own_treatment"}, {"group": "Traitements rattach\u00e9s : modification/suppression", "permission": "change_own_treatment"}, {"group": "Traitements rattach\u00e9s : modification/suppression", "permission": "delete_own_treatment"}, {"group": "Demandes de traitement : ajout", "permission": "add_filetreatment"}, {"group": "Demandes de traitement : lecture", "permission": "view_filetreatment"}, {"group": "Demandes de traitement : modification/suppression", "permission": "change_filetreatment"}, {"group": "Demandes de traitement : modification/suppression", "permission": "delete_filetreatment"}, {"group": "Auteurs : ajout", "permission": "add_author"}, {"group": "Auteurs : modification/suppression", "permission": "change_author"}, {"group": "Auteurs : modification/suppression", "permission": "delete_author"}, {"group": "D\u00e9p\u00f4ts rattach\u00e9s : lecture", "permission": "view_own_warehouse"}, {"group": "D\u00e9p\u00f4ts : lecture", "permission": "view_warehouse"}, {"group": "Documents op\u00e9ration rattach\u00e9s : lecture", "permission": "view_own_operationsource"}, {"group": "Documents op\u00e9ration : lecture", "permission": "view_operationsource"}, {"group": "Dossiers rattach\u00e9s : lecture", "permission": "view_own_file"}, {"group": "Dossiers : lecture", "permission": "view_file"}, {"group": "Mobilier : lecture", "permission": "view_basefind"}, {"group": "Mobilier : lecture", "permission": "view_find"}, {"group": "Op\u00e9rations : lecture", "permission": "view_operation"}, {"group": "Organisations : lecture", "permission": "view_organization"}, {"group": "Personnes : lecture", "permission": "view_person"}, {"group": "Traitements rattach\u00e9s : lecture", "permission": "view_own_treatment"}, {"group": "Traitements : lecture", "permission": "view_treatment"}, {"group": "UE : lecture", "permission": "view_contextrecord"}, {"group": "UE : ajout", "permission": "add_contextrecord"}, {"group": "UE : modification/suppression", "permission": "change_contextrecord"}, {"group": "UE : modification/suppression", "permission": "delete_contextrecord"}, {"group": "UE rattach\u00e9es : ajout", "permission": "add_own_contextrecord"}, {"group": "UE rattach\u00e9es : lecture", "permission": "view_own_contextrecord"}, {"group": "UE rattach\u00e9es : modification/suppression", "permission": "change_own_contextrecord"}, {"group": "UE rattach\u00e9es : modification/suppression", "permission": "delete_own_contextrecord"}, {"group": "Personnes rattach\u00e9es : ajout", "permission": "add_own_person"}, {"group": "Personnes rattach\u00e9es : lecture", "permission": "view_own_person"}, {"group": "Personnes rattach\u00e9es : modification/suppression", "permission": "change_own_person"}, {"group": "Personnes rattach\u00e9es : modification/suppression", "permission": "delete_own_person"}, {"group": "Op\u00e9rations rattach\u00e9es : ajout", "permission": "add_own_operation"}, {"group": "Op\u00e9rations rattach\u00e9es : lecture", "permission": "view_own_operation"}, {"group": "Op\u00e9rations rattach\u00e9es : modification/suppression", "permission": "change_own_operation"}, {"group": "Op\u00e9rations rattach\u00e9es : modification/suppression", "permission": "delete_own_operation"}, {"group": "Mobilier rattach\u00e9 : ajout", "permission": "add_own_basefind"}, {"group": "Mobilier rattach\u00e9 : ajout", "permission": "add_own_find"}, {"group": "Mobilier rattach\u00e9 : lecture", "permission": "view_own_basefind"}, {"group": "Mobilier rattach\u00e9 : lecture", "permission": "view_own_find"}, {"group": "Mobilier rattach\u00e9 : modification/suppression", "permission": "change_own_basefind"}, {"group": "Mobilier rattach\u00e9 : modification/suppression", "permission": "delete_own_basefind"}, {"group": "Mobilier rattach\u00e9 : modification/suppression", "permission": "change_own_find"}, {"group": "Mobilier rattach\u00e9 : modification/suppression", "permission": "delete_own_find"}, {"group": "Documents UE rattach\u00e9s : modification/suppression", "permission": "change_own_contextrecordsource"}, {"group": "Documents UE rattach\u00e9s : modification/suppression", "permission": "delete_own_contextrecordsource"}, {"group": "Documents UE : modification/suppression", "permission": "change_contextrecordsource"}, {"group": "Documents UE : modification/suppression", "permission": "delete_contextrecordsource"}, {"group": "Documents UE rattach\u00e9s : ajout", "permission": "add_own_contextrecordsource"}, {"group": "Documents mobilier : lecture", "permission": "view_findsource"}, {"group": "Documents mobilier : ajout", "permission": "add_findsource"}, {"group": "Documents mobilier : modification/suppression", "permission": "change_findsource"}, {"group": "Documents mobilier : modification/suppression", "permission": "delete_findsource"}, {"group": "Documents mobilier rattach\u00e9s : ajout", "permission": "add_own_findsource"}, {"group": "Documents mobilier rattach\u00e9s : lecture", "permission": "view_own_findsource"}, {"group": "Documents mobilier rattach\u00e9s : modification/suppression", "permission": "change_own_findsource"}, {"group": "Documents mobilier rattach\u00e9s : modification/suppression", "permission": "delete_own_findsource"}, {"group": "Documents de traitement : lecture", "permission": "view_treatmentsource"}, {"group": "Documents de traitement : ajout", "permission": "add_treatmentsource"}, {"group": "Documents de traitement : modification/suppression", "permission": "change_treatmentsource"}, {"group": "Documents de traitement : modification/suppression", "permission": "delete_treatmentsource"}, {"group": "Documents de traitement rattach\u00e9s : lecture", "permission": "view_own_treatmentsource"}, {"group": "Documents de traitement rattach\u00e9s : ajout", "permission": "add_own_treatmentsource"}, {"group": "Documents de traitement rattach\u00e9s : modification/suppression", "permission": "change_own_treatmentsource"}, {"group": "Documents de traitement rattach\u00e9s : modification/suppression", "permission": "delete_own_treatmentsource"}, {"group": "Documents de demande de traitement rattach\u00e9s : lecture", "permission": "view_own_filetreatmentsource"}, {"group": "Documents de demande de traitement rattach\u00e9s : ajout", "permission": "add_own_filetreatmentsource"}, {"group": "Documents de demande de traitement rattach\u00e9s : modification/suppression", "permission": "change_own_filetreatmentsource"}, {"group": "Documents de demande de traitement rattach\u00e9s : modification/suppression", "permission": "delete_own_filetreatmentsource"}], "person_type_groups": [{"person_type": "reader_access", "group": "Actes administratifs : lecture"}, {"person_type": "reader_access", "group": "Demandes de traitement : lecture"}, {"person_type": "reader_access", "group": "D\u00e9p\u00f4ts : lecture"}, {"person_type": "reader_access", "group": "Documents op\u00e9ration : lecture"}, {"person_type": "reader_access", "group": "Dossiers : lecture"}, {"person_type": "reader_access", "group": "Mobilier : lecture"}, {"person_type": "reader_access", "group": "Op\u00e9rations : lecture"}, {"person_type": "reader_access", "group": "Organisations : lecture"}, {"person_type": "reader_access", "group": "Personnes : lecture"}, {"person_type": "reader_access", "group": "Traitements : lecture"}, {"person_type": "reader_access", "group": "UE : lecture"}, {"person_type": "administrator", "group": "Op\u00e9rations : lecture"}, {"person_type": "administrator", "group": "Dossiers : lecture"}, {"person_type": "administrator", "group": "UE : lecture"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts : lecture"}, {"person_type": "administrator", "group": "Mobilier : lecture"}, {"person_type": "administrator", "group": "Traitements : lecture"}, {"person_type": "administrator", "group": "Actes administratifs : lecture"}, {"person_type": "administrator", "group": "Actes administratifs : ajout"}, {"person_type": "administrator", "group": "Actes administratifs : modification/suppression"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts : ajout"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts : modification/suppression"}, {"person_type": "administrator", "group": "Dossiers : ajout"}, {"person_type": "administrator", "group": "Dossiers : modification/suppression"}, {"person_type": "administrator", "group": "Mobilier : ajout"}, {"person_type": "administrator", "group": "Mobilier : modification/suppression"}, {"person_type": "administrator", "group": "Op\u00e9rations : ajout"}, {"person_type": "administrator", "group": "Op\u00e9rations : modification/suppression"}, {"person_type": "administrator", "group": "Traitements : ajout"}, {"person_type": "administrator", "group": "Traitements : modification/suppression"}, {"person_type": "administrator", "group": "UE : ajout"}, {"person_type": "administrator", "group": "UE : modification/suppression"}, {"person_type": "administrator", "group": "Personnes : ajout"}, {"person_type": "administrator", "group": "Personnes : modification/suppression"}, {"person_type": "administrator", "group": "Organisations : lecture"}, {"person_type": "administrator", "group": "Organisations : modification/suppression"}, {"person_type": "administrator", "group": "Organisations : ajout"}, {"person_type": "administrator", "group": "Op\u00e9rations : cl\u00f4ture"}, {"person_type": "administrator", "group": "Dossiers : cl\u00f4ture"}, {"person_type": "administrator", "group": "Documents op\u00e9ration : lecture"}, {"person_type": "administrator", "group": "Documents op\u00e9ration : modification/suppression"}, {"person_type": "administrator", "group": "Documents op\u00e9ration : ajout"}, {"person_type": "administrator", "group": "Personnes : lecture"}, {"person_type": "administrator", "group": "Actes administratifs rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "Actes administratifs rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "Actes administratifs rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "Documents op\u00e9ration rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "Documents op\u00e9ration rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "Dossiers rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "Dossiers rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "Dossiers rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "Mobilier rattach\u00e9 : ajout"}, {"person_type": "administrator", "group": "Mobilier rattach\u00e9 : modification/suppression"}, {"person_type": "administrator", "group": "Mobilier rattach\u00e9 : lecture"}, {"person_type": "administrator", "group": "Op\u00e9rations rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "Op\u00e9rations rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "Op\u00e9rations rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Organisations rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "Organisations rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "Organisations rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Traitements rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "Traitements rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "Traitements rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "UE rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "UE rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "UE rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Personnes rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "Personnes rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "Personnes rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Demandes de traitement : ajout"}, {"person_type": "administrator", "group": "Demandes de traitement : modification/suppression"}, {"person_type": "administrator", "group": "Demandes de traitement : lecture"}, {"person_type": "administrator", "group": "Demandes de traitement rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "Demandes de traitement rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Demandes de traitement rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "Auteurs : ajout"}, {"person_type": "administrator", "group": "Auteurs : modification/suppression"}, {"person_type": "administrator", "group": "Auteurs : lecture"}, {"person_type": "collaborator", "group": "Auteurs : ajout"}, {"person_type": "collaborator", "group": "Auteurs : modification/suppression"}, {"person_type": "collaborator", "group": "Auteurs : lecture"}, {"person_type": "collaborator", "group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression"}, {"person_type": "collaborator", "group": "Documents op\u00e9ration rattach\u00e9s : lecture"}, {"person_type": "collaborator", "group": "Mobilier rattach\u00e9 : ajout"}, {"person_type": "collaborator", "group": "Mobilier rattach\u00e9 : modification/suppression"}, {"person_type": "collaborator", "group": "Mobilier rattach\u00e9 : lecture"}, {"person_type": "collaborator", "group": "Documents op\u00e9ration rattach\u00e9s : ajout"}, {"person_type": "collaborator", "group": "Op\u00e9rations rattach\u00e9es : lecture"}, {"person_type": "collaborator", "group": "UE rattach\u00e9es : ajout"}, {"person_type": "collaborator", "group": "UE rattach\u00e9es : modification/suppression"}, {"person_type": "collaborator", "group": "UE rattach\u00e9es : lecture"}, {"person_type": "collaborator", "group": "Personnes rattach\u00e9es : lecture"}, {"person_type": "warehouse_manager", "group": "Demandes de traitement : ajout"}, {"person_type": "warehouse_manager", "group": "Demandes de traitement : modification/suppression"}, {"person_type": "warehouse_manager", "group": "Demandes de traitement : lecture"}, {"person_type": "warehouse_manager", "group": "UE : lecture"}, {"person_type": "warehouse_manager", "group": "D\u00e9p\u00f4ts : lecture"}, {"person_type": "warehouse_manager", "group": "Mobilier : lecture"}, {"person_type": "warehouse_manager", "group": "Op\u00e9rations : lecture"}, {"person_type": "warehouse_manager", "group": "Actes administratifs : lecture"}, {"person_type": "warehouse_manager", "group": "D\u00e9p\u00f4ts : ajout"}, {"person_type": "warehouse_manager", "group": "D\u00e9p\u00f4ts : modification/suppression"}, {"person_type": "warehouse_manager", "group": "Dossiers : lecture"}, {"person_type": "warehouse_manager", "group": "Mobilier : ajout"}, {"person_type": "warehouse_manager", "group": "Mobilier : modification/suppression"}, {"person_type": "warehouse_manager", "group": "Auteurs : lecture"}, {"person_type": "warehouse_manager", "group": "Traitements : ajout"}, {"person_type": "warehouse_manager", "group": "Traitements : modification/suppression"}, {"person_type": "warehouse_manager", "group": "Traitements : lecture"}, {"person_type": "warehouse_manager", "group": "Organisations : lecture"}, {"person_type": "warehouse_manager", "group": "Personnes : lecture"}, {"person_type": "warehouse_manager", "group": "Documents op\u00e9ration : lecture"}, {"person_type": "sra_agent", "group": "Op\u00e9rations : lecture"}, {"person_type": "sra_agent", "group": "Dossiers : lecture"}, {"person_type": "sra_agent", "group": "UE : lecture"}, {"person_type": "sra_agent", "group": "D\u00e9p\u00f4ts : lecture"}, {"person_type": "sra_agent", "group": "Mobilier : lecture"}, {"person_type": "sra_agent", "group": "Traitements : lecture"}, {"person_type": "sra_agent", "group": "Actes administratifs : lecture"}, {"person_type": "sra_agent", "group": "Actes administratifs : ajout"}, {"person_type": "sra_agent", "group": "Actes administratifs : modification/suppression"}, {"person_type": "sra_agent", "group": "Dossiers : ajout"}, {"person_type": "sra_agent", "group": "Dossiers : modification/suppression"}, {"person_type": "sra_agent", "group": "Mobilier : ajout"}, {"person_type": "sra_agent", "group": "Mobilier : modification/suppression"}, {"person_type": "sra_agent", "group": "Op\u00e9rations : ajout"}, {"person_type": "sra_agent", "group": "Op\u00e9rations : modification/suppression"}, {"person_type": "sra_agent", "group": "UE : ajout"}, {"person_type": "sra_agent", "group": "UE : modification/suppression"}, {"person_type": "sra_agent", "group": "Personnes : ajout"}, {"person_type": "sra_agent", "group": "Personnes : modification/suppression"}, {"person_type": "sra_agent", "group": "Organisations : lecture"}, {"person_type": "sra_agent", "group": "Organisations : modification/suppression"}, {"person_type": "sra_agent", "group": "Organisations : ajout"}, {"person_type": "sra_agent", "group": "Op\u00e9rations : cl\u00f4ture"}, {"person_type": "sra_agent", "group": "Dossiers : cl\u00f4ture"}, {"person_type": "sra_agent", "group": "Documents op\u00e9ration : lecture"}, {"person_type": "sra_agent", "group": "Documents op\u00e9ration : modification/suppression"}, {"person_type": "sra_agent", "group": "Documents op\u00e9ration : ajout"}, {"person_type": "sra_agent", "group": "Personnes : lecture"}, {"person_type": "sra_agent", "group": "Demandes de traitement : lecture"}, {"person_type": "sra_agent", "group": "Auteurs : ajout"}, {"person_type": "sra_agent", "group": "Auteurs : modification/suppression"}, {"person_type": "sra_agent", "group": "Auteurs : lecture"}, {"person_type": "head_scientist", "group": "Op\u00e9rations : lecture"}, {"person_type": "head_scientist", "group": "Auteurs : ajout"}, {"person_type": "head_scientist", "group": "Auteurs : modification/suppression"}, {"person_type": "head_scientist", "group": "Auteurs : lecture"}, {"person_type": "head_scientist", "group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression"}, {"person_type": "head_scientist", "group": "Documents op\u00e9ration rattach\u00e9s : lecture"}, {"person_type": "head_scientist", "group": "Mobilier rattach\u00e9 : ajout"}, {"person_type": "head_scientist", "group": "Mobilier rattach\u00e9 : modification/suppression"}, {"person_type": "head_scientist", "group": "Mobilier rattach\u00e9 : lecture"}, {"person_type": "head_scientist", "group": "Documents op\u00e9ration rattach\u00e9s : ajout"}, {"person_type": "head_scientist", "group": "Op\u00e9rations rattach\u00e9es : modification/suppression"}, {"person_type": "head_scientist", "group": "UE rattach\u00e9es : ajout"}, {"person_type": "head_scientist", "group": "UE rattach\u00e9es : modification/suppression"}, {"person_type": "head_scientist", "group": "UE rattach\u00e9es : lecture"}, {"person_type": "head_scientist", "group": "Personnes rattach\u00e9es : lecture"}, {"person_type": "secretarial_dept", "group": "Op\u00e9rations : lecture"}, {"person_type": "secretarial_dept", "group": "Dossiers : lecture"}, {"person_type": "secretarial_dept", "group": "UE : lecture"}, {"person_type": "secretarial_dept", "group": "Mobilier : lecture"}, {"person_type": "secretarial_dept", "group": "Personnes : lecture"}, {"person_type": "secretarial_dept", "group": "Actes administratifs : lecture"}, {"person_type": "secretarial_dept", "group": "Actes administratifs : ajout"}, {"person_type": "secretarial_dept", "group": "Actes administratifs : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Dossiers : ajout"}, {"person_type": "secretarial_dept", "group": "Dossiers : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Op\u00e9rations : ajout"}, {"person_type": "secretarial_dept", "group": "Op\u00e9rations : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Personnes : ajout"}, {"person_type": "secretarial_dept", "group": "Personnes : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Organisations : lecture"}, {"person_type": "secretarial_dept", "group": "Organisations : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Organisations : ajout"}, {"person_type": "secretarial_dept", "group": "Op\u00e9rations : cl\u00f4ture"}, {"person_type": "secretarial_dept", "group": "Dossiers : cl\u00f4ture"}], "permissions": [{"codename": "add_logentry", "name": "Can add log entry", "content_type": ["admin", "logentry"]}, {"codename": "change_logentry", "name": "Can change log entry", "content_type": ["admin", "logentry"]}, {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": ["admin", "logentry"]}, {"codename": "add_activitytype", "name": "Can add Activity Type", "content_type": ["archaeological_context_records", "activitytype"]}, {"codename": "change_activitytype", "name": "Can change Activity Type", "content_type": ["archaeological_context_records", "activitytype"]}, {"codename": "delete_activitytype", "name": "Can delete Activity Type", "content_type": ["archaeological_context_records", "activitytype"]}, {"codename": "add_contextrecord", "name": "Can add Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "add_own_contextrecord", "name": "Can add own Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "change_contextrecord", "name": "Can change Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "change_own_contextrecord", "name": "Can change own Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "delete_contextrecord", "name": "Can delete Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "delete_own_contextrecord", "name": "Can delete own Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "view_contextrecord", "name": "Can view all Context Records", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "view_own_contextrecord", "name": "Can view own Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "add_contextrecordsource", "name": "Can add Context record documentation", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "add_own_contextrecordsource", "name": "Can add own Context record source", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "change_contextrecordsource", "name": "Can change Context record documentation", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "change_own_contextrecordsource", "name": "Can change own Context record source", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "delete_contextrecordsource", "name": "Can delete Context record documentation", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "delete_own_contextrecordsource", "name": "Can delete own Context record source", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "view_contextrecordsource", "name": "Can view all Context record sources", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "view_own_contextrecordsource", "name": "Can view own Context record source", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "add_dating", "name": "Can add Dating", "content_type": ["archaeological_context_records", "dating"]}, {"codename": "change_dating", "name": "Can change Dating", "content_type": ["archaeological_context_records", "dating"]}, {"codename": "delete_dating", "name": "Can delete Dating", "content_type": ["archaeological_context_records", "dating"]}, {"codename": "add_datingquality", "name": "Can add Dating quality", "content_type": ["archaeological_context_records", "datingquality"]}, {"codename": "change_datingquality", "name": "Can change Dating quality", "content_type": ["archaeological_context_records", "datingquality"]}, {"codename": "delete_datingquality", "name": "Can delete Dating quality", "content_type": ["archaeological_context_records", "datingquality"]}, {"codename": "add_datingtype", "name": "Can add Dating type", "content_type": ["archaeological_context_records", "datingtype"]}, {"codename": "change_datingtype", "name": "Can change Dating type", "content_type": ["archaeological_context_records", "datingtype"]}, {"codename": "delete_datingtype", "name": "Can delete Dating type", "content_type": ["archaeological_context_records", "datingtype"]}, {"codename": "add_documentationtype", "name": "Can add Documentation type", "content_type": ["archaeological_context_records", "documentationtype"]}, {"codename": "change_documentationtype", "name": "Can change Documentation type", "content_type": ["archaeological_context_records", "documentationtype"]}, {"codename": "delete_documentationtype", "name": "Can delete Documentation type", "content_type": ["archaeological_context_records", "documentationtype"]}, {"codename": "add_excavationtechnictype", "name": "Can add Excavation technic type", "content_type": ["archaeological_context_records", "excavationtechnictype"]}, {"codename": "change_excavationtechnictype", "name": "Can change Excavation technic type", "content_type": ["archaeological_context_records", "excavationtechnictype"]}, {"codename": "delete_excavationtechnictype", "name": "Can delete Excavation technic type", "content_type": ["archaeological_context_records", "excavationtechnictype"]}, {"codename": "add_historicalcontextrecord", "name": "Can add historical context record", "content_type": ["archaeological_context_records", "historicalcontextrecord"]}, {"codename": "change_historicalcontextrecord", "name": "Can change historical context record", "content_type": ["archaeological_context_records", "historicalcontextrecord"]}, {"codename": "delete_historicalcontextrecord", "name": "Can delete historical context record", "content_type": ["archaeological_context_records", "historicalcontextrecord"]}, {"codename": "add_identificationtype", "name": "Can add Identification Type", "content_type": ["archaeological_context_records", "identificationtype"]}, {"codename": "change_identificationtype", "name": "Can change Identification Type", "content_type": ["archaeological_context_records", "identificationtype"]}, {"codename": "delete_identificationtype", "name": "Can delete Identification Type", "content_type": ["archaeological_context_records", "identificationtype"]}, {"codename": "add_recordrelations", "name": "Can add Record relation", "content_type": ["archaeological_context_records", "recordrelations"]}, {"codename": "change_recordrelations", "name": "Can change Record relation", "content_type": ["archaeological_context_records", "recordrelations"]}, {"codename": "delete_recordrelations", "name": "Can delete Record relation", "content_type": ["archaeological_context_records", "recordrelations"]}, {"codename": "add_recordrelationview", "name": "Can add record relation view", "content_type": ["archaeological_context_records", "recordrelationview"]}, {"codename": "change_recordrelationview", "name": "Can change record relation view", "content_type": ["archaeological_context_records", "recordrelationview"]}, {"codename": "delete_recordrelationview", "name": "Can delete record relation view", "content_type": ["archaeological_context_records", "recordrelationview"]}, {"codename": "add_relationtype", "name": "Can add Relation type", "content_type": ["archaeological_context_records", "relationtype"]}, {"codename": "change_relationtype", "name": "Can change Relation type", "content_type": ["archaeological_context_records", "relationtype"]}, {"codename": "delete_relationtype", "name": "Can delete Relation type", "content_type": ["archaeological_context_records", "relationtype"]}, {"codename": "add_unit", "name": "Can add Unit Type", "content_type": ["archaeological_context_records", "unit"]}, {"codename": "change_unit", "name": "Can change Unit Type", "content_type": ["archaeological_context_records", "unit"]}, {"codename": "delete_unit", "name": "Can delete Unit Type", "content_type": ["archaeological_context_records", "unit"]}, {"codename": "add_file", "name": "Can add Archaeological file", "content_type": ["archaeological_files", "file"]}, {"codename": "add_own_file", "name": "Can add own Archaelogical file", "content_type": ["archaeological_files", "file"]}, {"codename": "change_file", "name": "Can change Archaeological file", "content_type": ["archaeological_files", "file"]}, {"codename": "change_own_file", "name": "Can change own Archaelogical file", "content_type": ["archaeological_files", "file"]}, {"codename": "close_file", "name": "Can close File", "content_type": ["archaeological_files", "file"]}, {"codename": "delete_file", "name": "Can delete Archaeological file", "content_type": ["archaeological_files", "file"]}, {"codename": "delete_own_file", "name": "Can delete own Archaelogical file", "content_type": ["archaeological_files", "file"]}, {"codename": "view_file", "name": "Can view all Archaelogical files", "content_type": ["archaeological_files", "file"]}, {"codename": "view_own_file", "name": "Can view own Archaelogical file", "content_type": ["archaeological_files", "file"]}, {"codename": "add_filebydepartment", "name": "Can add file by department", "content_type": ["archaeological_files", "filebydepartment"]}, {"codename": "change_filebydepartment", "name": "Can change file by department", "content_type": ["archaeological_files", "filebydepartment"]}, {"codename": "delete_filebydepartment", "name": "Can delete file by department", "content_type": ["archaeological_files", "filebydepartment"]}, {"codename": "add_filetype", "name": "Can add Archaeological file type", "content_type": ["archaeological_files", "filetype"]}, {"codename": "change_filetype", "name": "Can change Archaeological file type", "content_type": ["archaeological_files", "filetype"]}, {"codename": "delete_filetype", "name": "Can delete Archaeological file type", "content_type": ["archaeological_files", "filetype"]}, {"codename": "add_historicalfile", "name": "Can add historical file", "content_type": ["archaeological_files", "historicalfile"]}, {"codename": "change_historicalfile", "name": "Can change historical file", "content_type": ["archaeological_files", "historicalfile"]}, {"codename": "delete_historicalfile", "name": "Can delete historical file", "content_type": ["archaeological_files", "historicalfile"]}, {"codename": "add_permittype", "name": "Can add Permit type", "content_type": ["archaeological_files", "permittype"]}, {"codename": "change_permittype", "name": "Can change Permit type", "content_type": ["archaeological_files", "permittype"]}, {"codename": "delete_permittype", "name": "Can delete Permit type", "content_type": ["archaeological_files", "permittype"]}, {"codename": "add_saisinetype", "name": "Can add Type Saisine", "content_type": ["archaeological_files", "saisinetype"]}, {"codename": "change_saisinetype", "name": "Can change Type Saisine", "content_type": ["archaeological_files", "saisinetype"]}, {"codename": "delete_saisinetype", "name": "Can delete Type Saisine", "content_type": ["archaeological_files", "saisinetype"]}, {"codename": "add_basefind", "name": "Can add Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "add_own_basefind", "name": "Can add own Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "change_basefind", "name": "Can change Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "change_own_basefind", "name": "Can change own Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "delete_basefind", "name": "Can delete Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "delete_own_basefind", "name": "Can delete own Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "view_basefind", "name": "Can view all Base finds", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "view_own_basefind", "name": "Can view own Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "add_batchtype", "name": "Can add Batch type", "content_type": ["archaeological_finds", "batchtype"]}, {"codename": "change_batchtype", "name": "Can change Batch type", "content_type": ["archaeological_finds", "batchtype"]}, {"codename": "delete_batchtype", "name": "Can delete Batch type", "content_type": ["archaeological_finds", "batchtype"]}, {"codename": "add_conservatorystate", "name": "Can add Conservatory state", "content_type": ["archaeological_finds", "conservatorystate"]}, {"codename": "change_conservatorystate", "name": "Can change Conservatory state", "content_type": ["archaeological_finds", "conservatorystate"]}, {"codename": "delete_conservatorystate", "name": "Can delete Conservatory state", "content_type": ["archaeological_finds", "conservatorystate"]}, {"codename": "add_find", "name": "Can add Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "add_own_find", "name": "Can add own Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "change_find", "name": "Can change Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "change_own_find", "name": "Can change own Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "delete_find", "name": "Can delete Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "delete_own_find", "name": "Can delete own Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "view_find", "name": "Can view all Finds", "content_type": ["archaeological_finds", "find"]}, {"codename": "view_own_find", "name": "Can view own Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "add_findbasket", "name": "Can add find basket", "content_type": ["archaeological_finds", "findbasket"]}, {"codename": "change_findbasket", "name": "Can change find basket", "content_type": ["archaeological_finds", "findbasket"]}, {"codename": "delete_findbasket", "name": "Can delete find basket", "content_type": ["archaeological_finds", "findbasket"]}, {"codename": "add_finddownstreamtreatments", "name": "Can add find downstream treatments", "content_type": ["archaeological_finds", "finddownstreamtreatments"]}, {"codename": "change_finddownstreamtreatments", "name": "Can change find downstream treatments", "content_type": ["archaeological_finds", "finddownstreamtreatments"]}, {"codename": "delete_finddownstreamtreatments", "name": "Can delete find downstream treatments", "content_type": ["archaeological_finds", "finddownstreamtreatments"]}, {"codename": "add_findsource", "name": "Can add Find documentation", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "add_own_findsource", "name": "Can add own Find source", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "change_findsource", "name": "Can change Find documentation", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "change_own_findsource", "name": "Can change own Find source", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "delete_findsource", "name": "Can delete Find documentation", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "delete_own_findsource", "name": "Can delete own Find source", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "view_findsource", "name": "Can view all Find sources", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "view_own_findsource", "name": "Can view own Find source", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "add_findtreatments", "name": "Can add find treatments", "content_type": ["archaeological_finds", "findtreatments"]}, {"codename": "change_findtreatments", "name": "Can change find treatments", "content_type": ["archaeological_finds", "findtreatments"]}, {"codename": "delete_findtreatments", "name": "Can delete find treatments", "content_type": ["archaeological_finds", "findtreatments"]}, {"codename": "add_findupstreamtreatments", "name": "Can add find upstream treatments", "content_type": ["archaeological_finds", "findupstreamtreatments"]}, {"codename": "change_findupstreamtreatments", "name": "Can change find upstream treatments", "content_type": ["archaeological_finds", "findupstreamtreatments"]}, {"codename": "delete_findupstreamtreatments", "name": "Can delete find upstream treatments", "content_type": ["archaeological_finds", "findupstreamtreatments"]}, {"codename": "add_historicalbasefind", "name": "Can add historical base find", "content_type": ["archaeological_finds", "historicalbasefind"]}, {"codename": "change_historicalbasefind", "name": "Can change historical base find", "content_type": ["archaeological_finds", "historicalbasefind"]}, {"codename": "delete_historicalbasefind", "name": "Can delete historical base find", "content_type": ["archaeological_finds", "historicalbasefind"]}, {"codename": "add_historicalfind", "name": "Can add historical find", "content_type": ["archaeological_finds", "historicalfind"]}, {"codename": "change_historicalfind", "name": "Can change historical find", "content_type": ["archaeological_finds", "historicalfind"]}, {"codename": "delete_historicalfind", "name": "Can delete historical find", "content_type": ["archaeological_finds", "historicalfind"]}, {"codename": "add_historicaltreatment", "name": "Can add historical treatment", "content_type": ["archaeological_finds", "historicaltreatment"]}, {"codename": "change_historicaltreatment", "name": "Can change historical treatment", "content_type": ["archaeological_finds", "historicaltreatment"]}, {"codename": "delete_historicaltreatment", "name": "Can delete historical treatment", "content_type": ["archaeological_finds", "historicaltreatment"]}, {"codename": "add_historicaltreatmentfile", "name": "Can add historical treatment file", "content_type": ["archaeological_finds", "historicaltreatmentfile"]}, {"codename": "change_historicaltreatmentfile", "name": "Can change historical treatment file", "content_type": ["archaeological_finds", "historicaltreatmentfile"]}, {"codename": "delete_historicaltreatmentfile", "name": "Can delete historical treatment file", "content_type": ["archaeological_finds", "historicaltreatmentfile"]}, {"codename": "add_integritytype", "name": "Can add Integrity type", "content_type": ["archaeological_finds", "integritytype"]}, {"codename": "change_integritytype", "name": "Can change Integrity type", "content_type": ["archaeological_finds", "integritytype"]}, {"codename": "delete_integritytype", "name": "Can delete Integrity type", "content_type": ["archaeological_finds", "integritytype"]}, {"codename": "add_materialtype", "name": "Can add Material type", "content_type": ["archaeological_finds", "materialtype"]}, {"codename": "change_materialtype", "name": "Can change Material type", "content_type": ["archaeological_finds", "materialtype"]}, {"codename": "delete_materialtype", "name": "Can delete Material type", "content_type": ["archaeological_finds", "materialtype"]}, {"codename": "add_objecttype", "name": "Can add Object type", "content_type": ["archaeological_finds", "objecttype"]}, {"codename": "change_objecttype", "name": "Can change Object type", "content_type": ["archaeological_finds", "objecttype"]}, {"codename": "delete_objecttype", "name": "Can delete Object type", "content_type": ["archaeological_finds", "objecttype"]}, {"codename": "add_preservationtype", "name": "Can add Preservation type", "content_type": ["archaeological_finds", "preservationtype"]}, {"codename": "change_preservationtype", "name": "Can change Preservation type", "content_type": ["archaeological_finds", "preservationtype"]}, {"codename": "delete_preservationtype", "name": "Can delete Preservation type", "content_type": ["archaeological_finds", "preservationtype"]}, {"codename": "add_property", "name": "Can add Property", "content_type": ["archaeological_finds", "property"]}, {"codename": "change_property", "name": "Can change Property", "content_type": ["archaeological_finds", "property"]}, {"codename": "delete_property", "name": "Can delete Property", "content_type": ["archaeological_finds", "property"]}, {"codename": "add_remarkabilitytype", "name": "Can add Remarkability type", "content_type": ["archaeological_finds", "remarkabilitytype"]}, {"codename": "change_remarkabilitytype", "name": "Can change Remarkability type", "content_type": ["archaeological_finds", "remarkabilitytype"]}, {"codename": "delete_remarkabilitytype", "name": "Can delete Remarkability type", "content_type": ["archaeological_finds", "remarkabilitytype"]}, {"codename": "add_own_treatment", "name": "Can add own Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "add_treatment", "name": "Can add Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "change_own_treatment", "name": "Can change own Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "change_treatment", "name": "Can change Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "delete_own_treatment", "name": "Can delete own Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "delete_treatment", "name": "Can delete Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "view_own_treatment", "name": "Can view own Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "view_treatment", "name": "Can view all Treatments", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "add_filetreatment", "name": "Can add Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "add_own_filetreatment", "name": "Can add own Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "add_treatmentfile", "name": "Can add Treatment file", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "change_filetreatment", "name": "Can change Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "change_own_filetreatment", "name": "Can change own Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "change_treatmentfile", "name": "Can change Treatment file", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "delete_filetreatment", "name": "Can delete Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "delete_own_filetreatment", "name": "Can delete own Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "delete_treatmentfile", "name": "Can delete Treatment file", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "view_filetreatment", "name": "Can view all Treatment requests", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "view_own_filetreatment", "name": "Can view own Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "add_own_filetreatmentsource", "name": "Can add own Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "add_treatmentfilesource", "name": "Can add Treatment file documentation", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "change_own_filetreatmentsource", "name": "Can change own Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "change_treatmentfilesource", "name": "Can change Treatment file documentation", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "delete_own_filetreatmentsource", "name": "Can delete own Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "delete_treatmentfilesource", "name": "Can delete Treatment file documentation", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "view_filetreatmentsource", "name": "Can view all Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "view_own_filetreatmentsource", "name": "Can view own Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "add_treatmentfiletype", "name": "Can add Treatment file type", "content_type": ["archaeological_finds", "treatmentfiletype"]}, {"codename": "change_treatmentfiletype", "name": "Can change Treatment file type", "content_type": ["archaeological_finds", "treatmentfiletype"]}, {"codename": "delete_treatmentfiletype", "name": "Can delete Treatment file type", "content_type": ["archaeological_finds", "treatmentfiletype"]}, {"codename": "add_own_treatmentsource", "name": "Can add own Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "add_treatmentsource", "name": "Can add Treatment documentation", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "change_own_treatmentsource", "name": "Can change own Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "change_treatmentsource", "name": "Can change Treatment documentation", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "delete_own_treatmentsource", "name": "Can delete own Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "delete_treatmentsource", "name": "Can delete Treatment documentation", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "view_own_treatmentsource", "name": "Can view own Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "view_treatmentsource", "name": "Can view all Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "add_treatmentstate", "name": "Can add Type of treatment state", "content_type": ["archaeological_finds", "treatmentstate"]}, {"codename": "change_treatmentstate", "name": "Can change Type of treatment state", "content_type": ["archaeological_finds", "treatmentstate"]}, {"codename": "delete_treatmentstate", "name": "Can delete Type of treatment state", "content_type": ["archaeological_finds", "treatmentstate"]}, {"codename": "add_treatmenttype", "name": "Can add Treatment type", "content_type": ["archaeological_finds", "treatmenttype"]}, {"codename": "change_treatmenttype", "name": "Can change Treatment type", "content_type": ["archaeological_finds", "treatmenttype"]}, {"codename": "delete_treatmenttype", "name": "Can delete Treatment type", "content_type": ["archaeological_finds", "treatmenttype"]}, {"codename": "add_acttype", "name": "Can add Act type", "content_type": ["archaeological_operations", "acttype"]}, {"codename": "change_acttype", "name": "Can change Act type", "content_type": ["archaeological_operations", "acttype"]}, {"codename": "delete_acttype", "name": "Can delete Act type", "content_type": ["archaeological_operations", "acttype"]}, {"codename": "add_administrativeact", "name": "Can add Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "add_own_administrativeact", "name": "Can add own Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "change_administrativeact", "name": "Can change Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "change_own_administrativeact", "name": "Can change own Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "delete_administrativeact", "name": "Can delete Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "delete_own_administrativeact", "name": "Can delete own Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "view_administrativeact", "name": "Can view all Administrative acts", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "view_own_administrativeact", "name": "Can view own Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "add_archaeologicalsite", "name": "Can add Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "add_own_archaeologicalsite", "name": "Can add own Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "change_archaeologicalsite", "name": "Can change Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "change_own_archaeologicalsite", "name": "Can change own Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "delete_archaeologicalsite", "name": "Can delete Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "delete_own_archaeologicalsite", "name": "Can delete own Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "view_archaeologicalsite", "name": "Can view all Archaeological sites", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "view_own_archaeologicalsite", "name": "Can view own Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "add_historicaladministrativeact", "name": "Can add historical administrative act", "content_type": ["archaeological_operations", "historicaladministrativeact"]}, {"codename": "change_historicaladministrativeact", "name": "Can change historical administrative act", "content_type": ["archaeological_operations", "historicaladministrativeact"]}, {"codename": "delete_historicaladministrativeact", "name": "Can delete historical administrative act", "content_type": ["archaeological_operations", "historicaladministrativeact"]}, {"codename": "add_historicaloperation", "name": "Can add historical operation", "content_type": ["archaeological_operations", "historicaloperation"]}, {"codename": "change_historicaloperation", "name": "Can change historical operation", "content_type": ["archaeological_operations", "historicaloperation"]}, {"codename": "delete_historicaloperation", "name": "Can delete historical operation", "content_type": ["archaeological_operations", "historicaloperation"]}, {"codename": "add_operation", "name": "Can add Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "add_own_operation", "name": "Can add own Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "change_operation", "name": "Can change Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "change_own_operation", "name": "Can change own Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "close_operation", "name": "Can close Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "delete_operation", "name": "Can delete Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "delete_own_operation", "name": "Can delete own Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "view_operation", "name": "Can view all Operations", "content_type": ["archaeological_operations", "operation"]}, {"codename": "view_own_operation", "name": "Can view own Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "add_operationbydepartment", "name": "Can add operation by department", "content_type": ["archaeological_operations", "operationbydepartment"]}, {"codename": "change_operationbydepartment", "name": "Can change operation by department", "content_type": ["archaeological_operations", "operationbydepartment"]}, {"codename": "delete_operationbydepartment", "name": "Can delete operation by department", "content_type": ["archaeological_operations", "operationbydepartment"]}, {"codename": "add_operationsource", "name": "Can add Operation documentation", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "add_own_operationsource", "name": "Can add own Operation source", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "change_operationsource", "name": "Can change Operation documentation", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "change_own_operationsource", "name": "Can change own Operation source", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "delete_operationsource", "name": "Can delete Operation documentation", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "delete_own_operationsource", "name": "Can delete own Operation source", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "view_operationsource", "name": "Can view all Operation sources", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "view_own_operationsource", "name": "Can view own Operation source", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "add_operationtypeold", "name": "Can add Operation type old", "content_type": ["archaeological_operations", "operationtypeold"]}, {"codename": "change_operationtypeold", "name": "Can change Operation type old", "content_type": ["archaeological_operations", "operationtypeold"]}, {"codename": "delete_operationtypeold", "name": "Can delete Operation type old", "content_type": ["archaeological_operations", "operationtypeold"]}, {"codename": "add_parcel", "name": "Can add Parcel", "content_type": ["archaeological_operations", "parcel"]}, {"codename": "change_parcel", "name": "Can change Parcel", "content_type": ["archaeological_operations", "parcel"]}, {"codename": "delete_parcel", "name": "Can delete Parcel", "content_type": ["archaeological_operations", "parcel"]}, {"codename": "add_parcelowner", "name": "Can add Parcel owner", "content_type": ["archaeological_operations", "parcelowner"]}, {"codename": "change_parcelowner", "name": "Can change Parcel owner", "content_type": ["archaeological_operations", "parcelowner"]}, {"codename": "delete_parcelowner", "name": "Can delete Parcel owner", "content_type": ["archaeological_operations", "parcelowner"]}, {"codename": "add_period", "name": "Can add Type Period", "content_type": ["archaeological_operations", "period"]}, {"codename": "change_period", "name": "Can change Type Period", "content_type": ["archaeological_operations", "period"]}, {"codename": "delete_period", "name": "Can delete Type Period", "content_type": ["archaeological_operations", "period"]}, {"codename": "add_recordrelations", "name": "Can add Operation record relation", "content_type": ["archaeological_operations", "recordrelations"]}, {"codename": "change_recordrelations", "name": "Can change Operation record relation", "content_type": ["archaeological_operations", "recordrelations"]}, {"codename": "delete_recordrelations", "name": "Can delete Operation record relation", "content_type": ["archaeological_operations", "recordrelations"]}, {"codename": "add_relationtype", "name": "Can add Operation relation type", "content_type": ["archaeological_operations", "relationtype"]}, {"codename": "change_relationtype", "name": "Can change Operation relation type", "content_type": ["archaeological_operations", "relationtype"]}, {"codename": "delete_relationtype", "name": "Can delete Operation relation type", "content_type": ["archaeological_operations", "relationtype"]}, {"codename": "add_remaintype", "name": "Can add Remain type", "content_type": ["archaeological_operations", "remaintype"]}, {"codename": "change_remaintype", "name": "Can change Remain type", "content_type": ["archaeological_operations", "remaintype"]}, {"codename": "delete_remaintype", "name": "Can delete Remain type", "content_type": ["archaeological_operations", "remaintype"]}, {"codename": "add_reportstate", "name": "Can add Report state", "content_type": ["archaeological_operations", "reportstate"]}, {"codename": "change_reportstate", "name": "Can change Report state", "content_type": ["archaeological_operations", "reportstate"]}, {"codename": "delete_reportstate", "name": "Can delete Report state", "content_type": ["archaeological_operations", "reportstate"]}, {"codename": "add_collection", "name": "Can add Collection", "content_type": ["archaeological_warehouse", "collection"]}, {"codename": "change_collection", "name": "Can change Collection", "content_type": ["archaeological_warehouse", "collection"]}, {"codename": "delete_collection", "name": "Can delete Collection", "content_type": ["archaeological_warehouse", "collection"]}, {"codename": "add_container", "name": "Can add Container", "content_type": ["archaeological_warehouse", "container"]}, {"codename": "change_container", "name": "Can change Container", "content_type": ["archaeological_warehouse", "container"]}, {"codename": "delete_container", "name": "Can delete Container", "content_type": ["archaeological_warehouse", "container"]}, {"codename": "add_containerlocalisation", "name": "Can add Container localisation", "content_type": ["archaeological_warehouse", "containerlocalisation"]}, {"codename": "change_containerlocalisation", "name": "Can change Container localisation", "content_type": ["archaeological_warehouse", "containerlocalisation"]}, {"codename": "delete_containerlocalisation", "name": "Can delete Container localisation", "content_type": ["archaeological_warehouse", "containerlocalisation"]}, {"codename": "add_containertype", "name": "Can add Container type", "content_type": ["archaeological_warehouse", "containertype"]}, {"codename": "change_containertype", "name": "Can change Container type", "content_type": ["archaeological_warehouse", "containertype"]}, {"codename": "delete_containertype", "name": "Can delete Container type", "content_type": ["archaeological_warehouse", "containertype"]}, {"codename": "add_own_warehouse", "name": "Can add own Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "add_warehouse", "name": "Can add Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "change_own_warehouse", "name": "Can change own Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "change_warehouse", "name": "Can change Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "delete_own_warehouse", "name": "Can delete own Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "delete_warehouse", "name": "Can delete Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "view_own_warehouse", "name": "Can view own Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "view_warehouse", "name": "Can view all Warehouses", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "add_warehousedivision", "name": "Can add Warehouse division", "content_type": ["archaeological_warehouse", "warehousedivision"]}, {"codename": "change_warehousedivision", "name": "Can change Warehouse division", "content_type": ["archaeological_warehouse", "warehousedivision"]}, {"codename": "delete_warehousedivision", "name": "Can delete Warehouse division", "content_type": ["archaeological_warehouse", "warehousedivision"]}, {"codename": "add_warehousedivisionlink", "name": "Can add warehouse division link", "content_type": ["archaeological_warehouse", "warehousedivisionlink"]}, {"codename": "change_warehousedivisionlink", "name": "Can change warehouse division link", "content_type": ["archaeological_warehouse", "warehousedivisionlink"]}, {"codename": "delete_warehousedivisionlink", "name": "Can delete warehouse division link", "content_type": ["archaeological_warehouse", "warehousedivisionlink"]}, {"codename": "add_warehousetype", "name": "Can add Warehouse type", "content_type": ["archaeological_warehouse", "warehousetype"]}, {"codename": "change_warehousetype", "name": "Can change Warehouse type", "content_type": ["archaeological_warehouse", "warehousetype"]}, {"codename": "delete_warehousetype", "name": "Can delete Warehouse type", "content_type": ["archaeological_warehouse", "warehousetype"]}, {"codename": "add_group", "name": "Can add group", "content_type": ["auth", "group"]}, {"codename": "change_group", "name": "Can change group", "content_type": ["auth", "group"]}, {"codename": "delete_group", "name": "Can delete group", "content_type": ["auth", "group"]}, {"codename": "add_permission", "name": "Can add permission", "content_type": ["auth", "permission"]}, {"codename": "change_permission", "name": "Can change permission", "content_type": ["auth", "permission"]}, {"codename": "delete_permission", "name": "Can delete permission", "content_type": ["auth", "permission"]}, {"codename": "add_user", "name": "Can add user", "content_type": ["auth", "user"]}, {"codename": "change_user", "name": "Can change user", "content_type": ["auth", "user"]}, {"codename": "delete_user", "name": "Can delete user", "content_type": ["auth", "user"]}, {"codename": "add_contenttype", "name": "Can add content type", "content_type": ["contenttypes", "contenttype"]}, {"codename": "change_contenttype", "name": "Can change content type", "content_type": ["contenttypes", "contenttype"]}, {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": ["contenttypes", "contenttype"]}, {"codename": "add_arrondissement", "name": "Can add arrondissement", "content_type": ["ishtar_common", "arrondissement"]}, {"codename": "change_arrondissement", "name": "Can change arrondissement", "content_type": ["ishtar_common", "arrondissement"]}, {"codename": "delete_arrondissement", "name": "Can delete arrondissement", "content_type": ["ishtar_common", "arrondissement"]}, {"codename": "add_author", "name": "Can add Author", "content_type": ["ishtar_common", "author"]}, {"codename": "add_own_author", "name": "Can add own Author", "content_type": ["ishtar_common", "author"]}, {"codename": "change_author", "name": "Can change Author", "content_type": ["ishtar_common", "author"]}, {"codename": "change_own_author", "name": "Can change own Author", "content_type": ["ishtar_common", "author"]}, {"codename": "delete_author", "name": "Can delete Author", "content_type": ["ishtar_common", "author"]}, {"codename": "delete_own_author", "name": "Can delete own Author", "content_type": ["ishtar_common", "author"]}, {"codename": "view_author", "name": "Can view all Authors", "content_type": ["ishtar_common", "author"]}, {"codename": "view_own_author", "name": "Can view own Author", "content_type": ["ishtar_common", "author"]}, {"codename": "add_authortype", "name": "Can add Author type", "content_type": ["ishtar_common", "authortype"]}, {"codename": "change_authortype", "name": "Can change Author type", "content_type": ["ishtar_common", "authortype"]}, {"codename": "delete_authortype", "name": "Can delete Author type", "content_type": ["ishtar_common", "authortype"]}, {"codename": "add_canton", "name": "Can add canton", "content_type": ["ishtar_common", "canton"]}, {"codename": "change_canton", "name": "Can change canton", "content_type": ["ishtar_common", "canton"]}, {"codename": "delete_canton", "name": "Can delete canton", "content_type": ["ishtar_common", "canton"]}, {"codename": "add_department", "name": "Can add Department", "content_type": ["ishtar_common", "department"]}, {"codename": "change_department", "name": "Can change Department", "content_type": ["ishtar_common", "department"]}, {"codename": "delete_department", "name": "Can delete Department", "content_type": ["ishtar_common", "department"]}, {"codename": "add_documenttemplate", "name": "Can add Document template", "content_type": ["ishtar_common", "documenttemplate"]}, {"codename": "change_documenttemplate", "name": "Can change Document template", "content_type": ["ishtar_common", "documenttemplate"]}, {"codename": "delete_documenttemplate", "name": "Can delete Document template", "content_type": ["ishtar_common", "documenttemplate"]}, {"codename": "add_format", "name": "Can add Format", "content_type": ["ishtar_common", "format"]}, {"codename": "change_format", "name": "Can change Format", "content_type": ["ishtar_common", "format"]}, {"codename": "delete_format", "name": "Can delete Format", "content_type": ["ishtar_common", "format"]}, {"codename": "add_formatertype", "name": "Can add Importer - Formater type", "content_type": ["ishtar_common", "formatertype"]}, {"codename": "change_formatertype", "name": "Can change Importer - Formater type", "content_type": ["ishtar_common", "formatertype"]}, {"codename": "delete_formatertype", "name": "Can delete Importer - Formater type", "content_type": ["ishtar_common", "formatertype"]}, {"codename": "add_globalvar", "name": "Can add Global variable", "content_type": ["ishtar_common", "globalvar"]}, {"codename": "change_globalvar", "name": "Can change Global variable", "content_type": ["ishtar_common", "globalvar"]}, {"codename": "delete_globalvar", "name": "Can delete Global variable", "content_type": ["ishtar_common", "globalvar"]}, {"codename": "add_historicalorganization", "name": "Can add historical organization", "content_type": ["ishtar_common", "historicalorganization"]}, {"codename": "change_historicalorganization", "name": "Can change historical organization", "content_type": ["ishtar_common", "historicalorganization"]}, {"codename": "delete_historicalorganization", "name": "Can delete historical organization", "content_type": ["ishtar_common", "historicalorganization"]}, {"codename": "add_historicalperson", "name": "Can add historical person", "content_type": ["ishtar_common", "historicalperson"]}, {"codename": "change_historicalperson", "name": "Can change historical person", "content_type": ["ishtar_common", "historicalperson"]}, {"codename": "delete_historicalperson", "name": "Can delete historical person", "content_type": ["ishtar_common", "historicalperson"]}, {"codename": "add_import", "name": "Can add Import", "content_type": ["ishtar_common", "import"]}, {"codename": "change_import", "name": "Can change Import", "content_type": ["ishtar_common", "import"]}, {"codename": "delete_import", "name": "Can delete Import", "content_type": ["ishtar_common", "import"]}, {"codename": "add_importercolumn", "name": "Can add Importer - Column", "content_type": ["ishtar_common", "importercolumn"]}, {"codename": "change_importercolumn", "name": "Can change Importer - Column", "content_type": ["ishtar_common", "importercolumn"]}, {"codename": "delete_importercolumn", "name": "Can delete Importer - Column", "content_type": ["ishtar_common", "importercolumn"]}, {"codename": "add_importerdefault", "name": "Can add Importer - Default", "content_type": ["ishtar_common", "importerdefault"]}, {"codename": "change_importerdefault", "name": "Can change Importer - Default", "content_type": ["ishtar_common", "importerdefault"]}, {"codename": "delete_importerdefault", "name": "Can delete Importer - Default", "content_type": ["ishtar_common", "importerdefault"]}, {"codename": "add_importerdefaultvalues", "name": "Can add Importer - Default value", "content_type": ["ishtar_common", "importerdefaultvalues"]}, {"codename": "change_importerdefaultvalues", "name": "Can change Importer - Default value", "content_type": ["ishtar_common", "importerdefaultvalues"]}, {"codename": "delete_importerdefaultvalues", "name": "Can delete Importer - Default value", "content_type": ["ishtar_common", "importerdefaultvalues"]}, {"codename": "add_importerduplicatefield", "name": "Can add Importer - Duplicate field", "content_type": ["ishtar_common", "importerduplicatefield"]}, {"codename": "change_importerduplicatefield", "name": "Can change Importer - Duplicate field", "content_type": ["ishtar_common", "importerduplicatefield"]}, {"codename": "delete_importerduplicatefield", "name": "Can delete Importer - Duplicate field", "content_type": ["ishtar_common", "importerduplicatefield"]}, {"codename": "add_importermodel", "name": "Can add Importer - Model", "content_type": ["ishtar_common", "importermodel"]}, {"codename": "change_importermodel", "name": "Can change Importer - Model", "content_type": ["ishtar_common", "importermodel"]}, {"codename": "delete_importermodel", "name": "Can delete Importer - Model", "content_type": ["ishtar_common", "importermodel"]}, {"codename": "add_importertype", "name": "Can add Importer - Type", "content_type": ["ishtar_common", "importertype"]}, {"codename": "change_importertype", "name": "Can change Importer - Type", "content_type": ["ishtar_common", "importertype"]}, {"codename": "delete_importertype", "name": "Can delete Importer - Type", "content_type": ["ishtar_common", "importertype"]}, {"codename": "add_importtarget", "name": "Can add Importer - Target", "content_type": ["ishtar_common", "importtarget"]}, {"codename": "change_importtarget", "name": "Can change Importer - Target", "content_type": ["ishtar_common", "importtarget"]}, {"codename": "delete_importtarget", "name": "Can delete Importer - Target", "content_type": ["ishtar_common", "importtarget"]}, {"codename": "add_ishtarsiteprofile", "name": "Can add Ishtar site profile", "content_type": ["ishtar_common", "ishtarsiteprofile"]}, {"codename": "change_ishtarsiteprofile", "name": "Can change Ishtar site profile", "content_type": ["ishtar_common", "ishtarsiteprofile"]}, {"codename": "delete_ishtarsiteprofile", "name": "Can delete Ishtar site profile", "content_type": ["ishtar_common", "ishtarsiteprofile"]}, {"codename": "add_ishtaruser", "name": "Can add Ishtar user", "content_type": ["ishtar_common", "ishtaruser"]}, {"codename": "change_ishtaruser", "name": "Can change Ishtar user", "content_type": ["ishtar_common", "ishtaruser"]}, {"codename": "delete_ishtaruser", "name": "Can delete Ishtar user", "content_type": ["ishtar_common", "ishtaruser"]}, {"codename": "add_itemkey", "name": "Can add item key", "content_type": ["ishtar_common", "itemkey"]}, {"codename": "change_itemkey", "name": "Can change item key", "content_type": ["ishtar_common", "itemkey"]}, {"codename": "delete_itemkey", "name": "Can delete item key", "content_type": ["ishtar_common", "itemkey"]}, {"codename": "add_operationtype", "name": "Can add Operation type", "content_type": ["ishtar_common", "operationtype"]}, {"codename": "change_operationtype", "name": "Can change Operation type", "content_type": ["ishtar_common", "operationtype"]}, {"codename": "delete_operationtype", "name": "Can delete Operation type", "content_type": ["ishtar_common", "operationtype"]}, {"codename": "add_organization", "name": "Can add Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "add_own_organization", "name": "Can add own Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "change_organization", "name": "Can change Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "change_own_organization", "name": "Can change own Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "delete_organization", "name": "Can delete Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "delete_own_organization", "name": "Can delete own Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "view_organization", "name": "Can view all Organizations", "content_type": ["ishtar_common", "organization"]}, {"codename": "view_own_organization", "name": "Can view own Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "add_organizationtype", "name": "Can add Organization type", "content_type": ["ishtar_common", "organizationtype"]}, {"codename": "change_organizationtype", "name": "Can change Organization type", "content_type": ["ishtar_common", "organizationtype"]}, {"codename": "delete_organizationtype", "name": "Can delete Organization type", "content_type": ["ishtar_common", "organizationtype"]}, {"codename": "add_own_person", "name": "Can add own Person", "content_type": ["ishtar_common", "person"]}, {"codename": "add_person", "name": "Can add Person", "content_type": ["ishtar_common", "person"]}, {"codename": "change_own_person", "name": "Can change own Person", "content_type": ["ishtar_common", "person"]}, {"codename": "change_person", "name": "Can change Person", "content_type": ["ishtar_common", "person"]}, {"codename": "delete_own_person", "name": "Can delete own Person", "content_type": ["ishtar_common", "person"]}, {"codename": "delete_person", "name": "Can delete Person", "content_type": ["ishtar_common", "person"]}, {"codename": "view_own_person", "name": "Can view own Person", "content_type": ["ishtar_common", "person"]}, {"codename": "view_person", "name": "Can view all Persons", "content_type": ["ishtar_common", "person"]}, {"codename": "add_persontype", "name": "Can add Person type", "content_type": ["ishtar_common", "persontype"]}, {"codename": "change_persontype", "name": "Can change Person type", "content_type": ["ishtar_common", "persontype"]}, {"codename": "delete_persontype", "name": "Can delete Person type", "content_type": ["ishtar_common", "persontype"]}, {"codename": "add_regexp", "name": "Can add Importer - Regular expression", "content_type": ["ishtar_common", "regexp"]}, {"codename": "change_regexp", "name": "Can change Importer - Regular expression", "content_type": ["ishtar_common", "regexp"]}, {"codename": "delete_regexp", "name": "Can delete Importer - Regular expression", "content_type": ["ishtar_common", "regexp"]}, {"codename": "add_sourcetype", "name": "Can add Source type", "content_type": ["ishtar_common", "sourcetype"]}, {"codename": "change_sourcetype", "name": "Can change Source type", "content_type": ["ishtar_common", "sourcetype"]}, {"codename": "delete_sourcetype", "name": "Can delete Source type", "content_type": ["ishtar_common", "sourcetype"]}, {"codename": "add_spatialreferencesystem", "name": "Can add Spatial reference system", "content_type": ["ishtar_common", "spatialreferencesystem"]}, {"codename": "change_spatialreferencesystem", "name": "Can change Spatial reference system", "content_type": ["ishtar_common", "spatialreferencesystem"]}, {"codename": "delete_spatialreferencesystem", "name": "Can delete Spatial reference system", "content_type": ["ishtar_common", "spatialreferencesystem"]}, {"codename": "add_state", "name": "Can add State", "content_type": ["ishtar_common", "state"]}, {"codename": "change_state", "name": "Can change State", "content_type": ["ishtar_common", "state"]}, {"codename": "delete_state", "name": "Can delete State", "content_type": ["ishtar_common", "state"]}, {"codename": "add_supporttype", "name": "Can add Support type", "content_type": ["ishtar_common", "supporttype"]}, {"codename": "change_supporttype", "name": "Can change Support type", "content_type": ["ishtar_common", "supporttype"]}, {"codename": "delete_supporttype", "name": "Can delete Support type", "content_type": ["ishtar_common", "supporttype"]}, {"codename": "add_targetkey", "name": "Can add Importer - Target key", "content_type": ["ishtar_common", "targetkey"]}, {"codename": "change_targetkey", "name": "Can change Importer - Target key", "content_type": ["ishtar_common", "targetkey"]}, {"codename": "delete_targetkey", "name": "Can delete Importer - Target key", "content_type": ["ishtar_common", "targetkey"]}, {"codename": "add_titletype", "name": "Can add Title type", "content_type": ["ishtar_common", "titletype"]}, {"codename": "change_titletype", "name": "Can change Title type", "content_type": ["ishtar_common", "titletype"]}, {"codename": "delete_titletype", "name": "Can delete Title type", "content_type": ["ishtar_common", "titletype"]}, {"codename": "add_town", "name": "Can add Town", "content_type": ["ishtar_common", "town"]}, {"codename": "change_town", "name": "Can change Town", "content_type": ["ishtar_common", "town"]}, {"codename": "delete_town", "name": "Can delete Town", "content_type": ["ishtar_common", "town"]}, {"codename": "add_registrationprofile", "name": "Can add registration profile", "content_type": ["registration", "registrationprofile"]}, {"codename": "change_registrationprofile", "name": "Can change registration profile", "content_type": ["registration", "registrationprofile"]}, {"codename": "delete_registrationprofile", "name": "Can delete registration profile", "content_type": ["registration", "registrationprofile"]}, {"codename": "add_session", "name": "Can add session", "content_type": ["sessions", "session"]}, {"codename": "change_session", "name": "Can change session", "content_type": ["sessions", "session"]}, {"codename": "delete_session", "name": "Can delete session", "content_type": ["sessions", "session"]}, {"codename": "add_site", "name": "Can add site", "content_type": ["sites", "site"]}, {"codename": "change_site", "name": "Can change site", "content_type": ["sites", "site"]}, {"codename": "delete_site", "name": "Can delete site", "content_type": ["sites", "site"]}, {"codename": "add_migrationhistory", "name": "Can add migration history", "content_type": ["south", "migrationhistory"]}, {"codename": "change_migrationhistory", "name": "Can change migration history", "content_type": ["south", "migrationhistory"]}, {"codename": "delete_migrationhistory", "name": "Can delete migration history", "content_type": ["south", "migrationhistory"]}]}
\ No newline at end of file diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 7eb36f6cc..f252b83bc 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -159,7 +159,10 @@ class FormSet(BaseFormSet): class TableSelect(forms.Form): def __init__(self, *args, **kwargs): super(TableSelect, self).__init__(*args, **kwargs) - key = self.fields.keyOrder[0] + # no field is required for search + for k in self.fields: + self.fields[k].required = False + key = self.fields.keys()[0] self.fields[key].widget.attrs['autofocus'] = 'autofocus' def get_input_ids(self): diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 44af3a588..4d14e4544 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -585,7 +585,7 @@ class AccountForm(forms.Form): if 'initial' in kwargs and 'pk' in kwargs['initial']: try: person = models.Person.objects.get(pk=kwargs['initial']['pk']) - account = models.IshtarUser.objects.get(person=person) + account = models.IshtarUser.objects.get(person=person).user_ptr if not kwargs['initial'].get('username'): kwargs['initial']['username'] = account.username if not kwargs['initial'].get('email'): @@ -613,7 +613,7 @@ class AccountForm(forms.Form): u"password.")) # check username unicity q = models.IshtarUser.objects.filter( - username=cleaned_data.get('username')) + user_ptr__username=cleaned_data.get('username')) if cleaned_data.get('pk'): q = q.exclude(person__pk=cleaned_data.get('pk')) if q.count(): diff --git a/ishtar_common/lookups.py b/ishtar_common/lookups.py new file mode 100644 index 000000000..9570f8bc6 --- /dev/null +++ b/ishtar_common/lookups.py @@ -0,0 +1,95 @@ +from ajax_select import register, LookupChannel + +from django.conf import settings +from django.db.models import Q +from ishtar_common.models import Person, Organization, IshtarUser, Town, Author + + +@register('town') +class TownLookup(LookupChannel): + model = Town + + def get_query(self, q, request): + if settings.COUNTRY == 'fr': + query = Q() + for term in q.strip().split(' '): + query &= ( + Q(name__icontains=term) | Q(numero_insee__icontains=term) + ) + else: + query = Q(name__icontains=q) + return self.model.objects.filter(query).order_by('name')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % unicode(item) + + +@register('organization') +class OrganizationLookup(LookupChannel): + model = Organization + + def get_query(self, q, request): + return self.model.objects.filter( + name__icontains=q).order_by('name')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % unicode(item) + + +@register('person') +class PersonLookup(LookupChannel): + model = Person + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + query &= ( + Q(name__icontains=term) | Q(surname__icontains=term) | + Q(email__icontains=term) | Q(attached_to__name__icontains=term)| + Q(raw_name__icontains=term) + ) + return self.model.objects.filter(query).order_by('name')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % unicode(item) + + +@register('author') +class AuthorLookup(LookupChannel): + model = Author + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + query &= ( + Q(person__name__icontains=term) | + Q(person__surname__icontains=term) | + Q(person__raw_name__icontains=term) | + Q(person__attached_to__name__icontains=term) | + Q(author_type__label__icontains=term) + ) + return self.model.objects.filter(query).order_by('person__name')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % unicode(item) + + +@register('ishtaruser') +class UserLookup(LookupChannel): + model = IshtarUser + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + query &= ( + Q(user_ptr__username__icontains=term) | + Q(person__name__icontains=term) | + Q(person__surname__icontains=term) | + Q(person__email__icontains=term) | + Q(person__attached_to__name__icontains=term)| + Q(person__raw_name__icontains=term) + ) + return self.model.objects.filter(query).order_by('person__name')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % unicode(item.person) diff --git a/ishtar_common/management/commands/ishtar_migrate_odts.py b/ishtar_common/management/commands/ishtar_migrate_odts.py new file mode 100644 index 000000000..49ed9f2d8 --- /dev/null +++ b/ishtar_common/management/commands/ishtar_migrate_odts.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# See the file COPYING for details. + +from django.core.management.base import BaseCommand +from optparse import make_option +import sys + +from ishtar_common.models import DocumentTemplate +from ishtar_common.utils import BColors + +try: + input = raw_input +except NameError: + pass + + +class Command(BaseCommand): + help = "Update ODT templates from v1 to v2" + option_list = BaseCommand.option_list + ( + make_option('--quiet', + action='store_true', + dest='quiet', + default=False, + help='Proceed silently with no interactive input.'), + ) + + def interactive_start(self): + sys.stdout.write( + BColors.HEADER + BColors.BOLD + + "Update ODT templates from v1 to v2\n") + sys.stdout.write( + BColors.ENDC + BColors.WARNING + + "This script need to be run only once. Running it on already " + "migrated ODT files may be a source of error.\n") + sys.stdout.write(BColors.ENDC) + yes = None + while yes != "yes": + sys.stdout.write( + "Are you sure you want to proceed? (yes/[n])\n") + yes = input() + if not yes or yes == "n": + sys.stdout.write(BColors.FAIL + "Aborting\n") + sys.stdout.write(BColors.ENDC) + sys.exit() + + def handle(self, *args, **options): + quiet = options['quiet'] + if not quiet: + self.interactive_start() + q = DocumentTemplate.objects + nb = q.count() + len_of_nb = str(len(str(nb))) + if not quiet: + sys.stdout.write(BColors.OKGREEN) + + errors = [] + for idx, document in enumerate(q.all()): + if not quiet: + sys.stdout.write( + ("Processing {:" + len_of_nb + "d}/{}\r").format( + idx + 1, nb)) + sys.stdout.flush() + try: + document.convert_from_v1() + except IOError as e: + errors.append("Document ({}): ".format(document.pk) + + str(e)) + if errors: + sys.stdout.write(BColors.FAIL + "Error while processing:\n") + for error in errors: + sys.stdout.write("* {}\n".format(error)) + + sys.stdout.write(BColors.ENDC) + print("\n\n") + diff --git a/ishtar_common/menus.py b/ishtar_common/menus.py index 36b53b162..7d24b0fd2 100644 --- a/ishtar_common/menus.py +++ b/ishtar_common/menus.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -23,7 +23,6 @@ Menus from django.conf import settings - _extra_menus = [] # collect menu from INSTALLED_APPS for app in settings.INSTALLED_APPS: diff --git a/ishtar_common/migrations/0001_initial.py b/ishtar_common/migrations/0001_initial.py index fc22881bc..7b46a3ea5 100644 --- a/ishtar_common/migrations/0001_initial.py +++ b/ishtar_common/migrations/0001_initial.py @@ -1,408 +1,836 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Wizard' - db.create_table('ishtar_common_wizard', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('url_name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=128)), - )) - db.send_create_signal('ishtar_common', ['Wizard']) - - # Adding model 'WizardStep' - db.create_table('ishtar_common_wizardstep', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - ('wizard', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Wizard'])), - ('url_name', self.gf('django.db.models.fields.CharField')(max_length=128)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=128)), - )) - db.send_create_signal('ishtar_common', ['WizardStep']) - - # Adding model 'Department' - db.create_table('ishtar_common_department', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=30)), - ('number', self.gf('django.db.models.fields.CharField')(unique=True, max_length=3)), - )) - db.send_create_signal('ishtar_common', ['Department']) - - # Adding model 'OrganizationType' - db.create_table('ishtar_common_organizationtype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('ishtar_common', ['OrganizationType']) - - # Adding model 'HistoricalOrganization' - db.create_table('ishtar_common_historicalorganization', ( - ('id', self.gf('django.db.models.fields.IntegerField')(db_index=True, blank=True)), - ('history_modifier_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('address', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('address_complement', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('postal_code', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), - ('town', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), - ('phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), - ('mobile_phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('organization_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('history_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('history_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('history_user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)), - ('history_type', self.gf('django.db.models.fields.CharField')(max_length=1)), - )) - db.send_create_signal('ishtar_common', ['HistoricalOrganization']) - - # Adding model 'Organization' - db.create_table('ishtar_common_organization', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('history_modifier', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), - ('address', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('address_complement', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('postal_code', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), - ('town', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), - ('phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), - ('mobile_phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('organization_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.OrganizationType'])), - )) - db.send_create_signal('ishtar_common', ['Organization']) - - # Adding model 'PersonType' - db.create_table('ishtar_common_persontype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('ishtar_common', ['PersonType']) - - # Adding M2M table for field rights on 'PersonType' - db.create_table('ishtar_common_persontype_rights', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('persontype', models.ForeignKey(orm['ishtar_common.persontype'], null=False)), - ('wizardstep', models.ForeignKey(orm['ishtar_common.wizardstep'], null=False)) - )) - db.create_unique('ishtar_common_persontype_rights', ['persontype_id', 'wizardstep_id']) - - # Adding model 'Person' - db.create_table('ishtar_common_person', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('history_modifier', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), - ('address', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('address_complement', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('postal_code', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), - ('town', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), - ('phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), - ('mobile_phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=2)), - ('surname', self.gf('django.db.models.fields.CharField')(max_length=20)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=30)), - ('email', self.gf('django.db.models.fields.CharField')(max_length=40, null=True, blank=True)), - ('person_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.PersonType'])), - ('attached_to', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Organization'], null=True, blank=True)), - )) - db.send_create_signal('ishtar_common', ['Person']) - - # Adding model 'IshtarUser' - db.create_table('ishtar_common_ishtaruser', ( - ('user_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, primary_key=True)), - ('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'], unique=True)), - )) - db.send_create_signal('ishtar_common', ['IshtarUser']) - - # Adding model 'AuthorType' - db.create_table('ishtar_common_authortype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('ishtar_common', ['AuthorType']) - - # Adding model 'Author' - db.create_table('ishtar_common_author', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'])), - ('author_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.AuthorType'])), - )) - db.send_create_signal('ishtar_common', ['Author']) - - # Adding model 'SourceType' - db.create_table('ishtar_common_sourcetype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('ishtar_common', ['SourceType']) - - # Adding model 'Arrondissement' - db.create_table('ishtar_common_arrondissement', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=30)), - ('department', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Department'])), - )) - db.send_create_signal('ishtar_common', ['Arrondissement']) - - # Adding model 'Canton' - db.create_table('ishtar_common_canton', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=30)), - ('arrondissement', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Arrondissement'])), - )) - db.send_create_signal('ishtar_common', ['Canton']) - - # Adding model 'Town' - db.create_table('ishtar_common_town', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('center', self.gf('django.contrib.gis.db.models.fields.PointField')(srid=27572, null=True, blank=True)), - ('numero_insee', self.gf('django.db.models.fields.CharField')(unique=True, max_length=6)), - ('departement', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Department'], null=True, blank=True)), - ('canton', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Canton'], null=True, blank=True)), - )) - db.send_create_signal('ishtar_common', ['Town']) +from __future__ import unicode_literals +import datetime - def backwards(self, orm): - # Deleting model 'Wizard' - db.delete_table('ishtar_common_wizard') - - # Deleting model 'WizardStep' - db.delete_table('ishtar_common_wizardstep') - - # Deleting model 'Department' - db.delete_table('ishtar_common_department') - - # Deleting model 'OrganizationType' - db.delete_table('ishtar_common_organizationtype') - - # Deleting model 'HistoricalOrganization' - db.delete_table('ishtar_common_historicalorganization') - - # Deleting model 'Organization' - db.delete_table('ishtar_common_organization') - - # Deleting model 'PersonType' - db.delete_table('ishtar_common_persontype') - - # Removing M2M table for field rights on 'PersonType' - db.delete_table('ishtar_common_persontype_rights') - - # Deleting model 'Person' - db.delete_table('ishtar_common_person') - - # Deleting model 'IshtarUser' - db.delete_table('ishtar_common_ishtaruser') - - # Deleting model 'AuthorType' - db.delete_table('ishtar_common_authortype') - - # Deleting model 'Author' - db.delete_table('ishtar_common_author') - - # Deleting model 'SourceType' - db.delete_table('ishtar_common_sourcetype') - - # Deleting model 'Arrondissement' - db.delete_table('ishtar_common_arrondissement') - - # Deleting model 'Canton' - db.delete_table('ishtar_common_canton') - - # Deleting model 'Town' - db.delete_table('ishtar_common_town') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'ishtar_common.arrondissement': { - 'Meta': {'object_name': 'Arrondissement'}, - 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.author': { - 'Meta': {'object_name': 'Author'}, - 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}) - }, - 'ishtar_common.authortype': { - 'Meta': {'object_name': 'AuthorType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ishtar_common.canton': { - 'Meta': {'object_name': 'Canton'}, - 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.department': { - 'Meta': {'ordering': "['number']", 'object_name': 'Department'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) - }, - 'ishtar_common.historicalorganization': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOrganization'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'organization_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.ishtaruser': { - 'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, - 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']", 'unique': 'True'}), - 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'ishtar_common.organization': { - 'Meta': {'object_name': 'Organization'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.organizationtype': { - 'Meta': {'object_name': 'OrganizationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ishtar_common.person': { - 'Meta': {'object_name': 'Person'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'person_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.PersonType']"}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'surname': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.persontype': { - 'Meta': {'object_name': 'PersonType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'rights': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.WizardStep']", 'symmetrical': 'False'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ishtar_common.sourcetype': { - 'Meta': {'object_name': 'SourceType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ishtar_common.town': { - 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, - 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), - 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), - 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.wizard': { - 'Meta': {'ordering': "['url_name']", 'object_name': 'Wizard'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'url_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - 'ishtar_common.wizardstep': { - 'Meta': {'ordering': "['wizard', 'order']", 'object_name': 'WizardStep'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'url_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'wizard': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Wizard']"}) - } - } - - complete_apps = ['ishtar_common']
\ No newline at end of file +from django.db import models, migrations +import re +import django.contrib.gis.db.models.fields +import ishtar_common.models +import django.contrib.auth.models +import django.db.models.deletion +from django.conf import settings +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0002_remove_content_type_name'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + # ('auth', 'ishtar_profile'), + ] + + operations = [ + migrations.CreateModel( + name='Arrondissement', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=30, verbose_name='Nom')), + ], + ), + migrations.CreateModel( + name='Author', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + 'ordering': ('author_type__order', 'person__name'), + 'verbose_name': 'Author', + 'verbose_name_plural': 'Authors', + 'permissions': (('view_author', 'Can view all Authors'), ('view_own_author', 'Can view own Author'), ('add_own_author', 'Can add own Author'), ('change_own_author', 'Can change own Author'), ('delete_own_author', 'Can delete own Author')), + }, + ), + migrations.CreateModel( + name='AuthorType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=1, verbose_name='Order')), + ], + options={ + 'ordering': ['order', 'label'], + 'verbose_name': 'Author type', + 'verbose_name_plural': 'Author types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Canton', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=30, verbose_name='Nom')), + ('arrondissement', models.ForeignKey(verbose_name='Arrondissement', to='ishtar_common.Arrondissement')), + ], + ), + migrations.CreateModel( + name='Department', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=30, verbose_name='Label')), + ('number', models.CharField(unique=True, max_length=3, verbose_name='Number')), + ], + options={ + 'ordering': ['number'], + 'verbose_name': 'Department', + 'verbose_name_plural': 'Departments', + }, + ), + migrations.CreateModel( + name='DocumentTemplate', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100, verbose_name='Name')), + ('template', models.FileField(upload_to=b'upload/templates/', verbose_name='Template')), + ('associated_object_name', models.CharField(max_length=100, verbose_name='Associated object', choices=[(b'archaeological_operations.models.AdministrativeAct', 'Administrative Act')])), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ['associated_object_name', 'name'], + 'verbose_name': 'Document template', + 'verbose_name_plural': 'Document templates', + }, + ), + migrations.CreateModel( + name='Format', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ['label'], + 'verbose_name': 'Format type', + 'verbose_name_plural': 'Format types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='FormaterType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('formater_type', models.CharField(max_length=20, verbose_name='Formater type', choices=[(b'IntegerFormater', 'Integer'), (b'FloatFormater', 'Float'), (b'UnicodeFormater', 'String'), (b'DateFormater', 'Date'), (b'TypeFormater', 'Type'), (b'YearFormater', 'Year'), (b'StrToBoolean', 'String to boolean'), (b'FileFormater', 'File'), (b'UnknowType', 'Unknow type')])), + ('options', models.CharField(max_length=500, null=True, verbose_name='Options', blank=True)), + ('many_split', models.CharField(max_length=10, null=True, verbose_name='Split character(s)', blank=True)), + ], + options={ + 'ordering': ('formater_type', 'options'), + 'verbose_name': 'Importer - Formater type', + 'verbose_name_plural': 'Importer - Formater types', + }, + ), + migrations.CreateModel( + name='GlobalVar', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('slug', models.SlugField(unique=True, verbose_name='Variable name')), + ('description', models.TextField(null=True, verbose_name='Description of the variable', blank=True)), + ('value', models.TextField(null=True, verbose_name='Value', blank=True)), + ], + options={ + 'ordering': ['slug'], + 'verbose_name': 'Global variable', + 'verbose_name_plural': 'Global variables', + }, + bases=(models.Model, ishtar_common.models.Cached), + ), + migrations.CreateModel( + name='HistoricalOrganization', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('address', models.TextField(null=True, verbose_name='Address', blank=True)), + ('address_complement', models.TextField(null=True, verbose_name='Address complement', blank=True)), + ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Postal code', blank=True)), + ('town', models.CharField(max_length=70, null=True, verbose_name='Town', blank=True)), + ('country', models.CharField(max_length=30, null=True, verbose_name='Country', blank=True)), + ('alt_address', models.TextField(null=True, verbose_name='Other address: address', blank=True)), + ('alt_address_complement', models.TextField(null=True, verbose_name='Other address: address complement', blank=True)), + ('alt_postal_code', models.CharField(max_length=10, null=True, verbose_name='Other address: postal code', blank=True)), + ('alt_town', models.CharField(max_length=70, null=True, verbose_name='Other address: town', blank=True)), + ('alt_country', models.CharField(max_length=30, null=True, verbose_name='Other address: country', blank=True)), + ('phone', models.CharField(max_length=18, null=True, verbose_name='Phone', blank=True)), + ('phone_desc', models.CharField(max_length=300, null=True, verbose_name='Phone description', blank=True)), + ('phone2', models.CharField(max_length=18, null=True, verbose_name='Phone description 2', blank=True)), + ('phone_desc2', models.CharField(max_length=300, null=True, verbose_name='Phone description 2', blank=True)), + ('phone3', models.CharField(max_length=18, null=True, verbose_name='Phone 3', blank=True)), + ('phone_desc3', models.CharField(max_length=300, null=True, verbose_name='Phone description 3', blank=True)), + ('raw_phone', models.TextField(null=True, verbose_name='Raw phone', blank=True)), + ('mobile_phone', models.CharField(max_length=18, null=True, verbose_name='Mobile phone', blank=True)), + ('email', models.EmailField(max_length=300, null=True, verbose_name='Email', blank=True)), + ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), + ('merge_key', models.TextField(null=True, verbose_name='Merge key', blank=True)), + ('archived', models.NullBooleanField(default=False)), + ('name', models.CharField(max_length=500, verbose_name='Name')), + ('history_id', models.AutoField(serialize=False, primary_key=True)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical Organization', + }, + ), + migrations.CreateModel( + name='HistoricalPerson', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('address', models.TextField(null=True, verbose_name='Address', blank=True)), + ('address_complement', models.TextField(null=True, verbose_name='Address complement', blank=True)), + ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Postal code', blank=True)), + ('town', models.CharField(max_length=70, null=True, verbose_name='Town', blank=True)), + ('country', models.CharField(max_length=30, null=True, verbose_name='Country', blank=True)), + ('alt_address', models.TextField(null=True, verbose_name='Other address: address', blank=True)), + ('alt_address_complement', models.TextField(null=True, verbose_name='Other address: address complement', blank=True)), + ('alt_postal_code', models.CharField(max_length=10, null=True, verbose_name='Other address: postal code', blank=True)), + ('alt_town', models.CharField(max_length=70, null=True, verbose_name='Other address: town', blank=True)), + ('alt_country', models.CharField(max_length=30, null=True, verbose_name='Other address: country', blank=True)), + ('phone', models.CharField(max_length=18, null=True, verbose_name='Phone', blank=True)), + ('phone_desc', models.CharField(max_length=300, null=True, verbose_name='Phone description', blank=True)), + ('phone2', models.CharField(max_length=18, null=True, verbose_name='Phone description 2', blank=True)), + ('phone_desc2', models.CharField(max_length=300, null=True, verbose_name='Phone description 2', blank=True)), + ('phone3', models.CharField(max_length=18, null=True, verbose_name='Phone 3', blank=True)), + ('phone_desc3', models.CharField(max_length=300, null=True, verbose_name='Phone description 3', blank=True)), + ('raw_phone', models.TextField(null=True, verbose_name='Raw phone', blank=True)), + ('mobile_phone', models.CharField(max_length=18, null=True, verbose_name='Mobile phone', blank=True)), + ('email', models.EmailField(max_length=300, null=True, verbose_name='Email', blank=True)), + ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), + ('merge_key', models.TextField(null=True, verbose_name='Merge key', blank=True)), + ('archived', models.NullBooleanField(default=False)), + ('old_title', models.CharField(blank=True, max_length=100, null=True, verbose_name='Title', choices=[(b'Mr', 'Mr'), (b'Ms', 'Miss'), (b'Mr and Miss', 'Mr and Mrs'), (b'Md', 'Mrs'), (b'Dr', 'Doctor')])), + ('salutation', models.CharField(max_length=200, null=True, verbose_name='Salutation', blank=True)), + ('surname', models.CharField(max_length=50, null=True, verbose_name='Surname', blank=True)), + ('name', models.CharField(max_length=200, null=True, verbose_name='Name', blank=True)), + ('raw_name', models.CharField(max_length=300, null=True, verbose_name='Raw name', blank=True)), + ('contact_type', models.CharField(max_length=300, null=True, verbose_name='Contact type', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('history_id', models.AutoField(serialize=False, primary_key=True)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical Person', + }, + ), + migrations.CreateModel( + name='Import', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=500, null=True, verbose_name='Name', blank=True)), + ('imported_file', models.FileField(upload_to=b'upload/imports/', max_length=220, verbose_name='Imported file')), + ('imported_images', models.FileField(max_length=220, upload_to=b'upload/imports/', null=True, verbose_name='Associated images (zip file)', blank=True)), + ('encoding', models.CharField(default=b'utf-8', max_length=15, verbose_name='Encoding', choices=[(b'windows-1252', b'windows-1252'), (b'ISO-8859-15', b'ISO-8859-15'), (b'utf-8', b'utf-8')])), + ('skip_lines', models.IntegerField(default=1, verbose_name='Skip lines')), + ('error_file', models.FileField(max_length=255, upload_to=b'upload/imports/', null=True, verbose_name='Error file', blank=True)), + ('result_file', models.FileField(max_length=255, upload_to=b'upload/imports/', null=True, verbose_name='Result file', blank=True)), + ('match_file', models.FileField(max_length=255, upload_to=b'upload/imports/', null=True, verbose_name='Match file', blank=True)), + ('state', models.CharField(default=b'C', max_length=2, verbose_name='State', choices=[(b'C', 'Created'), (b'AP', 'Analyse in progress'), (b'A', 'Analysed'), (b'P', 'Import pending'), (b'IP', 'Import in progress'), (b'FE', 'Finished with errors'), (b'F', 'Finished'), (b'AC', 'Archived')])), + ('conservative_import', models.BooleanField(default=False, help_text=b'If set to true, do not overload existing values', verbose_name='Conservative import')), + ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation date', null=True)), + ('end_date', models.DateTimeField(verbose_name='End date', null=True, editable=False, blank=True)), + ('seconds_remaining', models.IntegerField(verbose_name='Remaining seconds', null=True, editable=False, blank=True)), + ], + options={ + 'verbose_name': 'Import', + 'verbose_name_plural': 'Imports', + }, + ), + migrations.CreateModel( + name='ImporterColumn', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=200, null=True, verbose_name='Label', blank=True)), + ('col_number', models.IntegerField(default=1, verbose_name='Column number')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('required', models.BooleanField(default=False, verbose_name='Required')), + ('export_field_name', models.CharField(help_text='Fill this field if the field name is ambiguous for export. For instance: concatenated fields.', max_length=200, null=True, verbose_name='Export field name', blank=True)), + ], + options={ + 'ordering': ('importer_type', 'col_number'), + 'verbose_name': 'Importer - Column', + 'verbose_name_plural': 'Importer - Columns', + }, + ), + migrations.CreateModel( + name='ImporterDefault', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('target', models.CharField(max_length=500, verbose_name='Target')), + ], + options={ + 'verbose_name': 'Importer - Default', + 'verbose_name_plural': 'Importer - Defaults', + }, + ), + migrations.CreateModel( + name='ImporterDefaultValues', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('target', models.CharField(max_length=500, verbose_name='Target')), + ('value', models.CharField(max_length=500, verbose_name='Value')), + ('default_target', models.ForeignKey(related_name='default_values', to='ishtar_common.ImporterDefault')), + ], + options={ + 'verbose_name': 'Importer - Default value', + 'verbose_name_plural': 'Importer - Default values', + }, + ), + migrations.CreateModel( + name='ImporterDuplicateField', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('field_name', models.CharField(max_length=200, null=True, verbose_name='Field name', blank=True)), + ('force_new', models.BooleanField(default=False, verbose_name='Force creation of new items')), + ('concat', models.BooleanField(default=False, verbose_name='Concatenate with existing')), + ('concat_str', models.CharField(max_length=5, null=True, verbose_name='Concatenate character', blank=True)), + ('column', models.ForeignKey(related_name='duplicate_fields', to='ishtar_common.ImporterColumn')), + ], + options={ + 'verbose_name': 'Importer - Duplicate field', + 'verbose_name_plural': 'Importer - Duplicate fields', + }, + ), + migrations.CreateModel( + name='ImporterModel', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200, verbose_name='Name')), + ('klass', models.CharField(max_length=200, verbose_name='Class name')), + ], + options={ + 'ordering': ('name',), + 'verbose_name': 'Importer - Model', + 'verbose_name_plural': 'Importer - Models', + }, + ), + migrations.CreateModel( + name='ImporterType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100, null=True, verbose_name='Name', blank=True)), + ('slug', models.SlugField(null=True, max_length=100, blank=True, unique=True, verbose_name='Slug')), + ('description', models.CharField(max_length=500, null=True, verbose_name='Description', blank=True)), + ('is_template', models.BooleanField(default=False, verbose_name='Is template')), + ('unicity_keys', models.CharField(max_length=500, null=True, verbose_name='Unicity keys (separator ";")', blank=True)), + ('associated_models', models.ForeignKey(related_name='+', verbose_name='Associated model', blank=True, to='ishtar_common.ImporterModel', null=True)), + ('created_models', models.ManyToManyField(help_text='Leave blank for no restrictions', related_name='+', verbose_name='Models that can accept new items', to='ishtar_common.ImporterModel', blank=True)), + ], + options={ + 'ordering': ('name',), + 'verbose_name': 'Importer - Type', + 'verbose_name_plural': 'Importer - Types', + }, + ), + migrations.CreateModel( + name='ImportTarget', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('target', models.CharField(max_length=500, verbose_name='Target')), + ('force_new', models.BooleanField(default=False, verbose_name='Force creation of new items')), + ('concat', models.BooleanField(default=False, verbose_name='Concatenate with existing')), + ('concat_str', models.CharField(max_length=5, null=True, verbose_name='Concatenate character', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('column', models.ForeignKey(related_name='targets', to='ishtar_common.ImporterColumn')), + ('formater_type', models.ForeignKey(to='ishtar_common.FormaterType')), + ], + options={ + 'verbose_name': 'Importer - Target', + 'verbose_name_plural': 'Importer - Targets', + }, + ), + migrations.CreateModel( + name='IshtarSiteProfile', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.TextField(verbose_name='Name')), + ('slug', models.SlugField(unique=True, verbose_name='Slug')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('base_color', models.CharField(default=b'rgba(0, 0, 0, 0)', max_length=200, verbose_name='CSS color code for base module')), + ('files', models.BooleanField(default=False, verbose_name='Files module')), + ('files_color', models.CharField(default=b'rgba(0, 32, 210, 0.1)', max_length=200, verbose_name='CSS color code for files module')), + ('context_record', models.BooleanField(default=False, verbose_name='Context records module')), + ('context_record_color', models.CharField(default=b'rgba(210,200,0,0.2)', max_length=200, verbose_name='CSS color code for context record module')), + ('find', models.BooleanField(default=False, help_text='Need context records module', verbose_name='Finds module')), + ('find_index', models.CharField(default=b'O', help_text='To prevent irrelevant indexes, change this parameter only if there is no find in the database', max_length=2, verbose_name='Find index is based on', choices=[('O', 'Operations'), ('CR', 'Context records')])), + ('find_color', models.CharField(default=b'rgba(210,0,0,0.15)', max_length=200, verbose_name='CSS color code for find module')), + ('warehouse', models.BooleanField(default=False, help_text='Need finds module', verbose_name='Warehouses module')), + ('warehouse_color', models.CharField(default=b'rgba(10,20,200,0.15)', max_length=200, verbose_name='CSS code for warehouse module')), + ('mapping', models.BooleanField(default=False, verbose_name='Mapping module')), + ('mapping_color', models.CharField(default=b'rgba(72, 236, 0, 0.15)', max_length=200, verbose_name='CSS code for mapping module')), + ('homepage', models.TextField(help_text='Homepage of Ishtar - if not defined a default homepage will appear. Use the markdown syntax. {random_image} can be used to display a random image.', null=True, verbose_name='Home page', blank=True)), + ('file_external_id', models.TextField(default=b'{year}-{numeric_reference}', help_text='Formula to manage file external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='File external id')), + ('parcel_external_id', models.TextField(default=b'{associated_file__external_id}{operation__code_patriarche}-{town__numero_insee}-{section}{parcel_number}', help_text='Formula to manage parcel external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Parcel external id')), + ('context_record_external_id', models.TextField(default=b'{parcel__external_id}-{label}', help_text='Formula to manage context record external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Context record external id')), + ('base_find_external_id', models.TextField(default=b'{context_record__external_id}-{label}', help_text='Formula to manage base find external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Base find external id')), + ('find_external_id', models.TextField(default=b'{get_first_base_find__context_record__external_id}-{label}', help_text='Formula to manage find external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Find external id')), + ('container_external_id', models.TextField(default=b'{responsible__external_id}-{index}', help_text='Formula to manage container external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Container external id')), + ('warehouse_external_id', models.TextField(default=b'{name|slug}', help_text='Formula to manage warehouse external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Warehouse external id')), + ('person_raw_name', models.TextField(default=b'{name|upper} {surname}', help_text='Formula to manage person raw_name. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Raw name for person')), + ('active', models.BooleanField(default=False, verbose_name='Current active')), + ('currency', models.CharField(default='\u20ac', max_length=b'5', verbose_name='Currency', choices=[('\u20ac', 'Euro'), ('$', 'US dollar')])), + ], + options={ + 'ordering': ['label'], + 'verbose_name': 'Ishtar site profile', + 'verbose_name_plural': 'Ishtar site profiles', + }, + bases=(models.Model, ishtar_common.models.Cached), + ), + migrations.CreateModel( + name='IshtarUser', + fields=[ + ('user_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)), + ('advanced_shortcut_menu', models.BooleanField(default=False, verbose_name='Advanced shortcut menu')), + ], + options={ + 'verbose_name': 'Ishtar user', + 'verbose_name_plural': 'Ishtar users', + }, + bases=('auth.user',), + managers=[ + (b'objects', django.contrib.auth.models.UserManager()), + ], + ), + migrations.CreateModel( + name='ItemKey', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('key', models.CharField(max_length=100, verbose_name='Key')), + ('object_id', models.PositiveIntegerField()), + ('content_type', models.ForeignKey(to='contenttypes.ContentType')), + ('importer', models.ForeignKey(blank=True, to='ishtar_common.Import', help_text='Specific key to an import', null=True)), + ], + ), + migrations.CreateModel( + name='OperationType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=1, verbose_name='Order')), + ('preventive', models.BooleanField(default=True, verbose_name='Is preventive')), + ], + options={ + 'ordering': ['-preventive', 'order', 'label'], + 'verbose_name': 'Operation type', + 'verbose_name_plural': 'Operation types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Organization', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('address', models.TextField(null=True, verbose_name='Address', blank=True)), + ('address_complement', models.TextField(null=True, verbose_name='Address complement', blank=True)), + ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Postal code', blank=True)), + ('town', models.CharField(max_length=70, null=True, verbose_name='Town', blank=True)), + ('country', models.CharField(max_length=30, null=True, verbose_name='Country', blank=True)), + ('alt_address', models.TextField(null=True, verbose_name='Other address: address', blank=True)), + ('alt_address_complement', models.TextField(null=True, verbose_name='Other address: address complement', blank=True)), + ('alt_postal_code', models.CharField(max_length=10, null=True, verbose_name='Other address: postal code', blank=True)), + ('alt_town', models.CharField(max_length=70, null=True, verbose_name='Other address: town', blank=True)), + ('alt_country', models.CharField(max_length=30, null=True, verbose_name='Other address: country', blank=True)), + ('phone', models.CharField(max_length=18, null=True, verbose_name='Phone', blank=True)), + ('phone_desc', models.CharField(max_length=300, null=True, verbose_name='Phone description', blank=True)), + ('phone2', models.CharField(max_length=18, null=True, verbose_name='Phone description 2', blank=True)), + ('phone_desc2', models.CharField(max_length=300, null=True, verbose_name='Phone description 2', blank=True)), + ('phone3', models.CharField(max_length=18, null=True, verbose_name='Phone 3', blank=True)), + ('phone_desc3', models.CharField(max_length=300, null=True, verbose_name='Phone description 3', blank=True)), + ('raw_phone', models.TextField(null=True, verbose_name='Raw phone', blank=True)), + ('mobile_phone', models.CharField(max_length=18, null=True, verbose_name='Mobile phone', blank=True)), + ('email', models.EmailField(max_length=300, null=True, verbose_name='Email', blank=True)), + ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), + ('merge_key', models.TextField(null=True, verbose_name='Merge key', blank=True)), + ('archived', models.NullBooleanField(default=False)), + ('name', models.CharField(max_length=500, verbose_name='Name')), + ('history_creator', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('history_modifier', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Last editor', blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('imports', models.ManyToManyField(related_name='imported_ishtar_common_organization', to='ishtar_common.Import', blank=True)), + ('merge_candidate', models.ManyToManyField(related_name='merge_candidate_rel_+', to='ishtar_common.Organization', blank=True)), + ('merge_exclusion', models.ManyToManyField(related_name='merge_exclusion_rel_+', to='ishtar_common.Organization', blank=True)), + ], + options={ + 'verbose_name': 'Organization', + 'verbose_name_plural': 'Organizations', + 'permissions': (('view_organization', 'Peut voir toutes les Organisations'), ('view_own_organization', 'Peut voir sa propre Organisation'), ('add_own_organization', 'Peut ajouter sa propre Organisation'), ('change_own_organization', 'Peut modifier sa propre Organisation'), ('delete_own_organization', 'Peut supprimer sa propre Organisation')), + }, + bases=(models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter), + ), + migrations.CreateModel( + name='OrganizationType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Organization type', + 'verbose_name_plural': 'Organization types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Person', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('address', models.TextField(null=True, verbose_name='Address', blank=True)), + ('address_complement', models.TextField(null=True, verbose_name='Address complement', blank=True)), + ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Postal code', blank=True)), + ('town', models.CharField(max_length=70, null=True, verbose_name='Town', blank=True)), + ('country', models.CharField(max_length=30, null=True, verbose_name='Country', blank=True)), + ('alt_address', models.TextField(null=True, verbose_name='Other address: address', blank=True)), + ('alt_address_complement', models.TextField(null=True, verbose_name='Other address: address complement', blank=True)), + ('alt_postal_code', models.CharField(max_length=10, null=True, verbose_name='Other address: postal code', blank=True)), + ('alt_town', models.CharField(max_length=70, null=True, verbose_name='Other address: town', blank=True)), + ('alt_country', models.CharField(max_length=30, null=True, verbose_name='Other address: country', blank=True)), + ('phone', models.CharField(max_length=18, null=True, verbose_name='Phone', blank=True)), + ('phone_desc', models.CharField(max_length=300, null=True, verbose_name='Phone description', blank=True)), + ('phone2', models.CharField(max_length=18, null=True, verbose_name='Phone description 2', blank=True)), + ('phone_desc2', models.CharField(max_length=300, null=True, verbose_name='Phone description 2', blank=True)), + ('phone3', models.CharField(max_length=18, null=True, verbose_name='Phone 3', blank=True)), + ('phone_desc3', models.CharField(max_length=300, null=True, verbose_name='Phone description 3', blank=True)), + ('raw_phone', models.TextField(null=True, verbose_name='Raw phone', blank=True)), + ('mobile_phone', models.CharField(max_length=18, null=True, verbose_name='Mobile phone', blank=True)), + ('email', models.EmailField(max_length=300, null=True, verbose_name='Email', blank=True)), + ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), + ('merge_key', models.TextField(null=True, verbose_name='Merge key', blank=True)), + ('archived', models.NullBooleanField(default=False)), + ('old_title', models.CharField(blank=True, max_length=100, null=True, verbose_name='Title', choices=[(b'Mr', 'Mr'), (b'Ms', 'Miss'), (b'Mr and Miss', 'Mr and Mrs'), (b'Md', 'Mrs'), (b'Dr', 'Doctor')])), + ('salutation', models.CharField(max_length=200, null=True, verbose_name='Salutation', blank=True)), + ('surname', models.CharField(max_length=50, null=True, verbose_name='Surname', blank=True)), + ('name', models.CharField(max_length=200, null=True, verbose_name='Name', blank=True)), + ('raw_name', models.CharField(max_length=300, null=True, verbose_name='Raw name', blank=True)), + ('contact_type', models.CharField(max_length=300, null=True, verbose_name='Contact type', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('attached_to', models.ForeignKey(related_name='members', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Is attached to', blank=True, to='ishtar_common.Organization', null=True)), + ('history_creator', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('history_modifier', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Last editor', blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('imports', models.ManyToManyField(related_name='imported_ishtar_common_person', to='ishtar_common.Import', blank=True)), + ('merge_candidate', models.ManyToManyField(related_name='merge_candidate_rel_+', to='ishtar_common.Person', blank=True)), + ('merge_exclusion', models.ManyToManyField(related_name='merge_exclusion_rel_+', to='ishtar_common.Person', blank=True)), + ], + options={ + 'verbose_name': 'Person', + 'verbose_name_plural': 'Persons', + 'permissions': (('view_person', 'Peut voir toutes les Personnes'), ('view_own_person', 'Peut voir sa propre Personne'), ('add_own_person', 'Peut ajouter sa propre Personne'), ('change_own_person', 'Peut modifier sa propre Personne'), ('delete_own_person', 'Peut supprimer sa propre Personne')), + }, + bases=(models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter), + ), + migrations.CreateModel( + name='PersonType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('groups', models.ManyToManyField(to='auth.Group', verbose_name='Groups', blank=True)), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Person type', + 'verbose_name_plural': 'Person types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Regexp', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100, verbose_name='Name')), + ('description', models.CharField(max_length=500, null=True, verbose_name='Description', blank=True)), + ('regexp', models.CharField(max_length=500, verbose_name='Regular expression')), + ], + options={ + 'verbose_name': 'Importer - Regular expression', + 'verbose_name_plural': 'Importer - Regular expressions', + }, + ), + migrations.CreateModel( + name='SourceType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ['label'], + 'verbose_name': 'Source type', + 'verbose_name_plural': 'Source types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='SpatialReferenceSystem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=10, verbose_name='Order')), + ('auth_name', models.CharField(default=b'EPSG', max_length=256, verbose_name='Authority name')), + ('srid', models.IntegerField(verbose_name='Authority SRID')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Spatial reference system', + 'verbose_name_plural': 'Spatial reference systems', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='State', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=30, verbose_name='Label')), + ('number', models.CharField(unique=True, max_length=3, verbose_name='Number')), + ], + options={ + 'ordering': ['number'], + 'verbose_name': 'State', + }, + ), + migrations.CreateModel( + name='SupportType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'verbose_name': 'Support type', + 'verbose_name_plural': 'Support types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='TargetKey', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('key', models.TextField(verbose_name='Key')), + ('value', models.TextField(null=True, verbose_name='Value', blank=True)), + ('is_set', models.BooleanField(default=False, verbose_name='Is set')), + ('associated_import', models.ForeignKey(blank=True, to='ishtar_common.Import', null=True)), + ('associated_user', models.ForeignKey(blank=True, to='ishtar_common.IshtarUser', null=True)), + ('target', models.ForeignKey(related_name='keys', to='ishtar_common.ImportTarget')), + ], + options={ + 'verbose_name': 'Importer - Target key', + 'verbose_name_plural': 'Importer - Targets keys', + }, + ), + migrations.CreateModel( + name='TitleType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Title type', + 'verbose_name_plural': 'Title types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Town', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100, verbose_name='Name')), + ('surface', models.IntegerField(null=True, verbose_name='Surface (m2)', blank=True)), + ('center', django.contrib.gis.db.models.fields.PointField(srid=27572, null=True, verbose_name='Localisation', blank=True)), + ('numero_insee', models.CharField(unique=True, max_length=6, verbose_name='Num\xe9ro INSEE')), + ('canton', models.ForeignKey(verbose_name='Canton', blank=True, to='ishtar_common.Canton', null=True)), + ('departement', models.ForeignKey(verbose_name='D\xe9partement', blank=True, to='ishtar_common.Department', null=True)), + ('imports', models.ManyToManyField(related_name='imported_ishtar_common_town', to='ishtar_common.Import', blank=True)), + ], + options={ + 'ordering': ['numero_insee'], + 'verbose_name': 'Town', + 'verbose_name_plural': 'Towns', + }, + ), + migrations.AddField( + model_name='person', + name='person_types', + field=models.ManyToManyField(to='ishtar_common.PersonType', verbose_name='Types'), + ), + migrations.AddField( + model_name='person', + name='title', + field=models.ForeignKey(verbose_name='Title', blank=True, to='ishtar_common.TitleType', null=True), + ), + migrations.AddField( + model_name='organization', + name='organization_type', + field=models.ForeignKey(verbose_name='Type', to='ishtar_common.OrganizationType'), + ), + migrations.AddField( + model_name='ishtaruser', + name='person', + field=models.OneToOneField(related_name='ishtaruser', verbose_name='Person', to='ishtar_common.Person'), + ), + migrations.AddField( + model_name='importtarget', + name='regexp_filter', + field=models.ForeignKey(blank=True, to='ishtar_common.Regexp', null=True), + ), + migrations.AddField( + model_name='importertype', + name='users', + field=models.ManyToManyField(to='ishtar_common.IshtarUser', verbose_name='Users', blank=True), + ), + migrations.AddField( + model_name='importerdefault', + name='importer_type', + field=models.ForeignKey(related_name='defaults', to='ishtar_common.ImporterType'), + ), + migrations.AddField( + model_name='importercolumn', + name='importer_type', + field=models.ForeignKey(related_name='columns', to='ishtar_common.ImporterType'), + ), + migrations.AddField( + model_name='importercolumn', + name='regexp_pre_filter', + field=models.ForeignKey(blank=True, to='ishtar_common.Regexp', null=True), + ), + migrations.AddField( + model_name='import', + name='importer_type', + field=models.ForeignKey(to='ishtar_common.ImporterType'), + ), + migrations.AddField( + model_name='import', + name='user', + field=models.ForeignKey(to='ishtar_common.IshtarUser'), + ), + migrations.AddField( + model_name='historicalperson', + name='attached_to', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Organization', null=True), + ), + migrations.AddField( + model_name='historicalperson', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='historicalperson', + name='history_modifier', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='historicalperson', + name='history_user', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='historicalperson', + name='title', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.TitleType', null=True), + ), + migrations.AddField( + model_name='historicalorganization', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='historicalorganization', + name='history_modifier', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='historicalorganization', + name='history_user', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='historicalorganization', + name='organization_type', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.OrganizationType', null=True), + ), + migrations.AlterUniqueTogether( + name='formatertype', + unique_together=set([('formater_type', 'options', 'many_split')]), + ), + migrations.AddField( + model_name='department', + name='state', + field=models.ForeignKey(verbose_name='State', blank=True, to='ishtar_common.State', null=True), + ), + migrations.AddField( + model_name='author', + name='author_type', + field=models.ForeignKey(verbose_name='Author type', to='ishtar_common.AuthorType'), + ), + migrations.AddField( + model_name='author', + name='person', + field=models.ForeignKey(related_name='author', verbose_name='Person', to='ishtar_common.Person'), + ), + migrations.AddField( + model_name='arrondissement', + name='department', + field=models.ForeignKey(verbose_name='D\xe9partement', to='ishtar_common.Department'), + ), + migrations.AlterUniqueTogether( + name='targetkey', + unique_together=set([('target', 'key', 'associated_user', 'associated_import')]), + ), + migrations.AlterUniqueTogether( + name='importercolumn', + unique_together=set([('importer_type', 'col_number')]), + ), + migrations.CreateModel( + name='AdministrationScript', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('path', models.CharField(max_length=30, verbose_name='Filename')), + ('name', models.TextField(null=True, verbose_name='Name', blank=True)), + ], + options={ + 'ordering': ['name'], + 'verbose_name': 'Administration script', + 'verbose_name_plural': 'Administration scripts', + }, + ), + migrations.CreateModel( + name='AdministrationTask', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('state', models.CharField(default=b'S', max_length=2, verbose_name='State', choices=[(b'S', 'Scheduled'), (b'P', 'In progress'), (b'FE', 'Finished with errors'), (b'F', 'Finished')])), + ('creation_date', models.DateTimeField(default=datetime.datetime.now)), + ('launch_date', models.DateTimeField(null=True, blank=True)), + ('finished_date', models.DateTimeField(null=True, blank=True)), + ('result', models.TextField(null=True, verbose_name='Result', blank=True)), + ('script', models.ForeignKey(to='ishtar_common.AdministrationScript')), + ], + options={ + 'ordering': ['script'], + 'verbose_name': 'Administration task', + 'verbose_name_plural': 'Administration tasks', + }, + ), + ] diff --git a/ishtar_common/migrations/0002_change_ishtaruser_management.py b/ishtar_common/migrations/0002_change_ishtaruser_management.py new file mode 100644 index 000000000..3dda6d7cb --- /dev/null +++ b/ishtar_common/migrations/0002_change_ishtaruser_management.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0001_initial'), + ] + + operations = [ + migrations.AlterModelManagers( + name='ishtaruser', + managers=[ + ], + ), + migrations.AlterField( + model_name='ishtaruser', + name='user_ptr', + field=models.OneToOneField(primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/ishtar_common/migrations/0003_auto_20170421_1613.py b/ishtar_common/migrations/0003_auto_20170421_1613.py new file mode 100644 index 000000000..f82860ff3 --- /dev/null +++ b/ishtar_common/migrations/0003_auto_20170421_1613.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0002_change_ishtaruser_management'), + ] + + operations = [ + migrations.AlterField( + model_name='ishtaruser', + name='user_ptr', + field=models.OneToOneField(related_name='ishtaruser', primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/ishtar_common/migrations/0004_auto_20170802_1557.py b/ishtar_common/migrations/0004_auto_20170802_1557.py new file mode 100644 index 000000000..fc24bb45b --- /dev/null +++ b/ishtar_common/migrations/0004_auto_20170802_1557.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0003_auto_20170421_1613'), + ] + + operations = [ + migrations.AlterModelOptions( + name='organization', + options={'verbose_name': 'Organization', 'verbose_name_plural': 'Organizations', 'permissions': (('view_organization', 'Can view all Organizations'), ('view_own_organization', 'Can view own Organization'), ('add_own_organization', 'Can add own Organization'), ('change_own_organization', 'Can change own Organization'), ('delete_own_organization', 'Can delete own Organization'))}, + ), + migrations.AlterModelOptions( + name='person', + options={'verbose_name': 'Person', 'verbose_name_plural': 'Persons', 'permissions': (('view_person', 'Can view all Persons'), ('view_own_person', 'Can view own Person'), ('add_own_person', 'Can add own Person'), ('change_own_person', 'Can change own Person'), ('delete_own_person', 'Can delete own Person'))}, + ), + ] diff --git a/ishtar_common/migrations/0005_auto_20170804_2023.py b/ishtar_common/migrations/0005_auto_20170804_2023.py new file mode 100644 index 000000000..ab2ba69a4 --- /dev/null +++ b/ishtar_common/migrations/0005_auto_20170804_2023.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import re +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0004_auto_20170802_1557'), + ] + + operations = [ + migrations.AlterField( + model_name='authortype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='format', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='operationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='organizationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='persontype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='sourcetype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='spatialreferencesystem', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='supporttype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='titletype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + ] diff --git a/ishtar_common/migrations/0006_auto_20170811_2129.py b/ishtar_common/migrations/0006_auto_20170811_2129.py new file mode 100644 index 000000000..5e5108d2e --- /dev/null +++ b/ishtar_common/migrations/0006_auto_20170811_2129.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0005_auto_20170804_2023'), + ] + + operations = [ + migrations.AlterField( + model_name='importermodel', + name='klass', + field=models.CharField(unique=True, max_length=200, verbose_name='Class name'), + ), + migrations.AlterField( + model_name='regexp', + name='name', + field=models.CharField(unique=True, max_length=100, verbose_name='Name'), + ), + migrations.AlterUniqueTogether( + name='importerdefault', + unique_together=set([('importer_type', 'target')]), + ), + migrations.AlterUniqueTogether( + name='importtarget', + unique_together=set([('column', 'target')]), + ), + ] diff --git a/ishtar_common/migrations/0007_documenttemplate_slug.py b/ishtar_common/migrations/0007_documenttemplate_slug.py new file mode 100644 index 000000000..2d0258dff --- /dev/null +++ b/ishtar_common/migrations/0007_documenttemplate_slug.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from ishtar_common.utils import create_slug + + +def dt_create_slug(apps, schema): + DocumentTemplate = apps.get_model('ishtar_common', 'documenttemplate') + for dt in DocumentTemplate.objects.all(): + dt.slug = create_slug(DocumentTemplate, dt.name) + dt.save() + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0006_auto_20170811_2129'), + ] + + operations = [ + migrations.AddField( + model_name='documenttemplate', + name='slug', + field=models.SlugField(null=True, max_length=100, blank=True, unique=True, verbose_name='Slug'), + ), + migrations.RunPython(dt_create_slug), + ] diff --git a/ishtar_common/migrations/0008_auto_20170826_1153.py b/ishtar_common/migrations/0008_auto_20170826_1153.py new file mode 100644 index 000000000..2bd30a231 --- /dev/null +++ b/ishtar_common/migrations/0008_auto_20170826_1153.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-26 11:53 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0007_documenttemplate_slug'), + ] + + operations = [ + migrations.AlterModelOptions( + name='importerduplicatefield', + options={'ordering': ('column', 'field_name'), 'verbose_name': 'Importer - Duplicate field', 'verbose_name_plural': 'Importer - Duplicate fields'}, + ), + migrations.AlterField( + model_name='authortype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='format', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='ishtarsiteprofile', + name='currency', + field=models.CharField(choices=[('\u20ac', 'Euro'), ('$', 'US dollar')], default='\u20ac', max_length=5, verbose_name='Currency'), + ), + migrations.AlterField( + model_name='operationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='organizationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='persontype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='sourcetype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='spatialreferencesystem', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='supporttype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='titletype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + ] diff --git a/ishtar_common/migrations/0077_auto__add_administrationscript__add_administrationtask.py b/ishtar_common/migrations/0077_auto__add_administrationscript__add_administrationtask.py deleted file mode 100644 index b6f2680e6..000000000 --- a/ishtar_common/migrations/0077_auto__add_administrationscript__add_administrationtask.py +++ /dev/null @@ -1,530 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'AdministrationScript' - db.create_table('ishtar_common_administrationscript', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('path', self.gf('django.db.models.fields.CharField')(max_length=30)), - ('name', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('ishtar_common', ['AdministrationScript']) - - # Adding model 'AdministrationTask' - db.create_table('ishtar_common_administrationtask', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('script', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.AdministrationScript'])), - ('state', self.gf('django.db.models.fields.CharField')(default='S', max_length=2)), - ('creation_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), - ('launch_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), - ('finished_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), - ('result', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('ishtar_common', ['AdministrationTask']) - - - def backwards(self, orm): - # Deleting model 'AdministrationScript' - db.delete_table('ishtar_common_administrationscript') - - # Deleting model 'AdministrationTask' - db.delete_table('ishtar_common_administrationtask') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'ishtar_common.administrationscript': { - 'Meta': {'ordering': "['name']", 'object_name': 'AdministrationScript'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.administrationtask': { - 'Meta': {'ordering': "['script']", 'object_name': 'AdministrationTask'}, - 'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'finished_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'launch_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'script': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AdministrationScript']"}), - 'state': ('django.db.models.fields.CharField', [], {'default': "'S'", 'max_length': '2'}) - }, - 'ishtar_common.arrondissement': { - 'Meta': {'object_name': 'Arrondissement'}, - 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.author': { - 'Meta': {'ordering': "('author_type__order', 'person__name')", 'object_name': 'Author'}, - 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) - }, - 'ishtar_common.authortype': { - 'Meta': {'ordering': "['order', 'label']", 'object_name': 'AuthorType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.canton': { - 'Meta': {'object_name': 'Canton'}, - 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.department': { - 'Meta': {'ordering': "['number']", 'object_name': 'Department'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}), - 'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.documenttemplate': { - 'Meta': {'ordering': "['associated_object_name', 'name']", 'object_name': 'DocumentTemplate'}, - 'associated_object_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'template': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) - }, - 'ishtar_common.format': { - 'Meta': {'ordering': "['label']", 'object_name': 'Format'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.formatertype': { - 'Meta': {'ordering': "('formater_type', 'options')", 'unique_together': "(('formater_type', 'options', 'many_split'),)", 'object_name': 'FormaterType'}, - 'formater_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'many_split': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'options': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.globalvar': { - 'Meta': {'ordering': "['slug']", 'object_name': 'GlobalVar'}, - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), - 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.historicalorganization': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOrganization'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), - 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), - 'organization_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.historicalperson': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalPerson'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), - 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), - 'attached_to_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'title_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.import': { - 'Meta': {'object_name': 'Import'}, - 'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}), - 'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}), - 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), - 'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) - }, - 'ishtar_common.importercolumn': { - 'Meta': {'ordering': "('importer_type', 'col_number')", 'unique_together': "(('importer_type', 'col_number'),)", 'object_name': 'ImporterColumn'}, - 'col_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'export_field_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'columns'", 'to': "orm['ishtar_common.ImporterType']"}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'regexp_pre_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}), - 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'ishtar_common.importerdefault': { - 'Meta': {'object_name': 'ImporterDefault'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'defaults'", 'to': "orm['ishtar_common.ImporterType']"}), - 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}) - }, - 'ishtar_common.importerdefaultvalues': { - 'Meta': {'object_name': 'ImporterDefaultValues'}, - 'default_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_values'", 'to': "orm['ishtar_common.ImporterDefault']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '500'}) - }, - 'ishtar_common.importerduplicatefield': { - 'Meta': {'object_name': 'ImporterDuplicateField'}, - 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'duplicate_fields'", 'to': "orm['ishtar_common.ImporterColumn']"}), - 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'ishtar_common.importermodel': { - 'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}) - }, - 'ishtar_common.importertype': { - 'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'}, - 'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}), - 'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.importtarget': { - 'Meta': {'object_name': 'ImportTarget'}, - 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'targets'", 'to': "orm['ishtar_common.ImporterColumn']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}), - 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'formater_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.FormaterType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'regexp_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}), - 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}) - }, - 'ishtar_common.ishtarsiteprofile': { - 'Meta': {'ordering': "['label']", 'object_name': 'IshtarSiteProfile'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'base_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(0, 0, 0, 0)'", 'max_length': '200'}), - 'base_find_external_id': ('django.db.models.fields.TextField', [], {'default': "'{context_record__external_id}-{label}'"}), - 'container_external_id': ('django.db.models.fields.TextField', [], {'default': "'{responsible__external_id}-{index}'"}), - 'context_record': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'context_record_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(210,200,0,0.2)'", 'max_length': '200'}), - 'context_record_external_id': ('django.db.models.fields.TextField', [], {'default': "'{parcel__external_id}-{label}'"}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "u'\\u20ac'", 'max_length': "'5'"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'file_external_id': ('django.db.models.fields.TextField', [], {'default': "'{year}-{numeric_reference}'"}), - 'files': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'files_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(0, 32, 210, 0.1)'", 'max_length': '200'}), - 'find': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'find_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(210,0,0,0.15)'", 'max_length': '200'}), - 'find_external_id': ('django.db.models.fields.TextField', [], {'default': "'{get_first_base_find__context_record__external_id}-{label}'"}), - 'find_index': ('django.db.models.fields.CharField', [], {'default': "'O'", 'max_length': '2'}), - 'homepage': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.TextField', [], {}), - 'mapping': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'mapping_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(72, 236, 0, 0.15)'", 'max_length': '200'}), - 'parcel_external_id': ('django.db.models.fields.TextField', [], {'default': "'{associated_file__external_id}{operation__code_patriarche}-{town__numero_insee}-{section}{parcel_number}'"}), - 'person_raw_name': ('django.db.models.fields.TextField', [], {'default': "'{name|upper} {surname}'"}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), - 'warehouse': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'warehouse_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(10,20,200,0.15)'", 'max_length': '200'}), - 'warehouse_external_id': ('django.db.models.fields.TextField', [], {'default': "'{name|slug}'"}) - }, - 'ishtar_common.ishtaruser': { - 'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, - 'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), - 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'ishtar_common.itemkey': { - 'Meta': {'object_name': 'ItemKey'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'importer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}) - }, - 'ishtar_common.operationtype': { - 'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.organization': { - 'Meta': {'object_name': 'Organization'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), - 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), - 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.organizationtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.person': { - 'Meta': {'object_name': 'Person'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), - 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), - 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.persontype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.regexp': { - 'Meta': {'object_name': 'Regexp'}, - 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'regexp': ('django.db.models.fields.CharField', [], {'max_length': '500'}) - }, - 'ishtar_common.sourcetype': { - 'Meta': {'ordering': "['label']", 'object_name': 'SourceType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.spatialreferencesystem': { - 'Meta': {'ordering': "('label',)", 'object_name': 'SpatialReferenceSystem'}, - 'auth_name': ('django.db.models.fields.CharField', [], {'default': "'EPSG'", 'max_length': '256'}), - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}), - 'srid': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.state': { - 'Meta': {'ordering': "['number']", 'object_name': 'State'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) - }, - 'ishtar_common.supporttype': { - 'Meta': {'object_name': 'SupportType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.targetkey': { - 'Meta': {'unique_together': "(('target', 'key', 'associated_user', 'associated_import'),)", 'object_name': 'TargetKey'}, - 'associated_import': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}), - 'associated_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_set': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'key': ('django.db.models.fields.TextField', [], {}), - 'target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'keys'", 'to': "orm['ishtar_common.ImportTarget']"}), - 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.titletype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.town': { - 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, - 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), - 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), - 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_town'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['ishtar_common']
\ No newline at end of file diff --git a/ishtar_common/model_merging.py b/ishtar_common/model_merging.py index c577a8cf1..a390f233c 100644 --- a/ishtar_common/model_merging.py +++ b/ishtar_common/model_merging.py @@ -1,11 +1,25 @@ # from https://djangosnippets.org/snippets/2283/ +from django.apps import apps from django.db import transaction -from django.db.models import get_models, Model -from django.contrib.contenttypes.generic import GenericForeignKey +from django.db.models import Model +from django.contrib.contenttypes.fields import GenericForeignKey +from django.core.exceptions import ObjectDoesNotExist +from ishtar_common.utils import get_all_related_many_to_many_objects, \ + get_all_related_objects -@transaction.commit_on_success + +def get_models(): + _apps = apps.app_configs.items() + models = [] + for app_name, app_config in _apps: + models += [apps.get_model(app_name, m) + for m in apps.get_app_config(app_name).models] + return models + + +@transaction.atomic def merge_model_objects(primary_object, alias_objects=[], keep_old=False): """ Use this function to merge model objects (i.e. Users, Organizations, Polls, @@ -58,12 +72,15 @@ def merge_model_objects(primary_object, alias_objects=[], keep_old=False): for alias_object in alias_objects: # Migrate all foreign key references from alias object to primary # object. - for related_object in alias_object._meta.get_all_related_objects(): + for related_object in get_all_related_objects(alias_object): # The variable name on the alias_object model. alias_varname = related_object.get_accessor_name() # The variable name on the related model. obj_varname = related_object.field.name - related_objects = getattr(alias_object, alias_varname) + try: + related_objects = getattr(alias_object, alias_varname) + except ObjectDoesNotExist: + continue for obj in related_objects.all(): setattr(obj, obj_varname, primary_object) obj.save() @@ -71,7 +88,7 @@ def merge_model_objects(primary_object, alias_objects=[], keep_old=False): # Migrate all many to many references from alias object to primary # object. related_many_objects = \ - alias_object._meta.get_all_related_many_to_many_objects() + get_all_related_many_to_many_objects(alias_object) related_many_object_names = set() for related_many_object in related_many_objects: alias_varname = related_many_object.get_accessor_name() diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 7f79df72f..0c06f0b4d 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -22,53 +22,54 @@ Models description """ from cStringIO import StringIO import copy -import csv import datetime from PIL import Image -from importlib import import_module import logging import os from os.path import isfile, join import re +from secretary import Renderer as SecretaryRenderer import shutil from subprocess import Popen, PIPE import tempfile -import unicodecsv -import zipfile +import time from django.conf import settings from django.core.cache import cache -from django.core.exceptions import ObjectDoesNotExist, ValidationError, \ - SuspiciousOperation -from django.core.files import File +from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import validate_slug from django.core.urlresolvers import reverse, NoReverseMatch from django.db.utils import DatabaseError from django.db.models import Q, Max, Count -from django.db.models.base import ModelBase -from django.db.models.signals import post_save, pre_delete, post_delete +from django.db.models.signals import post_save, post_delete from django.utils.functional import lazy -from django.utils.translation import ugettext_lazy as _, ugettext, \ - pgettext_lazy +from django.utils.translation import ugettext_lazy as _ from django.utils.safestring import SafeUnicode, mark_safe from django.template.defaultfilters import slugify from django.contrib.auth.models import User, Group from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes import generic +from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.gis.db import models from simple_history.models import HistoricalRecords as BaseHistoricalRecords -from ishtar_common.ooo_replace import ooo_replace from ishtar_common.model_merging import merge_model_objects -from ishtar_common.utils import get_cache, disable_for_loaddata -from ishtar_common.data_importer import Importer, ImportFormater, \ - IntegerFormater, FloatFormater, UnicodeFormater, DateFormater, \ - TypeFormater, YearFormater, StrToBoolean, FileFormater - +from ishtar_common.utils import get_cache, disable_for_loaddata, create_slug,\ + get_all_field_names + +from ishtar_common.models_imports import ImporterModel, ImporterType, \ + ImporterDefault, ImporterDefaultValues, ImporterColumn, \ + ImporterDuplicateField, Regexp, ImportTarget, TargetKey, FormaterType, \ + Import + +__all__ = [ + 'ImporterModel', 'ImporterType', 'ImporterDefault', 'ImporterDefaultValues', + 'ImporterColumn', 'ImporterDuplicateField', 'Regexp', 'ImportTarget', + 'TargetKey', 'FormaterType', 'Import' +] logger = logging.getLogger(__name__) @@ -76,19 +77,12 @@ logger = logging.getLogger(__name__) def post_save_user(sender, **kwargs): user = kwargs['instance'] - try: - q = IshtarUser.objects.filter(username=user.username) - if not q.count(): - ishtaruser = IshtarUser.create_from_user(user) - else: - ishtaruser = q.all()[0] - administrator, created = PersonType.objects.get_or_create( - txt_idx='administrator') - if ishtaruser.is_superuser \ - and not ishtaruser.has_right('administrator'): - ishtaruser.person.person_types.add(administrator) - except DatabaseError: # manage when db is not synced - pass + if kwargs["created"]: + try: + IshtarUser.create_from_user(user) + except DatabaseError: # manage when db is not synced + pass + IshtarUser.set_superuser(user) post_save.connect(post_save_user, sender=User) @@ -130,15 +124,6 @@ def check_model_access_control(request, model, available_perms=None): return allowed, own -class Imported(models.Model): - imports = models.ManyToManyField( - 'Import', blank=True, null=True, - related_name="imported_%(app_label)s_%(class)s") - - class Meta: - abstract = True - - class ValueGetter(object): _prefix = "" GET_VALUES_EXTRA = [] @@ -148,7 +133,7 @@ class ValueGetter(object): if not prefix: prefix = self._prefix values = {} - for field_name in self._meta.get_all_field_names(): + for field_name in get_all_field_names(self): if not hasattr(self, field_name): continue value = getattr(self, field_name) @@ -158,6 +143,15 @@ class ValueGetter(object): values[prefix + field_name] = value for extra_field in self.GET_VALUES_EXTRA: values[prefix + extra_field] = getattr(self, extra_field) or '' + for key in values.keys(): + val = values[key] + if val is None: + val = '' + else: + val = unicode(val) + if val.endswith('.None'): + val = '' + values[key] = val values['KEYS'] = u'\n'.join(values.keys()) value_list = [] for key in values.keys(): @@ -176,7 +170,7 @@ class ValueGetter(object): if not prefix: prefix = cls._prefix values = {} - for field_name in cls._meta.get_all_field_names(): + for field_name in get_all_field_names(cls): values[prefix + field_name] = '' return values @@ -187,7 +181,7 @@ class HistoricalRecords(BaseHistoricalRecords): history_modifier = getattr(instance, 'history_modifier', None) assert history_modifier except (User.DoesNotExist, AssertionError): - # on batch removing of users, user could have disapeared + # on batch removing of users, user could have disappeared return manager = getattr(instance, self.manager_name) attrs = {} @@ -197,7 +191,8 @@ class HistoricalRecords(BaseHistoricalRecords): .filter(history_modifier_id=history_modifier.pk)\ .order_by('-history_date', '-history_id') if not q_history.count(): - manager.create(history_type=type, **attrs) + manager.create(history_type=type, + history_date=datetime.datetime.now(), **attrs) return old_instance = q_history.all()[0] # multiple saving by the same user in a very short time are generaly @@ -210,6 +205,8 @@ class HistoricalRecords(BaseHistoricalRecords): if q.count(): return + if 'history_date' not in attrs or not attrs['history_date']: + attrs['history_date'] = datetime.datetime.now() # record a new version only if data have been changed for field in instance._meta.fields: if getattr(old_instance, field.attname) != attrs[field.attname]: @@ -253,7 +250,7 @@ def is_unique(cls, field): return func -class OwnPerms: +class OwnPerms(object): """ Manage special permissions for object's owner """ @@ -315,13 +312,13 @@ class OwnPerms: """ Get Own items """ - if isinstance(user, User): - user = IshtarUser.objects.get(user_ptr=user) - if user.is_anonymous(): + if hasattr(user, 'is_authenticated') and not user.is_authenticated(): returned = cls.objects.filter(pk__isnull=True) if values: returned = [] return returned + if isinstance(user, User): + user = IshtarUser.objects.get(user_ptr=user) items = [] if hasattr(cls, 'BASKET_MODEL'): items = list(cls.BASKET_MODEL.objects.filter(user=user).all()) @@ -410,6 +407,16 @@ def post_save_cache(sender, **kwargs): sender.refresh_cache() +class SlugModelManager(models.Manager): + def get_by_natural_key(self, slug): + return self.get(slug=slug) + + +class TypeManager(models.Manager): + def get_by_natural_key(self, txt_idx): + return self.get(txt_idx=txt_idx) + + class GeneralType(Cached, models.Model): """ Abstract class for "types" @@ -417,18 +424,25 @@ class GeneralType(Cached, models.Model): label = models.CharField(_(u"Label"), max_length=100) txt_idx = models.CharField( _(u"Textual ID"), validators=[validate_slug], max_length=100, - unique=True) + unique=True, + help_text=_( + u"The slug is the standardized version of the name. It contains " + u"only lowercase letters, numbers and hyphens. Each slug must " + u"be unique.")) comment = models.TextField(_(u"Comment"), blank=True, null=True) available = models.BooleanField(_(u"Available"), default=True) HELP_TEXT = u"" + objects = TypeManager() class Meta: abstract = True - unique_together = (('txt_idx', 'available'),) def __unicode__(self): return self.label + def natural_key(self): + return (self.txt_idx, ) + @classmethod def create_default_for_test(cls): return [cls.objects.create(label='Test %d' % i) for i in range(5)] @@ -738,55 +752,27 @@ class GeneralType(Cached, models.Model): item.generate_key() -class Basket(models.Model): - """ - Abstract class for a basket - Subclass must be defined with an "items" ManyToManyField - """ - IS_BASKET = True - label = models.CharField(_(u"Label"), max_length=1000) - comment = models.TextField(_(u"Comment"), blank=True, null=True) - user = models.ForeignKey('IshtarUser', blank=True, null=True) - available = models.BooleanField(_(u"Available"), default=True) - - class Meta: - abstract = True - unique_together = (('label', 'user'),) - - def __unicode__(self): - return self.label - - @property - def cached_label(self): - return unicode(self) - - @classmethod - def get_short_menu_class(cls, pk): - return 'basket' - - @property - def associated_filename(self): - return "{}-{}".format(datetime.date.today().strftime( - "%Y-%m-%d"), slugify(self.label)) - - class ItemKey(models.Model): key = models.CharField(_(u"Key"), max_length=100) content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() - content_object = generic.GenericForeignKey('content_type', 'object_id') + content_object = GenericForeignKey('content_type', 'object_id') importer = models.ForeignKey( - 'Import', null=True, blank=True, + Import, null=True, blank=True, help_text=_(u"Specific key to an import")) def __unicode__(self): return self.key +def get_image_path(instance, filename): + return instance._get_image_path(filename) + + class ImageModel(models.Model): - image = models.ImageField(upload_to="upload/", blank=True, null=True, + image = models.ImageField(upload_to=get_image_path, blank=True, null=True, max_length=255) - thumbnail = models.ImageField(upload_to='upload/thumbs/', blank=True, + thumbnail = models.ImageField(upload_to=get_image_path, blank=True, null=True, max_length=255) IMAGE_MAX_SIZE = settings.IMAGE_MAX_SIZE THUMB_MAX_SIZE = settings.THUMB_MAX_SIZE @@ -795,15 +781,11 @@ class ImageModel(models.Model): class Meta: abstract = True - def __init__(self, *args, **kwargs): - super(ImageModel, self).__init__(*args, **kwargs) - image = self._meta.get_field_by_name("image")[0] - IMAGE_PREFIX = self.IMAGE_PREFIX - if not IMAGE_PREFIX.endswith('/'): - IMAGE_PREFIX += u'/' - image.upload_to = IMAGE_PREFIX - thumbnail = self._meta.get_field_by_name("thumbnail")[0] - thumbnail.upload_to = IMAGE_PREFIX + "thumbs/" + def _get_image_path(self, filename): + return u"{}/{}".format(self._get_base_image_path(), filename) + + def _get_base_image_path(self): + return u"upload" def has_changed(self, field): if not self.pk: @@ -850,8 +832,12 @@ class ImageModel(models.Model): pass # save the thumbnail + splited = filename.split('.') + thumb_filename = u"{}-thumb.{}".format( + u".".join(splited[:-1]), splited[-1] + ) self.thumbnail.save( - '_%s' % filename, + thumb_filename, self.create_thumb(image, self.THUMB_MAX_SIZE), save=False) except IOError: @@ -869,6 +855,37 @@ class HistoryError(Exception): PRIVATE_FIELDS = ('id', 'history_modifier', 'order') +class BulkUpdatedItem(object): + @classmethod + def bulk_recursion(cls, transaction_id, extra_args): + """ + Prevent infinite recursion. Should not happen but wrong manipulation + in the database or messy imports can generate circular relations + + :param transaction_id: current transaction ID (unix time) - if null + a transaction ID is generated + :param extra_args: arguments dealing with + :return: (transaction ID, is a recursion) + """ + if not transaction_id: + transaction_id = unicode(time.time()) + args = ['cached_label_bulk_update', transaction_id] + extra_args + key, val = get_cache(cls, args) + if val: + return transaction_id, True + cache.set(key, 1, settings.CACHE_SMALLTIMEOUT) + return transaction_id, False + + +class Imported(models.Model): + imports = models.ManyToManyField( + Import, blank=True, + related_name="imported_%(app_label)s_%(class)s") + + class Meta: + abstract = True + + class BaseHistorizedItem(Imported): IS_BASKET = False history_modifier = models.ForeignKey( @@ -916,8 +933,8 @@ class BaseHistorizedItem(Imported): item._next = None item.history_date = historized[step].history_date model = self.__class__ - for k in model._meta.get_all_field_names(): - field = model._meta.get_field_by_name(k)[0] + for k in get_all_field_names(model): + field = model._meta.get_field(k) if hasattr(field, 'rel') and field.rel: if not hasattr(item, k + '_id'): setattr(item, k, getattr(self, k)) @@ -941,14 +958,14 @@ class BaseHistorizedItem(Imported): def last_edition_date(self): try: return self.history.order_by('-history_date').all()[0].history_date - except IndexError: + except (AttributeError, IndexError): return @property def history_creation_date(self): try: return self.history.order_by('history_date').all()[0].history_date - except IndexError: + except (AttributeError, IndexError): return def rollback(self, date): @@ -1022,10 +1039,9 @@ class GeneralRelationType(GeneralType): symmetrical = models.BooleanField(_(u"Symmetrical")) tiny_label = models.CharField(_(u"Tiny label"), max_length=50, blank=True, null=True) - # # an inverse must be set - # inverse_relation = models.ForeignKey( - # 'RelationType', verbose_name=_(u"Inverse relation"), blank=True, - # null=True) + inverse_relation = models.ForeignKey( + 'self', verbose_name=_(u"Inverse relation"), blank=True, + null=True) class Meta: abstract = True @@ -1163,16 +1179,16 @@ class IshtarSiteProfile(models.Model, Cached): description = models.TextField(_(u"Description"), null=True, blank=True) base_color = models.CharField( _(u"CSS color code for base module"), - default='rgba(0, 0, 0, 0)', max_length=200) + default=u'rgba(0, 0, 0, 0)', max_length=200) files = models.BooleanField(_(u"Files module"), default=False) files_color = models.CharField( _(u"CSS color code for files module"), - default='rgba(0, 32, 210, 0.1)', max_length=200) + default=u'rgba(0, 32, 210, 0.1)', max_length=200) context_record = models.BooleanField(_(u"Context records module"), default=False) context_record_color = models.CharField( _(u"CSS color code for context record module"), - default='rgba(210,200,0,0.2)', max_length=200) + default=u'rgba(210,200,0,0.2)', max_length=200) find = models.BooleanField(_(u"Finds module"), default=False, help_text=_(u"Need context records module")) find_index = models.CharField( @@ -1182,16 +1198,16 @@ class IshtarSiteProfile(models.Model, Cached): u"only if there is no find in the database")) find_color = models.CharField( _(u"CSS color code for find module"), - default='rgba(210,0,0,0.15)', max_length=200) + default=u'rgba(210,0,0,0.15)', max_length=200) warehouse = models.BooleanField( _(u"Warehouses module"), default=False, help_text=_(u"Need finds module")) warehouse_color = models.CharField( - _(u"CSS code for warehouse module"), default='rgba(10,20,200,0.15)', + _(u"CSS code for warehouse module"), default=u'rgba(10,20,200,0.15)', max_length=200) mapping = models.BooleanField(_(u"Mapping module"), default=False) mapping_color = models.CharField( - _(u"CSS code for mapping module"), default='rgba(72, 236, 0, 0.15)', + _(u"CSS code for mapping module"), default=u'rgba(72, 236, 0, 0.15)', max_length=200) homepage = models.TextField( _(u"Home page"), null=True, blank=True, @@ -1200,64 +1216,64 @@ class IshtarSiteProfile(models.Model, Cached): u"can be used to display a random image.")) file_external_id = models.TextField( _(u"File external id"), - default="{year}-{numeric_reference}", + default=u"{year}-{numeric_reference}", help_text=_(u"Formula to manage file external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) parcel_external_id = models.TextField( _(u"Parcel external id"), - default="{associated_file__external_id}{operation__code_patriarche}-" - "{town__numero_insee}-{section}{parcel_number}", + default=u"{associated_file__external_id}{operation__code_patriarche}-" + u"{town__numero_insee}-{section}{parcel_number}", help_text=_(u"Formula to manage parcel external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) context_record_external_id = models.TextField( _(u"Context record external id"), - default="{parcel__external_id}-{label}", + default=u"{parcel__external_id}-{label}", help_text=_(u"Formula to manage context record external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) base_find_external_id = models.TextField( _(u"Base find external id"), - default="{context_record__external_id}-{label}", + default=u"{context_record__external_id}-{label}", help_text=_(u"Formula to manage base find external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) find_external_id = models.TextField( _(u"Find external id"), - default="{get_first_base_find__context_record__external_id}-{label}", + default=u"{get_first_base_find__context_record__external_id}-{label}", help_text=_(u"Formula to manage find external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) container_external_id = models.TextField( _(u"Container external id"), - default="{responsible__external_id}-{index}", + default=u"{responsible__external_id}-{index}", help_text=_(u"Formula to manage container external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) warehouse_external_id = models.TextField( _(u"Warehouse external id"), - default="{name|slug}", + default=u"{name|slug}", help_text=_(u"Formula to manage warehouse external ID. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) person_raw_name = models.TextField( _(u"Raw name for person"), - default="{name|upper} {surname}", + default=u"{name|upper} {surname}", help_text=_(u"Formula to manage person raw_name. " u"Change this with care. With incorrect formula, the " u"application might be unusable and import of external " u"data can be destructive.")) active = models.BooleanField(_(u"Current active"), default=False) currency = models.CharField(_(u"Currency"), default=u"€", - choices=CURRENCY, max_length='5') + choices=CURRENCY, max_length=5) class Meta: verbose_name = _(u"Ishtar site profile") @@ -1397,7 +1413,8 @@ class DashboardFormItem(object): q = cls.objects.filter(**{date_var + '__isnull': False}) if fltr: q = q.filter(**fltr) - return q.filter(**{date_var + '__year': year}).distinct('pk') + return q.filter( + **{date_var + '__year': year}).order_by('pk').distinct('pk') @classmethod def get_by_month(cls, year, month, fltr={}, date_source='creation'): @@ -1407,14 +1424,14 @@ class DashboardFormItem(object): q = q.filter(**fltr) q = q.filter( **{date_var + '__year': year, date_var + '__month': month}) - return q.distinct('pk') + return q.order_by('pk').distinct('pk') @classmethod def get_total_number(cls, fltr={}): q = cls.objects if fltr: q = q.filter(**fltr) - return q.distinct('pk').count() + return q.order_by('pk').distinct('pk').count() class Dashboard(object): @@ -1555,10 +1572,14 @@ class DocumentTemplate(models.Model): CLASSNAMES = (('archaeological_operations.models.AdministrativeAct', _(u"Administrative Act")),) name = models.CharField(_(u"Name"), max_length=100) - template = models.FileField(_(u"Template"), upload_to="upload/templates/") + slug = models.SlugField(_(u"Slug"), blank=True, null=True, max_length=100, + unique=True) + template = models.FileField( + _(u"Template"), upload_to="templates/%Y/") associated_object_name = models.CharField( _(u"Associated object"), max_length=100, choices=CLASSNAMES) available = models.BooleanField(_(u"Available"), default=True) + objects = SlugModelManager() class Meta: verbose_name = _(u"Document template") @@ -1568,6 +1589,14 @@ class DocumentTemplate(models.Model): def __unicode__(self): return self.name + def natural_key(self): + return (self.slug, ) + + def save(self, *args, **kwargs): + if not self.slug: + self.slug = create_slug(DocumentTemplate, self.name) + return super(DocumentTemplate, self).save(*args, **kwargs) + @classmethod def get_tuples(cls, dct={}, empty_first=True): dct['available'] = True @@ -1584,7 +1613,50 @@ class DocumentTemplate(models.Model): datetime.date.today().strftime('%Y-%m-%d') +\ u"." + self.template.name.split('.')[-1] values = c_object.get_values() + engine = SecretaryRenderer() + result = engine.render(self.template, **values) + output = open(output_name, 'wb') + output.write(result) + return output_name + + def convert_from_v1(self): + """ + Convert the current template from v1 to v2. + """ + from old.ooo_replace import ooo_replace + from archaeological_operations.models import AdministrativeAct + + old_dir = settings.MEDIA_ROOT + "/templates/v1/" + if not os.path.exists(old_dir): + os.makedirs(old_dir) + shutil.copy(settings.MEDIA_ROOT + self.template.name, old_dir) + + tempdir = tempfile.mkdtemp("-ishtardocs") + output_name = tempdir + os.path.sep + self.template.name.split( + os.sep)[-1] + + objects = [] + filters = [ + {'operation__isnull': False}, + {'associated_file__isnull': False}, + {'treatment_file__isnull': False}, + {'treatment__isnull': False}, + ] + for filtr in filters: + q = AdministrativeAct.objects.filter(**filtr) + if q.count(): + objects.append(q.all()[0]) + + if not objects: + return + values = {} + for obj in objects: + values.update(obj.get_values()) + for key in values: + values[key] = "{{ " + key + " }}" + ooo_replace(self.template, output_name, values) + shutil.move(output_name, settings.MEDIA_ROOT + self.template.name) return output_name @@ -1704,10 +1776,8 @@ class Address(BaseHistorizedItem): class Merge(models.Model): merge_key = models.TextField(_("Merge key"), blank=True, null=True) - merge_candidate = models.ManyToManyField("self", - blank=True, null=True) - merge_exclusion = models.ManyToManyField("self", - blank=True, null=True) + merge_candidate = models.ManyToManyField("self", blank=True) + merge_exclusion = models.ManyToManyField("self", blank=True) archived = models.NullBooleanField(default=False, blank=True, null=True) # 1 for one word similarity, 2 for two word similarity, etc. @@ -1785,772 +1855,6 @@ post_delete.connect(post_save_cache, sender=OrganizationType) organization_type_pk_lazy = lazy(OrganizationType.get_or_create_pk, unicode) organization_type_pks_lazy = lazy(OrganizationType.get_or_create_pks, unicode) -IMPORTER_CLASSES = {} - -IMPORTER_CLASSES.update({ - 'sra-pdl-files': - 'archaeological_files.data_importer.FileImporterSraPdL'}) - - -def get_model_fields(model): - """ - Return a dict of fields from model - To be replace in Django 1.8 with get_fields, get_field - """ - fields = {} - options = model._meta - for field in sorted(options.fields + options.many_to_many): - fields[field.name] = field - if hasattr(model, 'get_extra_fields'): - fields.update(model.get_extra_fields()) - return fields - - -def import_class(full_path_classname): - """ - Return the model class from the full path - TODO: add a white list for more security - """ - mods = full_path_classname.split('.') - if len(mods) == 1: - mods = ['ishtar_common', 'models', mods[0]] - elif 'models' not in mods and 'models_finds' not in mods \ - and 'models_treatments' not in mods: - raise SuspiciousOperation( - u"Try to import a non model from a string") - module = import_module('.'.join(mods[:-1])) - return getattr(module, mods[-1]) - - -class ImporterModel(models.Model): - name = models.CharField(_(u"Name"), max_length=200) - klass = models.CharField(_(u"Class name"), max_length=200) - - class Meta: - verbose_name = _(u"Importer - Model") - verbose_name_plural = _(u"Importer - Models") - ordering = ('name',) - - def __unicode__(self): - return self.name - - -class ImporterType(models.Model): - """ - Description of a table to be mapped with ishtar database - """ - name = models.CharField(_(u"Name"), blank=True, null=True, - max_length=100) - slug = models.SlugField(_(u"Slug"), unique=True, blank=True, null=True, - max_length=100) - description = models.CharField(_(u"Description"), blank=True, null=True, - max_length=500) - users = models.ManyToManyField('IshtarUser', verbose_name=_(u"Users"), - blank=True, null=True) - associated_models = models.ForeignKey( - ImporterModel, verbose_name=_(u"Associated model"), - related_name='+', blank=True, null=True) - created_models = models.ManyToManyField( - ImporterModel, verbose_name=_(u"Models that can accept new items"), - blank=True, null=True, help_text=_(u"Leave blank for no restrictions"), - related_name='+') - is_template = models.BooleanField(_(u"Is template"), default=False) - unicity_keys = models.CharField(_(u"Unicity keys (separator \";\")"), - blank=True, null=True, max_length=500) - - class Meta: - verbose_name = _(u"Importer - Type") - verbose_name_plural = _(u"Importer - Types") - ordering = ('name',) - - def __unicode__(self): - return self.name - - def get_importer_class(self, import_instance=None): - if self.slug and self.slug in IMPORTER_CLASSES: - cls = import_class(IMPORTER_CLASSES[self.slug]) - return cls - OBJECT_CLS = import_class(self.associated_models.klass) - DEFAULTS = dict([(default.keys, default.values) - for default in self.defaults.all()]) - LINE_FORMAT = [] - idx = 0 - for column in self.columns.order_by('col_number').all(): - idx += 1 - while column.col_number > idx: - LINE_FORMAT.append(None) - idx += 1 - targets = [] - formater_types = [] - nb = column.targets.count() - if not nb: - LINE_FORMAT.append(None) - continue - force_news = [] - concat_str = [] - for target in column.targets.all(): - ft = target.formater_type.get_formater_type( - target, import_instance=import_instance) - if not ft: - continue - formater_types.append(ft) - targets.append(target.target) - concat_str.append(target.concat_str) - force_news.append(target.force_new) - formater_kwargs = {} - if column.regexp_pre_filter: - formater_kwargs['regexp'] = re.compile( - column.regexp_pre_filter.regexp) - formater_kwargs['concat_str'] = concat_str - formater_kwargs['duplicate_fields'] = [ - (field.field_name, field.force_new, field.concat, - field.concat_str) - for field in column.duplicate_fields.all()] - formater_kwargs['label'] = column.label - formater_kwargs['required'] = column.required - formater_kwargs['force_new'] = force_news - if column.export_field_name: - formater_kwargs['export_field_name'] = [ - column.export_field_name] - formater = ImportFormater(targets, formater_types, - **formater_kwargs) - LINE_FORMAT.append(formater) - UNICITY_KEYS = [] - if self.unicity_keys: - UNICITY_KEYS = [un.strip() for un in self.unicity_keys.split(';')] - MODEL_CREATION_LIMIT = [] - for modls in self.created_models.all(): - MODEL_CREATION_LIMIT.append(import_class(modls.klass)) - args = {'OBJECT_CLS': OBJECT_CLS, 'DESC': self.description, - 'DEFAULTS': DEFAULTS, 'LINE_FORMAT': LINE_FORMAT, - 'UNICITY_KEYS': UNICITY_KEYS, - 'MODEL_CREATION_LIMIT': MODEL_CREATION_LIMIT} - name = str(''.join( - x for x in slugify(self.name).replace('-', ' ').title() - if not x.isspace())) - newclass = type(name, (Importer,), args) - return newclass - - -def get_associated_model(parent_model, keys): - model = None - if isinstance(parent_model, unicode) or \ - isinstance(parent_model, str): - OBJECT_CLS = import_class(parent_model) - else: - OBJECT_CLS = parent_model - for idx, item in enumerate(keys): - if not idx: - field = get_model_fields(OBJECT_CLS)[item] - if hasattr(field, 'rel') and hasattr(field.rel, 'to'): - model = field.rel.to - if type(field) == ModelBase: - model = field - else: - return get_associated_model(model, keys[1:]) - return model - - -class ImporterDefault(models.Model): - """ - Targets of default values in an import - """ - importer_type = models.ForeignKey(ImporterType, related_name='defaults') - target = models.CharField(u"Target", max_length=500) - - class Meta: - verbose_name = _(u"Importer - Default") - verbose_name_plural = _(u"Importer - Defaults") - - def __unicode__(self): - return u"{} - {}".format(self.importer_type, self.target) - - @property - def keys(self): - return tuple(self.target.split('__')) - - @property - def associated_model(self): - return get_associated_model(self.importer_type.associated_models.klass, - self.keys) - - @property - def values(self): - values = {} - for default_value in self.default_values.all(): - values[default_value.target] = default_value.get_value() - return values - - -class ImporterDefaultValues(models.Model): - """ - Default values in an import - """ - default_target = models.ForeignKey(ImporterDefault, - related_name='default_values') - target = models.CharField(u"Target", max_length=500) - value = models.CharField(u"Value", max_length=500) - - def __unicode__(self): - return u"{} - {}".format(self.default_target, self.target, self.value) - - class Meta: - verbose_name = _(u"Importer - Default value") - verbose_name_plural = _(u"Importer - Default values") - - def get_value(self): - parent_model = self.default_target.associated_model - if not parent_model: - return self.value - fields = get_model_fields(parent_model) - target = self.target.strip() - if target not in fields: - return - field = fields[target] - if not hasattr(field, 'rel') or not hasattr(field.rel, 'to'): - return - model = field.rel.to - # if value is an id - try: - return model.objects.get(pk=int(self.value)) - except (ValueError, model.DoesNotExist): - pass - # try with txt_idx - try: - return model.objects.get(txt_idx=self.value) - except (ValueError, model.DoesNotExist): - pass - return "" - - -class ImporterColumn(models.Model): - """ - Import file column description - """ - label = models.CharField(_(u"Label"), blank=True, null=True, - max_length=200) - importer_type = models.ForeignKey(ImporterType, related_name='columns') - col_number = models.IntegerField(_(u"Column number"), default=1) - description = models.TextField(_("Description"), blank=True, null=True) - regexp_pre_filter = models.ForeignKey("Regexp", blank=True, null=True) - required = models.BooleanField(_(u"Required"), default=False) - export_field_name = models.CharField( - _(u"Export field name"), blank=True, null=True, max_length=200, - help_text=_(u"Fill this field if the field name is ambiguous for " - u"export. For instance: concatenated fields.") - ) - - class Meta: - verbose_name = _(u"Importer - Column") - verbose_name_plural = _(u"Importer - Columns") - ordering = ('importer_type', 'col_number') - unique_together = ('importer_type', 'col_number') - - def __unicode__(self): - return u"{} - {}".format(self.importer_type, self.col_number) - - def targets_lbl(self): - return u', '.join([target.target for target in self.targets.all()]) - - def duplicate_fields_lbl(self): - return u', '.join([dp.field_name - for dp in self.duplicate_fields.all()]) - - -class ImporterDuplicateField(models.Model): - """ - Direct copy of result in other fields - """ - column = models.ForeignKey(ImporterColumn, related_name='duplicate_fields') - field_name = models.CharField(_(u"Field name"), blank=True, null=True, - max_length=200) - force_new = models.BooleanField(_(u"Force creation of new items"), - default=False) - concat = models.BooleanField(_(u"Concatenate with existing"), - default=False) - concat_str = models.CharField(_(u"Concatenate character"), max_length=5, - blank=True, null=True) - - class Meta: - verbose_name = _(u"Importer - Duplicate field") - verbose_name_plural = _(u"Importer - Duplicate fields") - - -class Regexp(models.Model): - name = models.CharField(_(u"Name"), max_length=100) - description = models.CharField(_(u"Description"), blank=True, null=True, - max_length=500) - regexp = models.CharField(_(u"Regular expression"), max_length=500) - - class Meta: - verbose_name = _(u"Importer - Regular expression") - verbose_name_plural = _(u"Importer - Regular expressions") - - def __unicode__(self): - return self.name - - -class ImportTarget(models.Model): - """ - Ishtar database target for a column - """ - column = models.ForeignKey(ImporterColumn, related_name='targets') - target = models.CharField(u"Target", max_length=500) - regexp_filter = models.ForeignKey("Regexp", blank=True, null=True) - formater_type = models.ForeignKey("FormaterType") - force_new = models.BooleanField(_(u"Force creation of new items"), - default=False) - concat = models.BooleanField(_(u"Concatenate with existing"), - default=False) - concat_str = models.CharField(_(u"Concatenate character"), max_length=5, - blank=True, null=True) - comment = models.TextField(_(u"Comment"), blank=True, null=True) - - class Meta: - verbose_name = _(u"Importer - Target") - verbose_name_plural = _(u"Importer - Targets") - - def __unicode__(self): - return self.target[:50] if self.target else self.comment - - @property - def associated_model(self): - try: - return get_associated_model( - self.column.importer_type.associated_models.klass, - self.target.split('__')) - except KeyError: - return - - def get_choices(self): - if self.formater_type.formater_type == 'UnknowType' \ - and self.column.importer_type.slug: - cls = self.column.importer_type.get_importer_class() - formt = cls().line_format[self.column.col_number - 1] - if hasattr(formt.formater, 'choices'): - return [('', '--' * 8)] + list(formt.formater.choices) - return [('', '--' * 8)] - if self.formater_type.formater_type == 'StrToBoolean': - return [('', '--' * 8), - ('True', _(u"True")), - ('False', _(u"False"))] - if not self.associated_model or not hasattr(self.associated_model, - 'get_types'): - return [] - return self.associated_model.get_types() - - -class TargetKey(models.Model): - """ - User's link between import source and ishtar database. - Also temporary used for GeneralType to point missing link before adding - them in ItemKey table. - A targetkey connection can be create to be applied to on particular - import (associated_import), one particular user (associated_user) or to all - imports (associated_import and associated_user are empty). - """ - target = models.ForeignKey(ImportTarget, related_name='keys') - key = models.TextField(_(u"Key")) - value = models.TextField(_(u"Value"), blank=True, null=True) - is_set = models.BooleanField(_(u"Is set"), default=False) - associated_import = models.ForeignKey('Import', blank=True, null=True) - associated_user = models.ForeignKey('IshtarUser', blank=True, null=True) - - class Meta: - unique_together = ('target', 'key', 'associated_user', - 'associated_import') - verbose_name = _(u"Importer - Target key") - verbose_name_plural = _(u"Importer - Targets keys") - - def __unicode__(self): - return u" - ".join([unicode(self.target), self.key[:50]]) - - def column_nb(self): - # for the admin - return self.target.column.col_number - - def importer_type(self): - # for the admin - return self.target.column.importer_type.name - - def format(self): - if not self.is_set: - return None - if self.target.formater_type.formater_type == 'StrToBoolean': - if self.value in ('False', '0'): - return False - elif self.value: - return True - return - return self.value - - def save(self, *args, **kwargs): - obj = super(TargetKey, self).save(*args, **kwargs) - if not self.value: - return obj - associated_model = self.target.associated_model - if associated_model and hasattr(self.target.associated_model, - "add_key"): - v = None - # pk is given - try: - v = self.target.associated_model.objects.get( - pk=unicode(int(self.value))) - except (ValueError, self.target.associated_model.DoesNotExist): - # try with txt_idx - try: - v = self.target.associated_model.objects.get( - txt_idx=unicode(self.value)) - except self.target.associated_model.DoesNotExist: - pass - if v: - v.add_key(self.key, importer=self.associated_import) - return obj - -TARGET_MODELS = [ - ('OrganizationType', _(u"Organization type")), - ('TitleType', _(u"Title")), - ('SourceType', _(u"Source type")), - ('AuthorType', _(u"Author type")), - ('Format', _(u"Format")), - ('archaeological_operations.models.OperationType', _(u"Operation type")), - ('archaeological_operations.models.Period', _(u"Period")), - ('archaeological_operations.models.ReportState', _(u"Report state")), - ('archaeological_operations.models.RemainType', _(u"Remain type")), - ('archaeological_context_records.models.Unit', _(u"Unit")), - ('archaeological_context_records.models.ActivityType', - _(u"Activity type")), - ('archaeological_context_records.models.DocumentationType', - _(u"Documentation type")), - ('archaeological_finds.models.MaterialType', _(u"Material")), - ('archaeological_finds.models.ConservatoryState', - _(u"Conservatory state")), - ('archaeological_warehouse.models.ContainerType', _(u"Container type")), - ('archaeological_finds.models.PreservationType', _(u"Preservation type")), - ('archaeological_finds.models.ObjectType', _(u"Object type")), - ('archaeological_finds.models.IntegrityType', _(u"Integrity type")), - ('archaeological_finds.models.RemarkabilityType', - _(u"Remarkability type")), - ('archaeological_finds.models.BatchType', _(u"Batch type")), - ('archaeological_context_records.models.IdentificationType', - _("Identification type")), - ('archaeological_context_records.models.RelationType', - _(u"Context record relation type")), - ('SpatialReferenceSystem', _(u"Spatial reference system")), - ('SupportType', _(u"Support type")), - ('TitleType', _(u"Title type")), -] - -TARGET_MODELS_KEYS = [tm[0] for tm in TARGET_MODELS] - -IMPORTER_TYPES = ( - ('IntegerFormater', _(u"Integer")), - ('FloatFormater', _(u"Float")), - ('UnicodeFormater', _(u"String")), - ('DateFormater', _(u"Date")), - ('TypeFormater', _(u"Type")), - ('YearFormater', _(u"Year")), - ('StrToBoolean', _(u"String to boolean")), - ('FileFormater', pgettext_lazy("filesystem", u"File")), - ('UnknowType', _(u"Unknow type")) -) - -IMPORTER_TYPES_DCT = { - 'IntegerFormater': IntegerFormater, - 'FloatFormater': FloatFormater, - 'UnicodeFormater': UnicodeFormater, - 'DateFormater': DateFormater, - 'TypeFormater': TypeFormater, - 'YearFormater': YearFormater, - 'StrToBoolean': StrToBoolean, - 'FileFormater': FileFormater, - 'UnknowType': None, -} - -DATE_FORMATS = ( - ('%Y', _(u"4 digit year. e.g.: \"2015\"")), - ('%Y/%m/%d', _(u"4 digit year/month/day. e.g.: \"2015/02/04\"")), - ('%d/%m/%Y', _(u"Day/month/4 digit year. e.g.: \"04/02/2015\"")), -) - -IMPORTER_TYPES_CHOICES = {'TypeFormater': TARGET_MODELS, - 'DateFormater': DATE_FORMATS} - - -class FormaterType(models.Model): - formater_type = models.CharField(u"Formater type", max_length=20, - choices=IMPORTER_TYPES) - options = models.CharField(_(u"Options"), max_length=500, blank=True, - null=True) - many_split = models.CharField(_(u"Split character(s)"), max_length=10, - blank=True, null=True) - - class Meta: - verbose_name = _(u"Importer - Formater type") - verbose_name_plural = _(u"Importer - Formater types") - unique_together = ('formater_type', 'options', 'many_split') - ordering = ('formater_type', 'options') - - def __unicode__(self): - return u" - ".join( - [unicode(dict(IMPORTER_TYPES)[self.formater_type]) - if self.formater_type in IMPORTER_TYPES_DCT else ''] + - [getattr(self, k) for k in ('options', 'many_split') - if getattr(self, k)]) - - def get_choices(self): - if self.format_type in IMPORTER_TYPES_CHOICES: - return IMPORTER_TYPES_CHOICES[self.format_type] - - def get_formater_type(self, target, import_instance=None): - if self.formater_type not in IMPORTER_TYPES_DCT.keys(): - return - kwargs = {'db_target': target, 'import_instance': import_instance} - if self.many_split: - kwargs['many_split'] = self.many_split - if self.formater_type == 'TypeFormater': - if self.options not in TARGET_MODELS_KEYS: - logger.warning( - "**WARN FormaterType.get_formater_type**: {} " - "is not in TARGET_MODELS_KEYS".format(self.options)) - return - model = None - if self.options in dir(): - model = dir()[self.options] - else: - model = import_class(self.options) - return TypeFormater(model, **kwargs) - elif self.formater_type == 'UnicodeFormater': - if self.options: - try: - return UnicodeFormater(int(self.options.strip()), **kwargs) - except ValueError: - pass - return UnicodeFormater(**kwargs) - elif self.formater_type == 'DateFormater': - date_formats = self.options - if self.many_split: - date_formats = self.options.split(kwargs.pop('many_split')) - return DateFormater(date_formats, **kwargs) - elif self.formater_type == 'StrToBoolean': - return StrToBoolean(**kwargs) - elif self.formater_type == 'UnknowType': - return - else: - return IMPORTER_TYPES_DCT[self.formater_type](**kwargs) - -IMPORT_STATE = (("C", _(u"Created")), - ("AP", _(u"Analyse in progress")), - ("A", _(u"Analysed")), - ("P", _(u"Import pending")), - ("IP", _(u"Import in progress")), - ("FE", _(u"Finished with errors")), - ("F", _(u"Finished")), - ("AC", _(u"Archived")), - ) - -IMPORT_STATE_DCT = dict(IMPORT_STATE) -ENCODINGS = [(settings.ENCODING, settings.ENCODING), - (settings.ALT_ENCODING, settings.ALT_ENCODING), - ('utf-8', 'utf-8')] - - -class Import(models.Model): - user = models.ForeignKey('IshtarUser') - name = models.CharField(_(u"Name"), max_length=500, - blank=True, null=True) - importer_type = models.ForeignKey(ImporterType) - imported_file = models.FileField( - _(u"Imported file"), upload_to="upload/imports/", max_length=220) - imported_images = models.FileField( - _(u"Associated images (zip file)"), upload_to="upload/imports/", - blank=True, null=True, max_length=220) - encoding = models.CharField(_(u"Encoding"), choices=ENCODINGS, - default='utf-8', max_length=15) - skip_lines = models.IntegerField(_(u"Skip lines"), default=1) - error_file = models.FileField(_(u"Error file"), - upload_to="upload/imports/", - blank=True, null=True, max_length=255) - result_file = models.FileField(_(u"Result file"), - upload_to="upload/imports/", - blank=True, null=True, max_length=255) - match_file = models.FileField(_(u"Match file"), - upload_to="upload/imports/", - blank=True, null=True, max_length=255) - state = models.CharField(_(u"State"), max_length=2, choices=IMPORT_STATE, - default='C') - conservative_import = models.BooleanField( - _(u"Conservative import"), default=False, - help_text='If set to true, do not overload existing values') - creation_date = models.DateTimeField( - _(u"Creation date"), auto_now_add=True, blank=True, null=True) - end_date = models.DateTimeField(_(u"End date"), blank=True, - null=True, editable=False) - seconds_remaining = models.IntegerField( - _(u"Remaining seconds"), blank=True, null=True, editable=False) - - class Meta: - verbose_name = _(u"Import") - verbose_name_plural = _(u"Imports") - - def __unicode__(self): - return u"{} | {}".format(self.name or u"-", self.importer_type) - - def need_matching(self): - return bool(TargetKey.objects.filter(associated_import=self, - is_set=False).count()) - - @property - def errors(self): - if not self.error_file: - return [] - errors = [] - with open(self.error_file.path, 'rb') as csvfile: - reader = csv.DictReader(csvfile, fieldnames=['line', 'column', - 'error']) - reader.next() # pass the header - for row in reader: - errors.append(row) - return errors - - def get_actions(self): - """ - Get available action relevant with the current status - """ - actions = [] - if self.state == 'C': - actions.append(('A', _(u"Analyse"))) - if self.state == 'A': - actions.append(('A', _(u"Re-analyse"))) - actions.append(('I', _(u"Launch import"))) - if self.state in ('F', 'FE'): - actions.append(('A', _(u"Re-analyse"))) - actions.append(('I', _(u"Re-import"))) - actions.append(('AC', _(u"Archive"))) - if self.state == 'AC': - actions.append(('A', _(u"Unarchive"))) - actions.append(('D', _(u"Delete"))) - return actions - - @property - def imported_filename(self): - return self.imported_file.name.split(os.sep)[-1] - - @property - def status(self): - if self.state not in IMPORT_STATE_DCT: - return "" - return IMPORT_STATE_DCT[self.state] - - def get_importer_instance(self): - return self.importer_type.get_importer_class(import_instance=self)( - skip_lines=self.skip_lines, import_instance=self, - conservative_import=self.conservative_import) - - @property - def data_table(self): - imported_file = self.imported_file.path - tmpdir = None - if zipfile.is_zipfile(imported_file): - z = zipfile.ZipFile(imported_file) - filename = None - for name in z.namelist(): - # get first CSV file found - if name.endswith('.csv'): - filename = name - break - if not filename: - return [] - tmpdir = tempfile.mkdtemp(prefix='tmp-ishtar-') - imported_file = z.extract(filename, tmpdir) - - encodings = [self.encoding] - encodings += [coding for coding, c in ENCODINGS - if coding != self.encoding] - for encoding in encodings: - try: - with open(imported_file) as csv_file: - vals = [line - for line in unicodecsv.reader(csv_file, - encoding=encoding)] - if tmpdir: - shutil.rmtree(tmpdir) - return vals - except UnicodeDecodeError: - pass # try the next encoding - if tmpdir: - shutil.rmtree(tmpdir) - return [] - - def initialize(self): - self.state = 'AP' - self.save() - self.get_importer_instance().initialize(self.data_table, output='db') - self.state = 'A' - self.save() - - def importation(self): - self.state = 'IP' - self.save() - importer = self.get_importer_instance() - importer.importation(self.data_table) - # result file - filename = slugify(self.importer_type.name) - now = datetime.datetime.now().isoformat('-').replace(':', '') - result_file = filename + "_result_%s.csv" % now - result_file = os.sep.join([self.result_file.storage.location, - result_file]) - with open(result_file, 'w') as fle: - fle.write(importer.get_csv_result().encode('utf-8')) - self.result_file = File(open(fle.name)) - if importer.errors: - self.state = 'FE' - error_file = filename + "_errors_%s.csv" % now - error_file = os.sep.join([self.error_file.storage.location, - error_file]) - with open(error_file, 'w') as fle: - fle.write(importer.get_csv_errors().encode('utf-8')) - self.error_file = File(open(fle.name)) - else: - self.state = 'F' - self.error_file = None - if importer.match_table: - match_file = filename + "_match_%s.csv" % now - match_file = os.sep.join([self.match_file.storage.location, - match_file]) - with open(match_file, 'w') as fle: - fle.write(importer.get_csv_matches().encode('utf-8')) - self.match_file = File(open(fle.name)) - self.save() - - def archive(self): - self.state = 'AC' - self.save() - - def get_all_imported(self): - imported = [] - for related, zorg in \ - self._meta.get_all_related_m2m_objects_with_model(): - accessor = related.get_accessor_name() - imported += [(accessor, obj) - for obj in getattr(self, accessor).all()] - return imported - - -def pre_delete_import(sender, **kwargs): - # deleted imported items when an import is delete - instance = kwargs.get('instance') - if not instance: - return - to_delete = [] - for accessor, imported in instance.get_all_imported(): - to_delete.append(imported) - for item in to_delete: - item.delete() - - -pre_delete.connect(pre_delete_import, sender=Import) - class Organization(Address, Merge, OwnPerms, ValueGetter): TABLE_COLS = ('name', 'organization_type', 'town') @@ -2572,13 +1876,11 @@ class Organization(Address, Merge, OwnPerms, ValueGetter): verbose_name = _(u"Organization") verbose_name_plural = _(u"Organizations") permissions = ( - ("view_organization", ugettext(u"Can view all Organizations")), - ("view_own_organization", ugettext(u"Can view own Organization")), - ("add_own_organization", ugettext(u"Can add own Organization")), - ("change_own_organization", - ugettext(u"Can change own Organization")), - ("delete_own_organization", - ugettext(u"Can delete own Organization")), + ("view_organization", u"Can view all Organizations"), + ("view_own_organization", u"Can view own Organization"), + ("add_own_organization", u"Can add own Organization"), + ("change_own_organization", u"Can change own Organization"), + ("delete_own_organization", u"Can delete own Organization"), ) def simple_lbl(self): @@ -2614,7 +1916,7 @@ class Organization(Address, Merge, OwnPerms, ValueGetter): class PersonType(GeneralType): # rights = models.ManyToManyField(WizardStep, verbose_name=_(u"Rights")) groups = models.ManyToManyField(Group, verbose_name=_(u"Groups"), - blank=True, null=True) + blank=True) class Meta: verbose_name = _(u"Person type") @@ -2689,11 +1991,11 @@ class Person(Address, Merge, OwnPerms, ValueGetter): verbose_name = _(u"Person") verbose_name_plural = _(u"Persons") permissions = ( - ("view_person", ugettext(u"Can view all Persons")), - ("view_own_person", ugettext(u"Can view own Person")), - ("add_own_person", ugettext(u"Can add own Person")), - ("change_own_person", ugettext(u"Can change own Person")), - ("delete_own_person", ugettext(u"Can delete own Person")), + ("view_person", u"Can view all Persons"), + ("view_own_person", u"Can view own Person"), + ("add_own_person", u"Can add own Person"), + ("change_own_person", u"Can change own Person"), + ("delete_own_person", u"Can delete own Person"), ) @property @@ -2781,24 +2083,24 @@ class Person(Address, Merge, OwnPerms, ValueGetter): txt_idx__in=right_name).count()) or \ bool(self.person_types.filter( groups__permissions__codename__in=right_name).count()) or\ - bool(self.ishtaruser.filter( - groups__permissions__codename__in=right_name + bool(self.ishtaruser.user_ptr.groups.filter( + permissions__codename__in=right_name ).count()) or\ - bool(self.ishtaruser.filter( - user_permissions__codename__in=right_name).count()) + bool(self.ishtaruser.user_ptr.user_permissions.filter( + codename__in=right_name).count()) # or self.person_types.filter(wizard__url_name__in=right_name).count()) else: - res = bool(self.person_types.filter(txt_idx=right_name).count()) or \ + res = bool(self.person_types.filter(txt_idx=right_name).count()) or\ bool(self.person_types.filter( groups__permissions__codename=right_name).count()) or \ - bool(self.ishtaruser.filter( - groups__permissions__codename__in=[right_name] - ).count()) or\ - bool(self.ishtaruser.filter( - user_permissions__codename__in=[right_name]).count()) + bool(self.ishtaruser.user_ptr.groups.filter( + permissions__codename__in=[right_name] + ).count()) or \ + bool(self.ishtaruser.user_ptr.user_permissions.filter( + codename__in=[right_name]).count()) # or self.person_types.filter(wizard__url_name=right_name).count()) if session: - cache.set(cache_key, res, settings.CACHE_SMALLTIMEOUT) + cache.set(cache_key, res, settings.CACHE_TIMEOUT) return res def full_label(self): @@ -2862,7 +2164,7 @@ class Person(Address, Merge, OwnPerms, ValueGetter): =user.ishtaruser) -class IshtarUser(User): +class IshtarUser(models.Model): TABLE_COLS = ('username', 'person__name', 'person__surname', 'person__email', 'person__person_types_list', 'person__attached_to') @@ -2879,8 +2181,10 @@ class IshtarUser(User): } # fields - person = models.ForeignKey(Person, verbose_name=_(u"Person"), unique=True, - related_name='ishtaruser') + user_ptr = models.OneToOneField(User, primary_key=True, + related_name='ishtaruser') + person = models.OneToOneField(Person, verbose_name=_(u"Person"), + related_name='ishtaruser') advanced_shortcut_menu = models.BooleanField( _(u"Advanced shortcut menu"), default=False) @@ -2888,6 +2192,23 @@ class IshtarUser(User): verbose_name = _(u"Ishtar user") verbose_name_plural = _(u"Ishtar users") + def __unicode__(self): + return unicode(self.person) + + @classmethod + def set_superuser(cls, user): + q = cls.objects.filter(user_ptr=user) + if not q.count(): + return + ishtaruser = q.all()[0] + admin, created = PersonType.objects.get_or_create( + txt_idx='administrator') + person = ishtaruser.person + if user.is_superuser: + person.person_types.add(admin) + elif admin in person.person_types.all(): + person.person_types.remove(admin) + @classmethod def create_from_user(cls, user): default = user.username @@ -2897,13 +2218,7 @@ class IshtarUser(User): person = Person.objects.create(surname=surname, name=name, email=email, history_modifier=user) - if user.is_superuser: - person_type, created = PersonType.objects.get_or_create( - txt_idx='administrator') - person.person_types.add(person_type) - password = user.password - isht_user = IshtarUser.objects.create( - user_ptr=user, username=default, person=person, password=password) + isht_user = cls.objects.create(user_ptr=user, person=person) return isht_user def has_right(self, right_name, session=None): @@ -2914,19 +2229,48 @@ class IshtarUser(User): def has_perm(self, perm, model=None, session=None, obj=None): if not session: - return super(IshtarUser, self).has_perm(perm, model) + return self.user_ptr.has_perm(perm, model) cache_key = 'usersession-{}-{}-{}-{}'.format( session.session_key, perm, model.__name__ if model else 'no', obj.pk if obj else 'no') res = cache.get(cache_key) if res in (True, False): return res - res = super(IshtarUser, self).has_perm(perm, model) + res = self.user_ptr.has_perm(perm, model) cache.set(cache_key, res, settings.CACHE_SMALLTIMEOUT) return res -IshtarUser._meta.get_field('password').help_text = _( - u"To modify the password use the form in Auth > User") + +class Basket(models.Model): + """ + Abstract class for a basket + Subclass must be defined with an "items" ManyToManyField + """ + IS_BASKET = True + label = models.CharField(_(u"Label"), max_length=1000) + comment = models.TextField(_(u"Comment"), blank=True, null=True) + user = models.ForeignKey(IshtarUser, blank=True, null=True) + available = models.BooleanField(_(u"Available"), default=True) + + class Meta: + abstract = True + unique_together = (('label', 'user'),) + + def __unicode__(self): + return self.label + + @property + def cached_label(self): + return unicode(self) + + @classmethod + def get_short_menu_class(cls, pk): + return 'basket' + + @property + def associated_filename(self): + return "{}-{}".format(datetime.date.today().strftime( + "%Y-%m-%d"), slugify(self.label)) class AuthorType(GeneralType): @@ -2950,16 +2294,11 @@ class Author(models.Model): verbose_name_plural = _(u"Authors") ordering = ('author_type__order', 'person__name') permissions = ( - ("view_author", - ugettext(u"Can view all Authors")), - ("view_own_author", - ugettext(u"Can view own Author")), - ("add_own_author", - ugettext(u"Can add own Author")), - ("change_own_author", - ugettext(u"Can change own Author")), - ("delete_own_author", - ugettext(u"Can delete own Author")), + ("view_author", u"Can view all Authors"), + ("view_own_author", u"Can view own Author"), + ("add_own_author", u"Can add own Author"), + ("change_own_author", u"Can change own Author"), + ("delete_own_author", u"Can delete own Author"), ) def __unicode__(self): @@ -3017,7 +2356,7 @@ class Source(OwnPerms, ImageModel, models.Model): authors = models.ManyToManyField(Author, verbose_name=_(u"Authors"), related_name="%(class)s_related") associated_url = models.URLField( - verify_exists=False, blank=True, null=True, + blank=True, null=True, verbose_name=_(u"Numerical ressource (web address)")) receipt_date = models.DateField(blank=True, null=True, verbose_name=_(u"Receipt date")) @@ -3038,7 +2377,6 @@ class Source(OwnPerms, ImageModel, models.Model): duplicate = models.BooleanField(_(u"Has a duplicate"), default=False) TABLE_COLS = ['title', 'source_type', 'authors', 'associated_url'] COL_LINK = ['associated_url'] - IMAGE_PREFIX = 'sources' class Meta: abstract = True @@ -3046,6 +2384,13 @@ class Source(OwnPerms, ImageModel, models.Model): def __unicode__(self): return self.title + def get_associated_operation(self): + raise NotImplementedError() + + def _get_base_image_path(self): + base = self.owner._get_base_image_path() + return u"{}/sources".format(base) + @property def associated_filename(self): values = [unicode(getattr(self, attr)) @@ -3156,7 +2501,7 @@ post_delete.connect(post_save_cache, sender=OperationType) class SpatialReferenceSystem(GeneralType): order = models.IntegerField(_(u"Order"), default=10) auth_name = models.CharField( - _(u"Authority name"), default='EPSG', max_length=256) + _(u"Authority name"), default=u'EPSG', max_length=256) srid = models.IntegerField(_(u"Authority SRID")) class Meta: diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py new file mode 100644 index 000000000..d638c76f1 --- /dev/null +++ b/ishtar_common/models_imports.py @@ -0,0 +1,910 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# See the file COPYING for details. + +import csv +import datetime +from importlib import import_module +import os +import logging +import shutil +import re +import tempfile +import unicodecsv +import zipfile + +from django.conf import settings +from django.contrib.gis.db import models +from django.core.exceptions import SuspiciousOperation +from django.core.files.base import ContentFile +from django.db.models.base import ModelBase +from django.db.models.signals import pre_delete +from django.template.defaultfilters import slugify +from django.utils.translation import ugettext_lazy as _, pgettext_lazy + +from ishtar_common.utils import create_slug, \ + get_all_related_m2m_objects_with_model +from ishtar_common.data_importer import Importer, ImportFormater, \ + IntegerFormater, FloatFormater, UnicodeFormater, DateFormater, \ + TypeFormater, YearFormater, StrToBoolean, FileFormater + +logger = logging.getLogger(__name__) + +IMPORTER_CLASSES = {} + +IMPORTER_CLASSES.update({ + 'sra-pdl-files': + 'archaeological_files.data_importer.FileImporterSraPdL'}) + + +def get_model_fields(model): + """ + Return a dict of fields from model + To be replace in Django 1.8 with get_fields, get_field + """ + fields = {} + options = model._meta + for field in sorted(options.fields + options.many_to_many): + fields[field.name] = field + if hasattr(model, 'get_extra_fields'): + fields.update(model.get_extra_fields()) + return fields + + +def import_class(full_path_classname): + """ + Return the model class from the full path + TODO: add a white list for more security + """ + mods = full_path_classname.split('.') + if len(mods) == 1: + mods = ['ishtar_common', 'models', mods[0]] + elif 'models' not in mods and 'models_finds' not in mods \ + and 'models_treatments' not in mods: + raise SuspiciousOperation( + u"Try to import a non model from a string") + module = import_module('.'.join(mods[:-1])) + return getattr(module, mods[-1]) + + +class ImportModelManager(models.Manager): + def get_by_natural_key(self, klass): + return self.get(klass=klass) + + +class ImporterModel(models.Model): + name = models.CharField(_(u"Name"), max_length=200) + klass = models.CharField(_(u"Class name"), max_length=200, unique=True) + objects = ImportModelManager() + + class Meta: + verbose_name = _(u"Importer - Model") + verbose_name_plural = _(u"Importer - Models") + ordering = ('name',) + + def __unicode__(self): + return self.name + + def natural_key(self): + return (self.klass, ) + + +class ImporterTypeManager(models.Manager): + def get_by_natural_key(self, slug): + return self.get(slug=slug) + + +class ImporterType(models.Model): + """ + Description of a table to be mapped with ishtar database + """ + name = models.CharField(_(u"Name"), blank=True, null=True, + max_length=100) + slug = models.SlugField(_(u"Slug"), unique=True, max_length=100, + blank=True, null=True) + description = models.CharField(_(u"Description"), blank=True, null=True, + max_length=500) + users = models.ManyToManyField('IshtarUser', verbose_name=_(u"Users"), + blank=True) + associated_models = models.ForeignKey( + ImporterModel, verbose_name=_(u"Associated model"), + related_name='+', blank=True, null=True) + created_models = models.ManyToManyField( + ImporterModel, verbose_name=_(u"Models that can accept new items"), + blank=True, help_text=_(u"Leave blank for no restrictions"), + related_name='+') + is_template = models.BooleanField(_(u"Is template"), default=False) + unicity_keys = models.CharField(_(u"Unicity keys (separator \";\")"), + blank=True, null=True, max_length=500) + objects = ImporterTypeManager() + + class Meta: + verbose_name = _(u"Importer - Type") + verbose_name_plural = _(u"Importer - Types") + ordering = ('name',) + + def natural_key(self): + return (self.slug, ) + + def __unicode__(self): + return self.name + + def get_importer_class(self, import_instance=None): + if self.slug and self.slug in IMPORTER_CLASSES: + cls = import_class(IMPORTER_CLASSES[self.slug]) + return cls + OBJECT_CLS = import_class(self.associated_models.klass) + DEFAULTS = dict([(default.keys, default.values) + for default in self.defaults.all()]) + LINE_FORMAT = [] + idx = 0 + for column in self.columns.order_by('col_number').all(): + idx += 1 + while column.col_number > idx: + LINE_FORMAT.append(None) + idx += 1 + targets = [] + formater_types = [] + nb = column.targets.count() + if not nb: + LINE_FORMAT.append(None) + continue + force_news = [] + concat_str = [] + for target in column.targets.all(): + ft = target.formater_type.get_formater_type( + target, import_instance=import_instance) + if not ft: + continue + formater_types.append(ft) + targets.append(target.target) + concat_str.append(target.concat_str) + force_news.append(target.force_new) + formater_kwargs = {} + if column.regexp_pre_filter: + formater_kwargs['regexp'] = re.compile( + column.regexp_pre_filter.regexp) + formater_kwargs['concat_str'] = concat_str + formater_kwargs['duplicate_fields'] = [ + (field.field_name, field.force_new, field.concat, + field.concat_str) + for field in column.duplicate_fields.all()] + formater_kwargs['label'] = column.label + formater_kwargs['required'] = column.required + formater_kwargs['force_new'] = force_news + if column.export_field_name: + formater_kwargs['export_field_name'] = [ + column.export_field_name] + formater = ImportFormater(targets, formater_types, + **formater_kwargs) + LINE_FORMAT.append(formater) + UNICITY_KEYS = [] + if self.unicity_keys: + UNICITY_KEYS = [un.strip() for un in self.unicity_keys.split(';')] + MODEL_CREATION_LIMIT = [] + for modls in self.created_models.all(): + MODEL_CREATION_LIMIT.append(import_class(modls.klass)) + args = {'OBJECT_CLS': OBJECT_CLS, 'DESC': self.description, + 'DEFAULTS': DEFAULTS, 'LINE_FORMAT': LINE_FORMAT, + 'UNICITY_KEYS': UNICITY_KEYS, + 'MODEL_CREATION_LIMIT': MODEL_CREATION_LIMIT} + name = str(''.join( + x for x in slugify(self.name).replace('-', ' ').title() + if not x.isspace())) + newclass = type(name, (Importer,), args) + return newclass + + def save(self, *args, **kwargs): + if not self.slug: + self.slug = create_slug(ImporterType, self.name) + return super(ImporterType, self).save(*args, **kwargs) + + +def get_associated_model(parent_model, keys): + model = None + if isinstance(parent_model, unicode) or \ + isinstance(parent_model, str): + OBJECT_CLS = import_class(parent_model) + else: + OBJECT_CLS = parent_model + for idx, item in enumerate(keys): + if not idx: + field = get_model_fields(OBJECT_CLS)[item] + if hasattr(field, 'rel') and hasattr(field.rel, 'to'): + model = field.rel.to + if type(field) == ModelBase: + model = field + else: + return get_associated_model(model, keys[1:]) + return model + + +class ImporterDefaultManager(models.Manager): + def get_by_natural_key(self, importer_type, target): + return self.get(importer_type__slug=importer_type, target=target) + + +class ImporterDefault(models.Model): + """ + Targets of default values in an import + """ + importer_type = models.ForeignKey(ImporterType, related_name='defaults') + target = models.CharField(u"Target", max_length=500) + + class Meta: + verbose_name = _(u"Importer - Default") + verbose_name_plural = _(u"Importer - Defaults") + unique_together = ('importer_type', 'target') + objects = ImporterDefaultManager() + + def __unicode__(self): + return u"{} - {}".format(self.importer_type, self.target) + + def natural_key(self): + return self.importer_type.slug, self.target + + @property + def keys(self): + return tuple(self.target.split('__')) + + @property + def associated_model(self): + return get_associated_model(self.importer_type.associated_models.klass, + self.keys) + + @property + def values(self): + values = {} + for default_value in self.default_values.all(): + values[default_value.target] = default_value.get_value() + return values + + +class ImporterDefaultValuesManager(models.Manager): + def get_by_natural_key(self, def_target_type, def_target, target): + return self.get(default_target__importer_type__slug=def_target_type, + default_target__target=def_target, + target=target) + + +class ImporterDefaultValues(models.Model): + """ + Default values in an import + """ + default_target = models.ForeignKey(ImporterDefault, + related_name='default_values') + target = models.CharField(u"Target", max_length=500) + value = models.CharField(u"Value", max_length=500) + objects = ImporterDefaultValuesManager() + + class Meta: + verbose_name = _(u"Importer - Default value") + verbose_name_plural = _(u"Importer - Default values") + unique_together = ('default_target', 'target') + + def natural_key(self): + return (self.default_target.importer_type.slug, + self.default_target.target, + self.target) + + def __unicode__(self): + return u"{} - {}".format(self.default_target, self.target, self.value) + + def get_value(self): + parent_model = self.default_target.associated_model + if not parent_model: + return self.value + fields = get_model_fields(parent_model) + target = self.target.strip() + if target not in fields: + return + field = fields[target] + if not hasattr(field, 'rel') or not hasattr(field.rel, 'to'): + return + model = field.rel.to + # if value is an id + try: + return model.objects.get(pk=int(self.value)) + except (ValueError, model.DoesNotExist): + pass + # try with txt_idx + try: + return model.objects.get(txt_idx=self.value) + except (ValueError, model.DoesNotExist): + pass + return "" + + +class ImporterColumnManager(models.Manager): + def get_by_natural_key(self, importer_type, col_number): + return self.get(importer_type__slug=importer_type, + col_number=col_number) + + +class ImporterColumn(models.Model): + """ + Import file column description + """ + label = models.CharField(_(u"Label"), blank=True, null=True, + max_length=200) + importer_type = models.ForeignKey(ImporterType, related_name='columns') + col_number = models.IntegerField(_(u"Column number"), default=1) + description = models.TextField(_("Description"), blank=True, null=True) + regexp_pre_filter = models.ForeignKey("Regexp", blank=True, null=True) + required = models.BooleanField(_(u"Required"), default=False) + export_field_name = models.CharField( + _(u"Export field name"), blank=True, null=True, max_length=200, + help_text=_(u"Fill this field if the field name is ambiguous for " + u"export. For instance: concatenated fields.") + ) + objects = ImporterColumnManager() + + class Meta: + verbose_name = _(u"Importer - Column") + verbose_name_plural = _(u"Importer - Columns") + ordering = ('importer_type', 'col_number') + unique_together = ('importer_type', 'col_number') + + def __unicode__(self): + return u"{} - {}".format(self.importer_type, self.col_number) + + def natural_key(self): + return self.importer_type.slug, self.col_number + + def targets_lbl(self): + return u', '.join([target.target for target in self.targets.all()]) + + def duplicate_fields_lbl(self): + return u', '.join([dp.field_name + for dp in self.duplicate_fields.all()]) + + +class ImporterDuplicateFieldManager(models.Manager): + def get_by_natural_key(self, importer_type, col_number, field_name): + return self.get(column__importer_type__slug=importer_type, + column__col_number=col_number, + field_name=field_name) + + +class ImporterDuplicateField(models.Model): + """ + Direct copy of result in other fields + """ + column = models.ForeignKey(ImporterColumn, related_name='duplicate_fields') + field_name = models.CharField(_(u"Field name"), blank=True, null=True, + max_length=200) + force_new = models.BooleanField(_(u"Force creation of new items"), + default=False) + concat = models.BooleanField(_(u"Concatenate with existing"), + default=False) + concat_str = models.CharField(_(u"Concatenate character"), max_length=5, + blank=True, null=True) + objects = ImporterDuplicateFieldManager() + + class Meta: + verbose_name = _(u"Importer - Duplicate field") + verbose_name_plural = _(u"Importer - Duplicate fields") + ordering = ('column', 'field_name') + unique_together = ('column', 'field_name') + + def natural_key(self): + return self.column.importer_type, self.column.col_number, \ + self.field_name + + +class NamedManager(models.Manager): + def get_by_natural_key(self, name): + return self.get(name=name) + + +class Regexp(models.Model): + name = models.CharField(_(u"Name"), max_length=100, unique=True) + description = models.CharField(_(u"Description"), blank=True, null=True, + max_length=500) + regexp = models.CharField(_(u"Regular expression"), max_length=500) + objects = NamedManager() + + class Meta: + verbose_name = _(u"Importer - Regular expression") + verbose_name_plural = _(u"Importer - Regular expressions") + + def __unicode__(self): + return self.name + + def natural_key(self): + return (self.name, ) + + +class ImportTargetManager(models.Manager): + def get_by_natural_key(self, importer_type, col_number, target): + return self.get(column__importer_type__slug=importer_type, + column__col_number=col_number, + target=target) + + +class ImportTarget(models.Model): + """ + Ishtar database target for a column + """ + column = models.ForeignKey(ImporterColumn, related_name='targets') + target = models.CharField(u"Target", max_length=500) + regexp_filter = models.ForeignKey("Regexp", blank=True, null=True) + formater_type = models.ForeignKey("FormaterType") + force_new = models.BooleanField(_(u"Force creation of new items"), + default=False) + concat = models.BooleanField(_(u"Concatenate with existing"), + default=False) + concat_str = models.CharField(_(u"Concatenate character"), max_length=5, + blank=True, null=True) + comment = models.TextField(_(u"Comment"), blank=True, null=True) + objects = ImportTargetManager() + + class Meta: + verbose_name = _(u"Importer - Target") + verbose_name_plural = _(u"Importer - Targets") + unique_together = ('column', 'target') + + def __unicode__(self): + return self.target[:50] if self.target else self.comment + + def natural_key(self): + return self.column.importer_type.slug, self.column.col_number, \ + self.target + + @property + def associated_model(self): + try: + return get_associated_model( + self.column.importer_type.associated_models.klass, + self.target.split('__')) + except KeyError: + return + + def get_choices(self): + if self.formater_type.formater_type == 'UnknowType' \ + and self.column.importer_type.slug: + cls = self.column.importer_type.get_importer_class() + formt = cls().line_format[self.column.col_number - 1] + if hasattr(formt.formater, 'choices'): + return [('', '--' * 8)] + list(formt.formater.choices) + return [('', '--' * 8)] + if self.formater_type.formater_type == 'StrToBoolean': + return [('', '--' * 8), + ('True', _(u"True")), + ('False', _(u"False"))] + if not self.associated_model or not hasattr(self.associated_model, + 'get_types'): + return [] + return self.associated_model.get_types() + + +class TargetKey(models.Model): + """ + User's link between import source and ishtar database. + Also temporary used for GeneralType to point missing link before adding + them in ItemKey table. + A targetkey connection can be create to be applied to on particular + import (associated_import), one particular user (associated_user) or to all + imports (associated_import and associated_user are empty). + """ + target = models.ForeignKey(ImportTarget, related_name='keys') + key = models.TextField(_(u"Key")) + value = models.TextField(_(u"Value"), blank=True, null=True) + is_set = models.BooleanField(_(u"Is set"), default=False) + associated_import = models.ForeignKey('Import', blank=True, null=True) + associated_user = models.ForeignKey('IshtarUser', blank=True, null=True) + + class Meta: + unique_together = ('target', 'key', 'associated_user', + 'associated_import') + verbose_name = _(u"Importer - Target key") + verbose_name_plural = _(u"Importer - Targets keys") + + def __unicode__(self): + return u" - ".join([unicode(self.target), self.key[:50]]) + + def column_nb(self): + # for the admin + return self.target.column.col_number + + def importer_type(self): + # for the admin + return self.target.column.importer_type.name + + def format(self): + if not self.is_set: + return None + if self.target.formater_type.formater_type == 'StrToBoolean': + if self.value in ('False', '0'): + return False + elif self.value: + return True + return + return self.value + + def save(self, *args, **kwargs): + obj = super(TargetKey, self).save(*args, **kwargs) + if not self.value: + return obj + associated_model = self.target.associated_model + if associated_model and hasattr(self.target.associated_model, + "add_key"): + v = None + # pk is given + try: + v = self.target.associated_model.objects.get( + pk=unicode(int(self.value))) + except (ValueError, self.target.associated_model.DoesNotExist): + # try with txt_idx + try: + v = self.target.associated_model.objects.get( + txt_idx=unicode(self.value)) + except self.target.associated_model.DoesNotExist: + pass + if v: + v.add_key(self.key, importer=self.associated_import) + return obj + +TARGET_MODELS = [ + ('OrganizationType', _(u"Organization type")), + ('TitleType', _(u"Title")), + ('SourceType', _(u"Source type")), + ('AuthorType', _(u"Author type")), + ('Format', _(u"Format")), + ('archaeological_operations.models.OperationType', _(u"Operation type")), + ('archaeological_operations.models.Period', _(u"Period")), + ('archaeological_operations.models.ReportState', _(u"Report state")), + ('archaeological_operations.models.RemainType', _(u"Remain type")), + ('archaeological_context_records.models.Unit', _(u"Unit")), + ('archaeological_context_records.models.ActivityType', + _(u"Activity type")), + ('archaeological_context_records.models.DocumentationType', + _(u"Documentation type")), + ('archaeological_finds.models.MaterialType', _(u"Material")), + ('archaeological_finds.models.ConservatoryState', + _(u"Conservatory state")), + ('archaeological_warehouse.models.ContainerType', _(u"Container type")), + ('archaeological_finds.models.PreservationType', _(u"Preservation type")), + ('archaeological_finds.models.ObjectType', _(u"Object type")), + ('archaeological_finds.models.IntegrityType', _(u"Integrity type")), + ('archaeological_finds.models.RemarkabilityType', + _(u"Remarkability type")), + ('archaeological_finds.models.BatchType', _(u"Batch type")), + ('archaeological_context_records.models.IdentificationType', + _("Identification type")), + ('archaeological_context_records.models.RelationType', + _(u"Context record relation type")), + ('SpatialReferenceSystem', _(u"Spatial reference system")), + ('SupportType', _(u"Support type")), + ('TitleType', _(u"Title type")), +] + +TARGET_MODELS_KEYS = [tm[0] for tm in TARGET_MODELS] + +IMPORTER_TYPES = ( + ('IntegerFormater', _(u"Integer")), + ('FloatFormater', _(u"Float")), + ('UnicodeFormater', _(u"String")), + ('DateFormater', _(u"Date")), + ('TypeFormater', _(u"Type")), + ('YearFormater', _(u"Year")), + ('StrToBoolean', _(u"String to boolean")), + ('FileFormater', pgettext_lazy("filesystem", u"File")), + ('UnknowType', _(u"Unknow type")) +) + +IMPORTER_TYPES_DCT = { + 'IntegerFormater': IntegerFormater, + 'FloatFormater': FloatFormater, + 'UnicodeFormater': UnicodeFormater, + 'DateFormater': DateFormater, + 'TypeFormater': TypeFormater, + 'YearFormater': YearFormater, + 'StrToBoolean': StrToBoolean, + 'FileFormater': FileFormater, + 'UnknowType': None, +} + +DATE_FORMATS = ( + ('%Y', _(u"4 digit year. e.g.: \"2015\"")), + ('%Y/%m/%d', _(u"4 digit year/month/day. e.g.: \"2015/02/04\"")), + ('%d/%m/%Y', _(u"Day/month/4 digit year. e.g.: \"04/02/2015\"")), +) + +IMPORTER_TYPES_CHOICES = {'TypeFormater': TARGET_MODELS, + 'DateFormater': DATE_FORMATS} + + +class FormaterTypeManager(models.Manager): + def get_by_natural_key(self, formater_type, options, many_split): + return self.get(formater_type=formater_type, + options=options, many_split=many_split) + + +class FormaterType(models.Model): + formater_type = models.CharField(u"Formater type", max_length=20, + choices=IMPORTER_TYPES) + options = models.CharField(_(u"Options"), max_length=500, blank=True, + null=True) + many_split = models.CharField(_(u"Split character(s)"), max_length=10, + blank=True, null=True) + objects = FormaterTypeManager() + + class Meta: + verbose_name = _(u"Importer - Formater type") + verbose_name_plural = _(u"Importer - Formater types") + unique_together = ('formater_type', 'options', 'many_split') + ordering = ('formater_type', 'options') + + def natural_key(self): + return self.formater_type, self.options, self.many_split + + def __unicode__(self): + return u" - ".join( + [unicode(dict(IMPORTER_TYPES)[self.formater_type]) + if self.formater_type in IMPORTER_TYPES_DCT else ''] + + [getattr(self, k) for k in ('options', 'many_split') + if getattr(self, k)]) + + def get_choices(self): + if self.format_type in IMPORTER_TYPES_CHOICES: + return IMPORTER_TYPES_CHOICES[self.format_type] + + def get_formater_type(self, target, import_instance=None): + if self.formater_type not in IMPORTER_TYPES_DCT.keys(): + return + kwargs = {'db_target': target, 'import_instance': import_instance} + if self.many_split: + kwargs['many_split'] = self.many_split + if self.formater_type == 'TypeFormater': + if self.options not in TARGET_MODELS_KEYS: + logger.warning( + "**WARN FormaterType.get_formater_type**: {} " + "is not in TARGET_MODELS_KEYS".format(self.options)) + return + model = None + if self.options in dir(): + model = dir()[self.options] + else: + model = import_class(self.options) + return TypeFormater(model, **kwargs) + elif self.formater_type == 'UnicodeFormater': + if self.options: + try: + return UnicodeFormater(int(self.options.strip()), **kwargs) + except ValueError: + pass + return UnicodeFormater(**kwargs) + elif self.formater_type == 'DateFormater': + date_formats = self.options + if self.many_split: + date_formats = self.options.split(kwargs.pop('many_split')) + return DateFormater(date_formats, **kwargs) + elif self.formater_type == 'StrToBoolean': + return StrToBoolean(**kwargs) + elif self.formater_type == 'UnknowType': + return + else: + return IMPORTER_TYPES_DCT[self.formater_type](**kwargs) + +IMPORT_STATE = (("C", _(u"Created")), + ("AP", _(u"Analyse in progress")), + ("A", _(u"Analysed")), + ("P", _(u"Import pending")), + ("IP", _(u"Import in progress")), + ("FE", _(u"Finished with errors")), + ("F", _(u"Finished")), + ("AC", _(u"Archived")), + ) + +IMPORT_STATE_DCT = dict(IMPORT_STATE) +ENCODINGS = [(settings.ENCODING, settings.ENCODING), + (settings.ALT_ENCODING, settings.ALT_ENCODING), + ('utf-8', 'utf-8')] + + +class Import(models.Model): + user = models.ForeignKey('IshtarUser') + name = models.CharField(_(u"Name"), max_length=500, + blank=True, null=True) + importer_type = models.ForeignKey(ImporterType) + imported_file = models.FileField( + _(u"Imported file"), upload_to="upload/imports/%Y/%m/", max_length=220) + imported_images = models.FileField( + _(u"Associated images (zip file)"), upload_to="upload/imports/%Y/%m/", + blank=True, null=True, max_length=220) + encoding = models.CharField(_(u"Encoding"), choices=ENCODINGS, + default=u'utf-8', max_length=15) + skip_lines = models.IntegerField(_(u"Skip lines"), default=1) + error_file = models.FileField(_(u"Error file"), + upload_to="upload/imports/%Y/%m/", + blank=True, null=True, max_length=255) + result_file = models.FileField(_(u"Result file"), + upload_to="upload/imports/%Y/%m/", + blank=True, null=True, max_length=255) + match_file = models.FileField(_(u"Match file"), + upload_to="upload/imports/%Y/%m/", + blank=True, null=True, max_length=255) + state = models.CharField(_(u"State"), max_length=2, choices=IMPORT_STATE, + default=u'C') + conservative_import = models.BooleanField( + _(u"Conservative import"), default=False, + help_text='If set to true, do not overload existing values') + creation_date = models.DateTimeField( + _(u"Creation date"), auto_now_add=True, blank=True, null=True) + end_date = models.DateTimeField(_(u"End date"), blank=True, + null=True, editable=False) + seconds_remaining = models.IntegerField( + _(u"Remaining seconds"), blank=True, null=True, editable=False) + + class Meta: + verbose_name = _(u"Import") + verbose_name_plural = _(u"Imports") + + def __unicode__(self): + return u"{} | {}".format(self.name or u"-", self.importer_type) + + def need_matching(self): + return bool(TargetKey.objects.filter(associated_import=self, + is_set=False).count()) + + @property + def errors(self): + if not self.error_file: + return [] + errors = [] + with open(self.error_file.path, 'rb') as csvfile: + reader = csv.DictReader(csvfile, fieldnames=['line', 'column', + 'error']) + reader.next() # pass the header + for row in reader: + errors.append(row) + return errors + + def get_actions(self): + """ + Get available action relevant with the current status + """ + actions = [] + if self.state == 'C': + actions.append(('A', _(u"Analyse"))) + if self.state == 'A': + actions.append(('A', _(u"Re-analyse"))) + actions.append(('I', _(u"Launch import"))) + if self.state in ('F', 'FE'): + actions.append(('A', _(u"Re-analyse"))) + actions.append(('I', _(u"Re-import"))) + actions.append(('AC', _(u"Archive"))) + if self.state == 'AC': + actions.append(('A', _(u"Unarchive"))) + actions.append(('D', _(u"Delete"))) + return actions + + @property + def imported_filename(self): + return self.imported_file.name.split(os.sep)[-1] + + @property + def status(self): + if self.state not in IMPORT_STATE_DCT: + return "" + return IMPORT_STATE_DCT[self.state] + + def get_importer_instance(self): + return self.importer_type.get_importer_class(import_instance=self)( + skip_lines=self.skip_lines, import_instance=self, + conservative_import=self.conservative_import) + + @property + def data_table(self): + imported_file = self.imported_file.path + tmpdir = None + if zipfile.is_zipfile(imported_file): + z = zipfile.ZipFile(imported_file) + filename = None + for name in z.namelist(): + # get first CSV file found + if name.endswith('.csv'): + filename = name + break + if not filename: + return [] + tmpdir = tempfile.mkdtemp(prefix='tmp-ishtar-') + imported_file = z.extract(filename, tmpdir) + + encodings = [self.encoding] + encodings += [coding for coding, c in ENCODINGS + if coding != self.encoding] + for encoding in encodings: + try: + with open(imported_file) as csv_file: + vals = [line + for line in unicodecsv.reader(csv_file, + encoding=encoding)] + if tmpdir: + shutil.rmtree(tmpdir) + return vals + except UnicodeDecodeError: + pass # try the next encoding + if tmpdir: + shutil.rmtree(tmpdir) + return [] + + def initialize(self): + self.state = 'AP' + self.save() + self.get_importer_instance().initialize(self.data_table, output='db') + self.state = 'A' + self.save() + + def importation(self): + self.state = 'IP' + self.save() + importer = self.get_importer_instance() + importer.importation(self.data_table) + # result file + filename = slugify(self.importer_type.name) + now = datetime.datetime.now().isoformat('-').replace(':', '') + result_file = filename + "_result_%s.csv" % now + self.result_file.save( + result_file, ContentFile(importer.get_csv_result().encode('utf-8'))) + + if importer.errors: + self.state = 'FE' + error_file = filename + "_errors_%s.csv" % now + self.error_file.save( + error_file, + ContentFile(importer.get_csv_errors().encode('utf-8')) + ) + else: + self.state = 'F' + self.error_file = None + if importer.match_table: + match_file = filename + "_match_%s.csv" % now + self.match_file.save( + match_file, + ContentFile(importer.get_csv_matches().encode('utf-8')) + ) + self.save() + + def archive(self): + self.state = 'AC' + self.save() + + def get_all_imported(self): + imported = [] + for related, zorg in get_all_related_m2m_objects_with_model(self): + accessor = related.get_accessor_name() + imported += [(accessor, obj) + for obj in getattr(self, accessor).all()] + return imported + + +def pre_delete_import(sender, **kwargs): + # deleted imported items when an import is delete + instance = kwargs.get('instance') + if not instance: + return + to_delete = [] + for accessor, imported in instance.get_all_imported(): + to_delete.append(imported) + for item in to_delete: + item.delete() + + +pre_delete.connect(pre_delete_import, sender=Import) diff --git a/ishtar_common/old_migrations/0001_initial.py b/ishtar_common/old_migrations/0001_initial.py new file mode 100644 index 000000000..fc22881bc --- /dev/null +++ b/ishtar_common/old_migrations/0001_initial.py @@ -0,0 +1,408 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'Wizard' + db.create_table('ishtar_common_wizard', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('url_name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=128)), + )) + db.send_create_signal('ishtar_common', ['Wizard']) + + # Adding model 'WizardStep' + db.create_table('ishtar_common_wizardstep', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + ('wizard', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Wizard'])), + ('url_name', self.gf('django.db.models.fields.CharField')(max_length=128)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=128)), + )) + db.send_create_signal('ishtar_common', ['WizardStep']) + + # Adding model 'Department' + db.create_table('ishtar_common_department', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=30)), + ('number', self.gf('django.db.models.fields.CharField')(unique=True, max_length=3)), + )) + db.send_create_signal('ishtar_common', ['Department']) + + # Adding model 'OrganizationType' + db.create_table('ishtar_common_organizationtype', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + )) + db.send_create_signal('ishtar_common', ['OrganizationType']) + + # Adding model 'HistoricalOrganization' + db.create_table('ishtar_common_historicalorganization', ( + ('id', self.gf('django.db.models.fields.IntegerField')(db_index=True, blank=True)), + ('history_modifier_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('address', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('address_complement', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('postal_code', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), + ('town', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), + ('country', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), + ('phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), + ('mobile_phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('organization_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('history_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('history_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('history_user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)), + ('history_type', self.gf('django.db.models.fields.CharField')(max_length=1)), + )) + db.send_create_signal('ishtar_common', ['HistoricalOrganization']) + + # Adding model 'Organization' + db.create_table('ishtar_common_organization', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('history_modifier', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), + ('address', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('address_complement', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('postal_code', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), + ('town', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), + ('country', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), + ('phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), + ('mobile_phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('organization_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.OrganizationType'])), + )) + db.send_create_signal('ishtar_common', ['Organization']) + + # Adding model 'PersonType' + db.create_table('ishtar_common_persontype', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + )) + db.send_create_signal('ishtar_common', ['PersonType']) + + # Adding M2M table for field rights on 'PersonType' + db.create_table('ishtar_common_persontype_rights', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('persontype', models.ForeignKey(orm['ishtar_common.persontype'], null=False)), + ('wizardstep', models.ForeignKey(orm['ishtar_common.wizardstep'], null=False)) + )) + db.create_unique('ishtar_common_persontype_rights', ['persontype_id', 'wizardstep_id']) + + # Adding model 'Person' + db.create_table('ishtar_common_person', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('history_modifier', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), + ('address', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('address_complement', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('postal_code', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), + ('town', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), + ('country', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)), + ('phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), + ('mobile_phone', self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=2)), + ('surname', self.gf('django.db.models.fields.CharField')(max_length=20)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=30)), + ('email', self.gf('django.db.models.fields.CharField')(max_length=40, null=True, blank=True)), + ('person_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.PersonType'])), + ('attached_to', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Organization'], null=True, blank=True)), + )) + db.send_create_signal('ishtar_common', ['Person']) + + # Adding model 'IshtarUser' + db.create_table('ishtar_common_ishtaruser', ( + ('user_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, primary_key=True)), + ('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'], unique=True)), + )) + db.send_create_signal('ishtar_common', ['IshtarUser']) + + # Adding model 'AuthorType' + db.create_table('ishtar_common_authortype', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + )) + db.send_create_signal('ishtar_common', ['AuthorType']) + + # Adding model 'Author' + db.create_table('ishtar_common_author', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'])), + ('author_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.AuthorType'])), + )) + db.send_create_signal('ishtar_common', ['Author']) + + # Adding model 'SourceType' + db.create_table('ishtar_common_sourcetype', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + )) + db.send_create_signal('ishtar_common', ['SourceType']) + + # Adding model 'Arrondissement' + db.create_table('ishtar_common_arrondissement', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=30)), + ('department', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Department'])), + )) + db.send_create_signal('ishtar_common', ['Arrondissement']) + + # Adding model 'Canton' + db.create_table('ishtar_common_canton', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=30)), + ('arrondissement', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Arrondissement'])), + )) + db.send_create_signal('ishtar_common', ['Canton']) + + # Adding model 'Town' + db.create_table('ishtar_common_town', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('center', self.gf('django.contrib.gis.db.models.fields.PointField')(srid=27572, null=True, blank=True)), + ('numero_insee', self.gf('django.db.models.fields.CharField')(unique=True, max_length=6)), + ('departement', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Department'], null=True, blank=True)), + ('canton', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Canton'], null=True, blank=True)), + )) + db.send_create_signal('ishtar_common', ['Town']) + + + def backwards(self, orm): + # Deleting model 'Wizard' + db.delete_table('ishtar_common_wizard') + + # Deleting model 'WizardStep' + db.delete_table('ishtar_common_wizardstep') + + # Deleting model 'Department' + db.delete_table('ishtar_common_department') + + # Deleting model 'OrganizationType' + db.delete_table('ishtar_common_organizationtype') + + # Deleting model 'HistoricalOrganization' + db.delete_table('ishtar_common_historicalorganization') + + # Deleting model 'Organization' + db.delete_table('ishtar_common_organization') + + # Deleting model 'PersonType' + db.delete_table('ishtar_common_persontype') + + # Removing M2M table for field rights on 'PersonType' + db.delete_table('ishtar_common_persontype_rights') + + # Deleting model 'Person' + db.delete_table('ishtar_common_person') + + # Deleting model 'IshtarUser' + db.delete_table('ishtar_common_ishtaruser') + + # Deleting model 'AuthorType' + db.delete_table('ishtar_common_authortype') + + # Deleting model 'Author' + db.delete_table('ishtar_common_author') + + # Deleting model 'SourceType' + db.delete_table('ishtar_common_sourcetype') + + # Deleting model 'Arrondissement' + db.delete_table('ishtar_common_arrondissement') + + # Deleting model 'Canton' + db.delete_table('ishtar_common_canton') + + # Deleting model 'Town' + db.delete_table('ishtar_common_town') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'ishtar_common.arrondissement': { + 'Meta': {'object_name': 'Arrondissement'}, + 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + 'ishtar_common.author': { + 'Meta': {'object_name': 'Author'}, + 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}) + }, + 'ishtar_common.authortype': { + 'Meta': {'object_name': 'AuthorType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.canton': { + 'Meta': {'object_name': 'Canton'}, + 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + 'ishtar_common.department': { + 'Meta': {'ordering': "['number']", 'object_name': 'Department'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) + }, + 'ishtar_common.historicalorganization': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOrganization'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'organization_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.ishtaruser': { + 'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, + 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']", 'unique': 'True'}), + 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) + }, + 'ishtar_common.organization': { + 'Meta': {'object_name': 'Organization'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.organizationtype': { + 'Meta': {'object_name': 'OrganizationType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.person': { + 'Meta': {'object_name': 'Person'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'email': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'person_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.PersonType']"}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'surname': ('django.db.models.fields.CharField', [], {'max_length': '20'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '2'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.persontype': { + 'Meta': {'object_name': 'PersonType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'rights': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.WizardStep']", 'symmetrical': 'False'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.sourcetype': { + 'Meta': {'object_name': 'SourceType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.town': { + 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, + 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), + 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), + 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.wizard': { + 'Meta': {'ordering': "['url_name']", 'object_name': 'Wizard'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'url_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) + }, + 'ishtar_common.wizardstep': { + 'Meta': {'ordering': "['wizard', 'order']", 'object_name': 'WizardStep'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'url_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'wizard': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Wizard']"}) + } + } + + complete_apps = ['ishtar_common']
\ No newline at end of file diff --git a/ishtar_common/migrations/0002_auto__chg_field_person_surname.py b/ishtar_common/old_migrations/0002_auto__chg_field_person_surname.py index 105144aac..105144aac 100644 --- a/ishtar_common/migrations/0002_auto__chg_field_person_surname.py +++ b/ishtar_common/old_migrations/0002_auto__chg_field_person_surname.py diff --git a/ishtar_common/migrations/0003_auto__del_field_person_person_type.py b/ishtar_common/old_migrations/0003_auto__del_field_person_person_type.py index 369568ecc..369568ecc 100644 --- a/ishtar_common/migrations/0003_auto__del_field_person_person_type.py +++ b/ishtar_common/old_migrations/0003_auto__del_field_person_person_type.py diff --git a/ishtar_common/migrations/0004_auto.py b/ishtar_common/old_migrations/0004_auto.py index 074080757..074080757 100644 --- a/ishtar_common/migrations/0004_auto.py +++ b/ishtar_common/old_migrations/0004_auto.py diff --git a/ishtar_common/migrations/0005_auto__add_documenttemplate.py b/ishtar_common/old_migrations/0005_auto__add_documenttemplate.py index 383ee5a32..383ee5a32 100644 --- a/ishtar_common/migrations/0005_auto__add_documenttemplate.py +++ b/ishtar_common/old_migrations/0005_auto__add_documenttemplate.py diff --git a/ishtar_common/migrations/0006_auto__chg_field_organization_name__chg_field_historicalorganization_na.py b/ishtar_common/old_migrations/0006_auto__chg_field_organization_name__chg_field_historicalorganization_na.py index f852608a3..f852608a3 100644 --- a/ishtar_common/migrations/0006_auto__chg_field_organization_name__chg_field_historicalorganization_na.py +++ b/ishtar_common/old_migrations/0006_auto__chg_field_organization_name__chg_field_historicalorganization_na.py diff --git a/ishtar_common/migrations/0007_auto__add_field_organization_history_creator__add_field_historicalorga.py b/ishtar_common/old_migrations/0007_auto__add_field_organization_history_creator__add_field_historicalorga.py index 5423b758e..5423b758e 100644 --- a/ishtar_common/migrations/0007_auto__add_field_organization_history_creator__add_field_historicalorga.py +++ b/ishtar_common/old_migrations/0007_auto__add_field_organization_history_creator__add_field_historicalorga.py diff --git a/ishtar_common/migrations/0008_init_history_creator.py b/ishtar_common/old_migrations/0008_init_history_creator.py index c28292e61..c28292e61 100644 --- a/ishtar_common/migrations/0008_init_history_creator.py +++ b/ishtar_common/old_migrations/0008_init_history_creator.py diff --git a/ishtar_common/migrations/0009_auto__add_field_organization_email__add_field_historicalorganization_e.py b/ishtar_common/old_migrations/0009_auto__add_field_organization_email__add_field_historicalorganization_e.py index 1ef247b56..1ef247b56 100644 --- a/ishtar_common/migrations/0009_auto__add_field_organization_email__add_field_historicalorganization_e.py +++ b/ishtar_common/old_migrations/0009_auto__add_field_organization_email__add_field_historicalorganization_e.py diff --git a/ishtar_common/migrations/0010_auto__del_wizardstep__del_wizard__add_globalvar__chg_field_person_atta.py b/ishtar_common/old_migrations/0010_auto__del_wizardstep__del_wizard__add_globalvar__chg_field_person_atta.py index 4bba74da9..4bba74da9 100644 --- a/ishtar_common/migrations/0010_auto__del_wizardstep__del_wizard__add_globalvar__chg_field_person_atta.py +++ b/ishtar_common/old_migrations/0010_auto__del_wizardstep__del_wizard__add_globalvar__chg_field_person_atta.py diff --git a/ishtar_common/migrations/0011_auto__chg_field_person_surname__chg_field_person_name.py b/ishtar_common/old_migrations/0011_auto__chg_field_person_surname__chg_field_person_name.py index a21e00efb..a21e00efb 100644 --- a/ishtar_common/migrations/0011_auto__chg_field_person_surname__chg_field_person_name.py +++ b/ishtar_common/old_migrations/0011_auto__chg_field_person_surname__chg_field_person_name.py diff --git a/ishtar_common/migrations/0012_auto__add_field_person_raw_name__chg_field_person_name.py b/ishtar_common/old_migrations/0012_auto__add_field_person_raw_name__chg_field_person_name.py index 015956610..015956610 100644 --- a/ishtar_common/migrations/0012_auto__add_field_person_raw_name__chg_field_person_name.py +++ b/ishtar_common/old_migrations/0012_auto__add_field_person_raw_name__chg_field_person_name.py diff --git a/ishtar_common/migrations/0013_auto__add_field_organization_merge_key__add_field_historicalorganizati.py b/ishtar_common/old_migrations/0013_auto__add_field_organization_merge_key__add_field_historicalorganizati.py index b0934572d..b0934572d 100644 --- a/ishtar_common/migrations/0013_auto__add_field_organization_merge_key__add_field_historicalorganizati.py +++ b/ishtar_common/old_migrations/0013_auto__add_field_organization_merge_key__add_field_historicalorganizati.py diff --git a/ishtar_common/migrations/0014_auto__chg_field_organization_history_creator__chg_field_organization_h.py b/ishtar_common/old_migrations/0014_auto__chg_field_organization_history_creator__chg_field_organization_h.py index 86783b8fd..86783b8fd 100644 --- a/ishtar_common/migrations/0014_auto__chg_field_organization_history_creator__chg_field_organization_h.py +++ b/ishtar_common/old_migrations/0014_auto__chg_field_organization_history_creator__chg_field_organization_h.py diff --git a/ishtar_common/migrations/0015_auto__chg_field_organization_town__chg_field_historicalorganization_to.py b/ishtar_common/old_migrations/0015_auto__chg_field_organization_town__chg_field_historicalorganization_to.py index d5d1c4742..d5d1c4742 100644 --- a/ishtar_common/migrations/0015_auto__chg_field_organization_town__chg_field_historicalorganization_to.py +++ b/ishtar_common/old_migrations/0015_auto__chg_field_organization_town__chg_field_historicalorganization_to.py diff --git a/ishtar_common/migrations/0016_auto__add_import.py b/ishtar_common/old_migrations/0016_auto__add_import.py index f7d87ff13..f7d87ff13 100644 --- a/ishtar_common/migrations/0016_auto__add_import.py +++ b/ishtar_common/old_migrations/0016_auto__add_import.py diff --git a/ishtar_common/migrations/0017_auto__add_supporttype__add_format.py b/ishtar_common/old_migrations/0017_auto__add_supporttype__add_format.py index 7ce790321..7ce790321 100644 --- a/ishtar_common/migrations/0017_auto__add_supporttype__add_format.py +++ b/ishtar_common/old_migrations/0017_auto__add_supporttype__add_format.py diff --git a/ishtar_common/migrations/0018_auto__add_itemkey.py b/ishtar_common/old_migrations/0018_auto__add_itemkey.py index 4de340549..4de340549 100644 --- a/ishtar_common/migrations/0018_auto__add_itemkey.py +++ b/ishtar_common/old_migrations/0018_auto__add_itemkey.py diff --git a/ishtar_common/migrations/0019_auto__add_field_itemkey_importer.py b/ishtar_common/old_migrations/0019_auto__add_field_itemkey_importer.py index 9206279d1..9206279d1 100644 --- a/ishtar_common/migrations/0019_auto__add_field_itemkey_importer.py +++ b/ishtar_common/old_migrations/0019_auto__add_field_itemkey_importer.py diff --git a/ishtar_common/migrations/0020_auto__chg_field_person_title.py b/ishtar_common/old_migrations/0020_auto__chg_field_person_title.py index 8d4674ace..8d4674ace 100644 --- a/ishtar_common/migrations/0020_auto__chg_field_person_title.py +++ b/ishtar_common/old_migrations/0020_auto__chg_field_person_title.py diff --git a/ishtar_common/migrations/0021_auto__add_importerdefault__add_importertype__add_importtarget__add_for.py b/ishtar_common/old_migrations/0021_auto__add_importerdefault__add_importertype__add_importtarget__add_for.py index 21f6e5f78..21f6e5f78 100644 --- a/ishtar_common/migrations/0021_auto__add_importerdefault__add_importertype__add_importtarget__add_for.py +++ b/ishtar_common/old_migrations/0021_auto__add_importerdefault__add_importertype__add_importtarget__add_for.py diff --git a/ishtar_common/migrations/0022_auto__add_field_import_importer_type.py b/ishtar_common/old_migrations/0022_auto__add_field_import_importer_type.py index d5091b542..d5091b542 100644 --- a/ishtar_common/migrations/0022_auto__add_field_import_importer_type.py +++ b/ishtar_common/old_migrations/0022_auto__add_field_import_importer_type.py diff --git a/ishtar_common/migrations/0023_auto__add_importerdefaultvalues__del_field_importerdefault_value.py b/ishtar_common/old_migrations/0023_auto__add_importerdefaultvalues__del_field_importerdefault_value.py index 74c5e0a1c..74c5e0a1c 100644 --- a/ishtar_common/migrations/0023_auto__add_importerdefaultvalues__del_field_importerdefault_value.py +++ b/ishtar_common/old_migrations/0023_auto__add_importerdefaultvalues__del_field_importerdefault_value.py diff --git a/ishtar_common/migrations/0024_auto__add_importerduplicatefield__chg_field_importerdefault_target__ad.py b/ishtar_common/old_migrations/0024_auto__add_importerduplicatefield__chg_field_importerdefault_target__ad.py index d5d3293f0..d5d3293f0 100644 --- a/ishtar_common/migrations/0024_auto__add_importerduplicatefield__chg_field_importerdefault_target__ad.py +++ b/ishtar_common/old_migrations/0024_auto__add_importerduplicatefield__chg_field_importerdefault_target__ad.py diff --git a/ishtar_common/migrations/0025_auto__add_unique_formatertype_formater_type_many_split_options.py b/ishtar_common/old_migrations/0025_auto__add_unique_formatertype_formater_type_many_split_options.py index 73c88ce1a..73c88ce1a 100644 --- a/ishtar_common/migrations/0025_auto__add_unique_formatertype_formater_type_many_split_options.py +++ b/ishtar_common/old_migrations/0025_auto__add_unique_formatertype_formater_type_many_split_options.py diff --git a/ishtar_common/migrations/0026_auto__add_targetkey__add_unique_targetkey_target_value__add_field_impo.py b/ishtar_common/old_migrations/0026_auto__add_targetkey__add_unique_targetkey_target_value__add_field_impo.py index b4752a48e..b4752a48e 100644 --- a/ishtar_common/migrations/0026_auto__add_targetkey__add_unique_targetkey_target_value__add_field_impo.py +++ b/ishtar_common/old_migrations/0026_auto__add_targetkey__add_unique_targetkey_target_value__add_field_impo.py diff --git a/ishtar_common/migrations/0027_auto__chg_field_targetkey_target.py b/ishtar_common/old_migrations/0027_auto__chg_field_targetkey_target.py index d6ea7e10a..d6ea7e10a 100644 --- a/ishtar_common/migrations/0027_auto__chg_field_targetkey_target.py +++ b/ishtar_common/old_migrations/0027_auto__chg_field_targetkey_target.py diff --git a/ishtar_common/migrations/0028_auto__chg_field_targetkey_key__chg_field_targetkey_value.py b/ishtar_common/old_migrations/0028_auto__chg_field_targetkey_key__chg_field_targetkey_value.py index b99480a2b..b99480a2b 100644 --- a/ishtar_common/migrations/0028_auto__chg_field_targetkey_key__chg_field_targetkey_value.py +++ b/ishtar_common/old_migrations/0028_auto__chg_field_targetkey_key__chg_field_targetkey_value.py diff --git a/ishtar_common/migrations/0029_auto.py b/ishtar_common/old_migrations/0029_auto.py index 9bcf818b5..9bcf818b5 100644 --- a/ishtar_common/migrations/0029_auto.py +++ b/ishtar_common/old_migrations/0029_auto.py diff --git a/ishtar_common/migrations/0030_auto__add_state__chg_field_sourcetype_txt_idx__chg_field_authortype_tx.py b/ishtar_common/old_migrations/0030_auto__add_state__chg_field_sourcetype_txt_idx__chg_field_authortype_tx.py index cd5d06576..cd5d06576 100644 --- a/ishtar_common/migrations/0030_auto__add_state__chg_field_sourcetype_txt_idx__chg_field_authortype_tx.py +++ b/ishtar_common/old_migrations/0030_auto__add_state__chg_field_sourcetype_txt_idx__chg_field_authortype_tx.py diff --git a/ishtar_common/migrations/0031_auto__del_unique_targetkey_target_value__add_unique_targetkey_target_k.py b/ishtar_common/old_migrations/0031_auto__del_unique_targetkey_target_value__add_unique_targetkey_target_k.py index 7fddc0fca..7fddc0fca 100644 --- a/ishtar_common/migrations/0031_auto__del_unique_targetkey_target_value__add_unique_targetkey_target_k.py +++ b/ishtar_common/old_migrations/0031_auto__del_unique_targetkey_target_value__add_unique_targetkey_target_k.py diff --git a/ishtar_common/migrations/0033_auto__add_field_targetkey_associated_import__add_field_targetkey_assoc.py b/ishtar_common/old_migrations/0033_auto__add_field_targetkey_associated_import__add_field_targetkey_assoc.py index 2a6c8fc15..2a6c8fc15 100644 --- a/ishtar_common/migrations/0033_auto__add_field_targetkey_associated_import__add_field_targetkey_assoc.py +++ b/ishtar_common/old_migrations/0033_auto__add_field_targetkey_associated_import__add_field_targetkey_assoc.py diff --git a/ishtar_common/migrations/0034_auto__add_field_import_encoding.py b/ishtar_common/old_migrations/0034_auto__add_field_import_encoding.py index 2774b3c15..2774b3c15 100644 --- a/ishtar_common/migrations/0034_auto__add_field_import_encoding.py +++ b/ishtar_common/old_migrations/0034_auto__add_field_import_encoding.py diff --git a/ishtar_common/migrations/0035_auto__add_field_importtarget_force_new__add_field_importerduplicatefie.py b/ishtar_common/old_migrations/0035_auto__add_field_importtarget_force_new__add_field_importerduplicatefie.py index 2a396ee62..2a396ee62 100644 --- a/ishtar_common/migrations/0035_auto__add_field_importtarget_force_new__add_field_importerduplicatefie.py +++ b/ishtar_common/old_migrations/0035_auto__add_field_importtarget_force_new__add_field_importerduplicatefie.py diff --git a/ishtar_common/migrations/0036_auto__add_field_import_imported_images.py b/ishtar_common/old_migrations/0036_auto__add_field_import_imported_images.py index d0741abca..d0741abca 100644 --- a/ishtar_common/migrations/0036_auto__add_field_import_imported_images.py +++ b/ishtar_common/old_migrations/0036_auto__add_field_import_imported_images.py diff --git a/ishtar_common/migrations/0037_auto__add_field_importertype_slug.py b/ishtar_common/old_migrations/0037_auto__add_field_importertype_slug.py index c7bf06c5d..c7bf06c5d 100644 --- a/ishtar_common/migrations/0037_auto__add_field_importertype_slug.py +++ b/ishtar_common/old_migrations/0037_auto__add_field_importertype_slug.py diff --git a/ishtar_common/migrations/0038_auto__add_field_importtarget_comment.py b/ishtar_common/old_migrations/0038_auto__add_field_importtarget_comment.py index a2cbe1579..a2cbe1579 100644 --- a/ishtar_common/migrations/0038_auto__add_field_importtarget_comment.py +++ b/ishtar_common/old_migrations/0038_auto__add_field_importtarget_comment.py diff --git a/ishtar_common/migrations/0039_auto__add_field_import_match_file.py b/ishtar_common/old_migrations/0039_auto__add_field_import_match_file.py index 6df3e81a8..6df3e81a8 100644 --- a/ishtar_common/migrations/0039_auto__add_field_import_match_file.py +++ b/ishtar_common/old_migrations/0039_auto__add_field_import_match_file.py diff --git a/ishtar_common/migrations/0040_auto__chg_field_person_title.py b/ishtar_common/old_migrations/0040_auto__chg_field_person_title.py index 2623f9eae..2623f9eae 100644 --- a/ishtar_common/migrations/0040_auto__chg_field_person_title.py +++ b/ishtar_common/old_migrations/0040_auto__chg_field_person_title.py diff --git a/ishtar_common/migrations/0041_auto__add_field_importertype_unicity_keys__add_field_importtarget_conc.py b/ishtar_common/old_migrations/0041_auto__add_field_importertype_unicity_keys__add_field_importtarget_conc.py index 990f35efc..990f35efc 100644 --- a/ishtar_common/migrations/0041_auto__add_field_importertype_unicity_keys__add_field_importtarget_conc.py +++ b/ishtar_common/old_migrations/0041_auto__add_field_importertype_unicity_keys__add_field_importtarget_conc.py diff --git a/ishtar_common/migrations/0042_auto__add_field_importtarget_concat_str__add_unique_importercolumn_col.py b/ishtar_common/old_migrations/0042_auto__add_field_importtarget_concat_str__add_unique_importercolumn_col.py index 7f8bac846..7f8bac846 100644 --- a/ishtar_common/migrations/0042_auto__add_field_importtarget_concat_str__add_unique_importercolumn_col.py +++ b/ishtar_common/old_migrations/0042_auto__add_field_importtarget_concat_str__add_unique_importercolumn_col.py diff --git a/ishtar_common/migrations/0043_auto__add_field_importerduplicatefield_concat__add_field_importerdupli.py b/ishtar_common/old_migrations/0043_auto__add_field_importerduplicatefield_concat__add_field_importerdupli.py index efde90aca..efde90aca 100644 --- a/ishtar_common/migrations/0043_auto__add_field_importerduplicatefield_concat__add_field_importerdupli.py +++ b/ishtar_common/old_migrations/0043_auto__add_field_importerduplicatefield_concat__add_field_importerdupli.py diff --git a/ishtar_common/migrations/0044_auto__add_operationtype.py b/ishtar_common/old_migrations/0044_auto__add_operationtype.py index f623809de..f623809de 100644 --- a/ishtar_common/migrations/0044_auto__add_operationtype.py +++ b/ishtar_common/old_migrations/0044_auto__add_operationtype.py diff --git a/ishtar_common/migrations/0045_auto__chg_field_person_merge_key__chg_field_historicalorganization_mer.py b/ishtar_common/old_migrations/0045_auto__chg_field_person_merge_key__chg_field_historicalorganization_mer.py index 39114eba5..39114eba5 100644 --- a/ishtar_common/migrations/0045_auto__chg_field_person_merge_key__chg_field_historicalorganization_mer.py +++ b/ishtar_common/old_migrations/0045_auto__chg_field_person_merge_key__chg_field_historicalorganization_mer.py diff --git a/ishtar_common/migrations/0046_auto__add_field_person_exclude_from_merge__add_field_historicalorganiz.py b/ishtar_common/old_migrations/0046_auto__add_field_person_exclude_from_merge__add_field_historicalorganiz.py index e0dbc9222..e0dbc9222 100644 --- a/ishtar_common/migrations/0046_auto__add_field_person_exclude_from_merge__add_field_historicalorganiz.py +++ b/ishtar_common/old_migrations/0046_auto__add_field_person_exclude_from_merge__add_field_historicalorganiz.py diff --git a/ishtar_common/migrations/0047_auto__chg_field_person_exclude_from_merge__chg_field_historicalorganiz.py b/ishtar_common/old_migrations/0047_auto__chg_field_person_exclude_from_merge__chg_field_historicalorganiz.py index 4bc7b8a48..4bc7b8a48 100644 --- a/ishtar_common/migrations/0047_auto__chg_field_person_exclude_from_merge__chg_field_historicalorganiz.py +++ b/ishtar_common/old_migrations/0047_auto__chg_field_person_exclude_from_merge__chg_field_historicalorganiz.py diff --git a/ishtar_common/migrations/0048_auto__add_ishtarsiteprofile.py b/ishtar_common/old_migrations/0048_auto__add_ishtarsiteprofile.py index 5a2c21bf1..5a2c21bf1 100644 --- a/ishtar_common/migrations/0048_auto__add_ishtarsiteprofile.py +++ b/ishtar_common/old_migrations/0048_auto__add_ishtarsiteprofile.py diff --git a/ishtar_common/migrations/0049_auto__add_field_person_alt_address__add_field_person_alt_address_compl.py b/ishtar_common/old_migrations/0049_auto__add_field_person_alt_address__add_field_person_alt_address_compl.py index d64e3a964..d64e3a964 100644 --- a/ishtar_common/migrations/0049_auto__add_field_person_alt_address__add_field_person_alt_address_compl.py +++ b/ishtar_common/old_migrations/0049_auto__add_field_person_alt_address__add_field_person_alt_address_compl.py diff --git a/ishtar_common/migrations/0050_auto__chg_field_person_phone_desc3__chg_field_person_phone_desc2__chg_.py b/ishtar_common/old_migrations/0050_auto__chg_field_person_phone_desc3__chg_field_person_phone_desc2__chg_.py index b68b3b9bb..b68b3b9bb 100644 --- a/ishtar_common/migrations/0050_auto__chg_field_person_phone_desc3__chg_field_person_phone_desc2__chg_.py +++ b/ishtar_common/old_migrations/0050_auto__chg_field_person_phone_desc3__chg_field_person_phone_desc2__chg_.py diff --git a/ishtar_common/migrations/0051_auto__add_field_ishtarsiteprofile_homepage.py b/ishtar_common/old_migrations/0051_auto__add_field_ishtarsiteprofile_homepage.py index 7f8c65857..7f8c65857 100644 --- a/ishtar_common/migrations/0051_auto__add_field_ishtarsiteprofile_homepage.py +++ b/ishtar_common/old_migrations/0051_auto__add_field_ishtarsiteprofile_homepage.py diff --git a/ishtar_common/migrations/0052_auto__add_field_ishtarsiteprofile_file_external_id__add_field_ishtarsi.py b/ishtar_common/old_migrations/0052_auto__add_field_ishtarsiteprofile_file_external_id__add_field_ishtarsi.py index 7b902a432..7b902a432 100644 --- a/ishtar_common/migrations/0052_auto__add_field_ishtarsiteprofile_file_external_id__add_field_ishtarsi.py +++ b/ishtar_common/old_migrations/0052_auto__add_field_ishtarsiteprofile_file_external_id__add_field_ishtarsi.py diff --git a/ishtar_common/migrations/0053_auto__add_field_ishtarsiteprofile_currency.py b/ishtar_common/old_migrations/0053_auto__add_field_ishtarsiteprofile_currency.py index 04d293b04..04d293b04 100644 --- a/ishtar_common/migrations/0053_auto__add_field_ishtarsiteprofile_currency.py +++ b/ishtar_common/old_migrations/0053_auto__add_field_ishtarsiteprofile_currency.py diff --git a/ishtar_common/migrations/0054_auto__add_field_ishtarsiteprofile_person_raw_name.py b/ishtar_common/old_migrations/0054_auto__add_field_ishtarsiteprofile_person_raw_name.py index 06e380189..06e380189 100644 --- a/ishtar_common/migrations/0054_auto__add_field_ishtarsiteprofile_person_raw_name.py +++ b/ishtar_common/old_migrations/0054_auto__add_field_ishtarsiteprofile_person_raw_name.py diff --git a/ishtar_common/migrations/0055_auto.py b/ishtar_common/old_migrations/0055_auto.py index db41eb868..db41eb868 100644 --- a/ishtar_common/migrations/0055_auto.py +++ b/ishtar_common/old_migrations/0055_auto.py diff --git a/ishtar_common/migrations/0056_auto__add_titletype__add_field_person_pretitle.py b/ishtar_common/old_migrations/0056_auto__add_titletype__add_field_person_pretitle.py index 6db62c107..6db62c107 100644 --- a/ishtar_common/migrations/0056_auto__add_titletype__add_field_person_pretitle.py +++ b/ishtar_common/old_migrations/0056_auto__add_titletype__add_field_person_pretitle.py diff --git a/ishtar_common/migrations/0057_rename_pretitle_old_title.py b/ishtar_common/old_migrations/0057_rename_pretitle_old_title.py index 8a13b6c88..8a13b6c88 100644 --- a/ishtar_common/migrations/0057_rename_pretitle_old_title.py +++ b/ishtar_common/old_migrations/0057_rename_pretitle_old_title.py diff --git a/ishtar_common/migrations/0058_generate_title.py b/ishtar_common/old_migrations/0058_generate_title.py index d30850cab..d30850cab 100644 --- a/ishtar_common/migrations/0058_generate_title.py +++ b/ishtar_common/old_migrations/0058_generate_title.py diff --git a/ishtar_common/migrations/0059_rename_exc_from_merge_to_archived.py b/ishtar_common/old_migrations/0059_rename_exc_from_merge_to_archived.py index c329b76e2..c329b76e2 100644 --- a/ishtar_common/migrations/0059_rename_exc_from_merge_to_archived.py +++ b/ishtar_common/old_migrations/0059_rename_exc_from_merge_to_archived.py diff --git a/ishtar_common/migrations/0060_auto__add_historicalperson.py b/ishtar_common/old_migrations/0060_auto__add_historicalperson.py index a1db55c37..a1db55c37 100644 --- a/ishtar_common/migrations/0060_auto__add_historicalperson.py +++ b/ishtar_common/old_migrations/0060_auto__add_historicalperson.py diff --git a/ishtar_common/migrations/0061_auto__add_field_historicalperson_salutation__add_field_person_salutati.py b/ishtar_common/old_migrations/0061_auto__add_field_historicalperson_salutation__add_field_person_salutati.py index eb3b34a26..eb3b34a26 100644 --- a/ishtar_common/migrations/0061_auto__add_field_historicalperson_salutation__add_field_person_salutati.py +++ b/ishtar_common/old_migrations/0061_auto__add_field_historicalperson_salutation__add_field_person_salutati.py diff --git a/ishtar_common/migrations/0062_remove_ishtar_local_prefix.py b/ishtar_common/old_migrations/0062_remove_ishtar_local_prefix.py index b1406a111..b1406a111 100644 --- a/ishtar_common/migrations/0062_remove_ishtar_local_prefix.py +++ b/ishtar_common/old_migrations/0062_remove_ishtar_local_prefix.py diff --git a/ishtar_common/migrations/0063_auto__add_field_ishtaruser_advanced_shortcut_menu.py b/ishtar_common/old_migrations/0063_auto__add_field_ishtaruser_advanced_shortcut_menu.py index 19a076913..19a076913 100644 --- a/ishtar_common/migrations/0063_auto__add_field_ishtaruser_advanced_shortcut_menu.py +++ b/ishtar_common/old_migrations/0063_auto__add_field_ishtaruser_advanced_shortcut_menu.py diff --git a/ishtar_common/migrations/0064_auto__add_field_importercolumn_label.py b/ishtar_common/old_migrations/0064_auto__add_field_importercolumn_label.py index 2f2b6efcc..2f2b6efcc 100644 --- a/ishtar_common/migrations/0064_auto__add_field_importercolumn_label.py +++ b/ishtar_common/old_migrations/0064_auto__add_field_importercolumn_label.py diff --git a/ishtar_common/migrations/0065_auto__add_spatialreferencesystem__add_field_ishtarsiteprofile_mapping.py b/ishtar_common/old_migrations/0065_auto__add_spatialreferencesystem__add_field_ishtarsiteprofile_mapping.py index 2c1dc8a49..2c1dc8a49 100644 --- a/ishtar_common/migrations/0065_auto__add_spatialreferencesystem__add_field_ishtarsiteprofile_mapping.py +++ b/ishtar_common/old_migrations/0065_auto__add_spatialreferencesystem__add_field_ishtarsiteprofile_mapping.py diff --git a/ishtar_common/migrations/0066_auto__add_field_ishtarsiteprofile_base_color__add_field_ishtarsiteprof.py b/ishtar_common/old_migrations/0066_auto__add_field_ishtarsiteprofile_base_color__add_field_ishtarsiteprof.py index 16baf8881..16baf8881 100644 --- a/ishtar_common/migrations/0066_auto__add_field_ishtarsiteprofile_base_color__add_field_ishtarsiteprof.py +++ b/ishtar_common/old_migrations/0066_auto__add_field_ishtarsiteprofile_base_color__add_field_ishtarsiteprof.py diff --git a/ishtar_common/migrations/0067_auto__add_field_ishtarsiteprofile_container_external_id__add_field_ish.py b/ishtar_common/old_migrations/0067_auto__add_field_ishtarsiteprofile_container_external_id__add_field_ish.py index 2bff66138..2bff66138 100644 --- a/ishtar_common/migrations/0067_auto__add_field_ishtarsiteprofile_container_external_id__add_field_ish.py +++ b/ishtar_common/old_migrations/0067_auto__add_field_ishtarsiteprofile_container_external_id__add_field_ish.py diff --git a/ishtar_common/migrations/0068_auto__add_field_spatialreferencesystem_auth_name.py b/ishtar_common/old_migrations/0068_auto__add_field_spatialreferencesystem_auth_name.py index a7f83884d..a7f83884d 100644 --- a/ishtar_common/migrations/0068_auto__add_field_spatialreferencesystem_auth_name.py +++ b/ishtar_common/old_migrations/0068_auto__add_field_spatialreferencesystem_auth_name.py diff --git a/ishtar_common/migrations/0069_auto__chg_field_import_error_file__chg_field_import_match_file__chg_fi.py b/ishtar_common/old_migrations/0069_auto__chg_field_import_error_file__chg_field_import_match_file__chg_fi.py index 1fbccf642..1fbccf642 100644 --- a/ishtar_common/migrations/0069_auto__chg_field_import_error_file__chg_field_import_match_file__chg_fi.py +++ b/ishtar_common/old_migrations/0069_auto__chg_field_import_error_file__chg_field_import_match_file__chg_fi.py diff --git a/ishtar_common/migrations/0070_auto__add_importermodel__add_field_importertype_new_associated_models.py b/ishtar_common/old_migrations/0070_auto__add_importermodel__add_field_importertype_new_associated_models.py index b78e71bbf..b78e71bbf 100644 --- a/ishtar_common/migrations/0070_auto__add_importermodel__add_field_importertype_new_associated_models.py +++ b/ishtar_common/old_migrations/0070_auto__add_importermodel__add_field_importertype_new_associated_models.py diff --git a/ishtar_common/migrations/0071_migrate_importermodels.py b/ishtar_common/old_migrations/0071_migrate_importermodels.py index cc9b6f449..cc9b6f449 100644 --- a/ishtar_common/migrations/0071_migrate_importermodels.py +++ b/ishtar_common/old_migrations/0071_migrate_importermodels.py diff --git a/ishtar_common/migrations/0072_auto__del_field_importertype_new_associated_models__chg_field_importer.py b/ishtar_common/old_migrations/0072_auto__del_field_importertype_new_associated_models__chg_field_importer.py index 9d1c9f55c..9d1c9f55c 100644 --- a/ishtar_common/migrations/0072_auto__del_field_importertype_new_associated_models__chg_field_importer.py +++ b/ishtar_common/old_migrations/0072_auto__del_field_importertype_new_associated_models__chg_field_importer.py diff --git a/ishtar_common/migrations/0073_auto__add_field_importercolumn_export_field_name.py b/ishtar_common/old_migrations/0073_auto__add_field_importercolumn_export_field_name.py index a2b5ed719..a2b5ed719 100644 --- a/ishtar_common/migrations/0073_auto__add_field_importercolumn_export_field_name.py +++ b/ishtar_common/old_migrations/0073_auto__add_field_importercolumn_export_field_name.py diff --git a/ishtar_common/migrations/0074_auto__add_field_import_name.py b/ishtar_common/old_migrations/0074_auto__add_field_import_name.py index 8374ce83f..8374ce83f 100644 --- a/ishtar_common/migrations/0074_auto__add_field_import_name.py +++ b/ishtar_common/old_migrations/0074_auto__add_field_import_name.py diff --git a/ishtar_common/migrations/0075_auto__add_field_authortype_order.py b/ishtar_common/old_migrations/0075_auto__add_field_authortype_order.py index e768e57de..e768e57de 100644 --- a/ishtar_common/migrations/0075_auto__add_field_authortype_order.py +++ b/ishtar_common/old_migrations/0075_auto__add_field_authortype_order.py diff --git a/ishtar_common/migrations/0076_auto__add_field_ishtarsiteprofile_find_index.py b/ishtar_common/old_migrations/0076_auto__add_field_ishtarsiteprofile_find_index.py index 84bf5f971..84bf5f971 100644 --- a/ishtar_common/migrations/0076_auto__add_field_ishtarsiteprofile_find_index.py +++ b/ishtar_common/old_migrations/0076_auto__add_field_ishtarsiteprofile_find_index.py diff --git a/ishtar_common/old_migrations/__init__.py b/ishtar_common/old_migrations/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ishtar_common/old_migrations/__init__.py diff --git a/ishtar_common/ooo_replace.py b/ishtar_common/ooo_replace.py deleted file mode 100644 index 18c4e1878..000000000 --- a/ishtar_common/ooo_replace.py +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# Copyright (C) 2013-2015 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. - -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# See the file COPYING for details. - -import locale -import re -from zipfile import ZipFile, ZIP_DEFLATED -from cStringIO import StringIO -from xml.etree.cElementTree import ElementTree, fromstring - -from django.conf import settings -from ooo_translation import ooo_translation - - -def translate_context(context, locale): - if locale not in ooo_translation: - return context - new_context = {} - for k in context: - new_key = k - if k in ooo_translation[locale]: - new_key = ooo_translation[locale][k] - new_context[new_key] = context[k] - return new_context - -OOO_NS = "{urn:oasis:names:tc:opendocument:xmlns:text:1.0}" - - -def _set_value_from_formula(value, context, default_value): - value = value.strip() - if value.startswith("ooow:") and len(value) >= 5: - value = value[5:] - if value.startswith('"') and value.endswith('"') and len(value) > 1: - value = value[1:-1] - elif value in context: - value = _format_value(context[value], default_value) - else: - value = None - return value - - -def _parse_condition(condition, context, default_value): - # parse only == and != operator - operator = "" - if "!=" in condition: - operator = "!=" - elif "==" in condition: - operator = "==" - else: - return - var1, var2 = condition.split(operator) - var1 = _set_value_from_formula(var1, context, default_value) - var2 = _set_value_from_formula(var2, context, default_value) - res = var1 == var2 - if operator == '!=': - res = not res - return res - - -def _format_value(value, default_value): - if hasattr(value, 'strftime'): - c_locale = settings.LANGUAGE_CODE.split('-') - if len(c_locale) == 2: - c_locale[1] = c_locale[1].upper() - c_locale = "_".join(c_locale) - if locale.getlocale()[0] != c_locale: - for loc in (c_locale, c_locale + '.utf8'): - try: - locale.setlocale(locale.LC_ALL, loc) - break - except: - pass - try: - if settings.DATE_FORMAT: - value = value.strftime(settings.DATE_FORMAT).lower() - else: - value = value.strftime('%x') - except ValueError: - value = unicode(value) - if locale.getlocale()[1]: - value = value.decode(locale.getlocale()[1]) - value = unicode(value) if value else default_value - return value - -VAR_EXPR = u"###%sVAR %s###" -WHOLE_KEY_FILTER = u"((?:(?: )*(?:<[^#>]*>)*(?: )*(?:[-a-zA-Z0-9_])*(?: )*)*)" -WHOLE_KEY_FILTER = u"([^#]*)" -RE_VAR = re.compile(VAR_EXPR % (WHOLE_KEY_FILTER, WHOLE_KEY_FILTER)) -IF_EXPR = u"###%sIF %s###(.*)###ENDIF###" -RE_IF = re.compile(IF_EXPR % (WHOLE_KEY_FILTER, WHOLE_KEY_FILTER)) -TAG_FILTER = re.compile(u"(<[^<^>]*>)") -KEY_FILTER = re.compile(u"([-a-zA-Z0-9_]*)") - - -def _filter_key(base_key): - # return (key, extra_marker) - # manage strange key such as: - # test_<text:span text:style-name="T1">date</text:span> - key = base_key[:] - key = key.strip() - tags, new_key = '', key[:] - for tag in TAG_FILTER.findall(key): - tags += tag - new_key = new_key.replace(tag, '') - full_key = '' - for k in KEY_FILTER.findall(new_key): - if not k: - continue - full_key += k - return full_key, tags - - -def _custom_parsing(context, value, default_value=''): - """ - ###VAR nom_var### for displaying a variable name - ###IF nom_var### ###ENDIF### for conditionnal display - Be carreful nested condition are not yet managed! - """ - for regexp, sub_exp, if_cond in ((RE_IF, IF_EXPR, True), - (RE_VAR, VAR_EXPR, False)): - for base_key in regexp.findall(value[:]): - v, val = "", None - if if_cond: # the value inside the if is parsed - pre_tag, base_key, val = base_key - else: - pre_tag, base_key = base_key - key, extra_markers = _filter_key(base_key) - v = '' - if pre_tag: - v = pre_tag - if key in context and context[key]: - if if_cond: - v += _custom_parsing(context, val, default_value) - else: - v += _format_value(context[key], default_value) - # to preserve a consistent OOO file put extra_markers - if extra_markers: - v += extra_markers - value = re.sub(sub_exp % (pre_tag, base_key), v, value) - return value - - -def _ooo_replace(content, context, missing_keys, default_value=''): - - # regular ooo parsing - for xp in ('variable-set', 'variable-get'): - for p in content.findall(".//" + OOO_NS + xp): - name = p.get(OOO_NS + "name") - if name in context: - value = context[name] - p.text = _format_value(value, default_value) - else: - if default_value is not None: - p.text = default_value - missing_keys.add(name) - for p in content.findall(".//" + OOO_NS + "conditional-text"): - condition = p.get(OOO_NS + "condition") - res = 'true' if _parse_condition(condition, context, default_value) \ - else 'false' - value = p.get(OOO_NS + 'string-value-if-' + res) - value = _format_value(value, default_value) - if value.strip() in context: - value = context[value.strip()] - p.text = value - - # raw content parsing - str_io = StringIO() - content.write(str_io) - value = str_io.getvalue() - value = _custom_parsing(context, value, default_value).encode('utf-8') - return value - - -def ooo_replace(infile, outfile, context, default_value=''): - inzip = ZipFile(infile, 'r', ZIP_DEFLATED) - outzip = ZipFile(outfile, 'w', ZIP_DEFLATED) - - values = {} - missing_keys = set() - for xml_file in ('content.xml', 'styles.xml'): - content = ElementTree(fromstring(inzip.read(xml_file))) - values[xml_file] = _ooo_replace(content, context, missing_keys, - default_value) - - for f in inzip.infolist(): - if f.filename in values: - outzip.writestr(f.filename, values[f.filename]) - else: - outzip.writestr(f, inzip.read(f.filename)) - - inzip.close() - outzip.close() - return missing_keys - -if __name__ == '__main__': - infile = "../archaeological_files/tests/"\ - "AR_dossier_DRAC_modele_ishtar_1-MOD.odt" - outfile = "../archaeological_files/tests/"\ - "AR_dossier_DRAC_modele_ishtar-test.odt" - rep = {"file_incharge_surname": u"Yann", - "file_incharge_name": u"Le Jeune", - "fileact_ref": u"ref"} - ooo_replace(infile, outfile, rep, default_value="") diff --git a/ishtar_common/ooo_translation.py b/ishtar_common/ooo_translation.py deleted file mode 100644 index 5a3d4cb84..000000000 --- a/ishtar_common/ooo_translation.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# Copyright (C) 2013-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. - -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# See the file COPYING for details. - -from django.conf import settings -from django.utils import translation -# from django.utils.translation import pgettext_lazy - -# [('study', pgettext_lazy('ooo key', u'study')),] - -TRANSLATION_STRINGS = [] - -ooo_translation = {} -cur_language = translation.get_language() - -try: - for language, lbl in settings.LANGUAGES: - translation.activate(language) - ooo_translation[language] = {} - for k, v in TRANSLATION_STRINGS: - ooo_translation[language][k] = unicode(v) -finally: - translation.activate(cur_language) diff --git a/ishtar_common/static/ajax_select/css/ajax_select.css b/ishtar_common/static/ajax_select/css/ajax_select.css new file mode 100644 index 000000000..379b5be96 --- /dev/null +++ b/ishtar_common/static/ajax_select/css/ajax_select.css @@ -0,0 +1,49 @@ +.results_on_deck .ui-icon-trash { + float: left; + cursor: pointer; +} +.results_on_deck { + padding: 0.25em 0; +} +form .aligned .results_on_deck { + padding-left: 38px; + margin-left: 7em; +} +.results_on_deck > div { + margin-bottom: 0.5em; +} +.ui-autocomplete-loading { + background: url('../images/loading-indicator.gif') no-repeat; + background-origin: content-box; + background-position: right; +} +ul.ui-autocomplete { + /* + this is the dropdown menu. + + if max-width is not set and you are using django-admin + then the dropdown is the width of your whole page body (totally wrong). + + this sets max-width at 60% which is graceful at full page or in a popup + or on a small width window. + + fixed width is harder see http://stackoverflow.com/questions/4607164/changing-width-of-jquery-ui-autocomplete-widgets-individually + */ + max-width: 60%; + margin: 0; + padding: 0; + position: absolute; +} +ul.ui-autocomplete li { + list-style-type: none; + padding: 0; +} +ul.ui-autocomplete li a { + display: block; + padding: 2px 3px; + cursor: pointer; +} + +.results_on_deck .ajax-label{ + line-height: 18px; +} diff --git a/ishtar_common/templates/admin/base_site.html b/ishtar_common/templates/admin/base_site.html deleted file mode 100644 index 3282d4f5a..000000000 --- a/ishtar_common/templates/admin/base_site.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "admin/base.html" %} -{% load i18n %} - -{% block title %}{{ title }} | {% trans 'Ishtar administration' %}{% endblock %} - -{% block branding %} -<h1 id="site-name">{% trans 'Ishtar administration' %}</h1> -{% endblock %} - -{% block nav-global %}{% endblock %} diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index b142c70c7..75e0e3740 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -1,4 +1,4 @@ -{% load i18n %}{% load url from future %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" +{% load i18n %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{LANGUAGE_CODE}}" lang="{{LANGUAGE_CODE}}"> diff --git a/ishtar_common/templates/blocks/JQueryAdvancedTown.html b/ishtar_common/templates/blocks/JQueryAdvancedTown.html index 5d6d93f30..b74bb6b68 100644 --- a/ishtar_common/templates/blocks/JQueryAdvancedTown.html +++ b/ishtar_common/templates/blocks/JQueryAdvancedTown.html @@ -1,4 +1,4 @@ -{% load i18n %}{% load url from future %}</td></tr> +{% load i18n %}</td></tr> <tr> <td>{% trans "State" context "Region" %}</td> <td> diff --git a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html index 5cea8b5a7..cd7bf88f8 100644 --- a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html @@ -1,5 +1,4 @@ {% load i18n %} -{% load url from future%} {% if menu %} <form method="post" action="{% url 'update-current-item' %}"> <fieldset id='shortcut-menu'> diff --git a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html index c03cb3806..67f91dfea 100644 --- a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html @@ -1,5 +1,4 @@ {% load i18n %} -{% load url from future%} {% if current_menu %} <form method="post" action="{% url 'update-current-item' %}"> <fieldset id="shortcut-menu"> diff --git a/ishtar_common/templates/ishtar/blocks/window_nav.html b/ishtar_common/templates/ishtar/blocks/window_nav.html index 3c52063f4..f212ebff6 100644 --- a/ishtar_common/templates/ishtar/blocks/window_nav.html +++ b/ishtar_common/templates/ishtar/blocks/window_nav.html @@ -1,4 +1,3 @@ -{% load url from future %} {% load i18n %} {% if previous or next %} <div class='tool-right'> diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html index 6a5a67a63..ed61d1265 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html @@ -1,6 +1,5 @@ {% extends "base.html" %} {% load i18n %} -{% load url from future %} {% block extra_head %} {{form.media}} <script language="javascript" type="text/javascript" src="{{STATIC_URL}}js/jqplot/jquery.jqplot.min.js?ver={{VERSION}}"></script> diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html index 2650282ca..5ebb05af4 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html @@ -1,5 +1,4 @@ {% load i18n date_formating humanize %} -{% load url from future %} <div class='dashboard' id="{{unique_id}}-tab"> <div> <h4>{% trans "Numbers" %}</h4> diff --git a/ishtar_common/templates/ishtar/import_delete.html b/ishtar_common/templates/ishtar/import_delete.html index 4b48ebc8c..ef05a884c 100644 --- a/ishtar_common/templates/ishtar/import_delete.html +++ b/ishtar_common/templates/ishtar/import_delete.html @@ -1,6 +1,5 @@ {% extends "base.html" %} {% load i18n inline_formset verbose_names %} -{% load url from future %} {% block content %} <h2>{{page_name}}</h2> <div class='form'> diff --git a/ishtar_common/templates/ishtar/import_list.html b/ishtar_common/templates/ishtar/import_list.html index 5dba51b6f..c72c86d10 100644 --- a/ishtar_common/templates/ishtar/import_list.html +++ b/ishtar_common/templates/ishtar/import_list.html @@ -1,6 +1,5 @@ {% extends "base.html" %} {% load i18n inline_formset %} -{% load url from future %} {% block content %} <h2>{{page_name}}</h2> <div class='form'> @@ -26,7 +25,7 @@ {{import.importer_type}} </td> <td> - <a href='{{MEDIA_URL}}{{import.imported_file}}'>{% trans "Source file" %}</a> + <a href='{{import.imported_file.url}}'>{% trans "Source file" %}</a> </td> <td> {{import.creation_date}} ({{import.user}}) @@ -48,18 +47,18 @@ {% endif %} </td> <td>{% if import.error_file %} - <a href='{{MEDIA_URL}}{{import.error_file}}'>{% trans "Error file" %}</a> + <a href='{{import.error_file.url}}'>{% trans "Error file" %}</a> {% endif %}</td> <td>{% if import.result_file %} - <a href='{{MEDIA_URL}}{{import.result_file}}'>{% trans "Control file" %}</a> + <a href='{{import.result_file.url}}'>{% trans "Control file" %}</a> {% endif %}</td> <td>{% if import.match_file %} - <a href='{{MEDIA_URL}}{{import.match_file}}'>{% trans "Match file" %}</a> + <a href='{{import.match_file.url}}'>{% trans "Match file" %}</a> {% endif %}</td> </tr> {% endfor %} </table> - <input type="submit" onclick="long_wait();return true;" value="{% trans "Validate" %}" /> + <input type="submit" onclick="long_wait();return true;" value="{% trans 'Validate' %}" /> </form> {% endif %} </div> diff --git a/ishtar_common/templates/ishtar/manage_basket.html b/ishtar_common/templates/ishtar/manage_basket.html index a6065a7c2..3292318ea 100644 --- a/ishtar_common/templates/ishtar/manage_basket.html +++ b/ishtar_common/templates/ishtar/manage_basket.html @@ -1,6 +1,5 @@ {% extends "base.html" %} {% load i18n inline_formset %} -{% load url from future %} {% block content %} <h2>{{page_name}}{% trans ":"%} {{basket}}</h2> <form enctype="multipart/form-data" action="." method="post">{% csrf_token %} diff --git a/ishtar_common/templates/ishtar/merge.html b/ishtar_common/templates/ishtar/merge.html index 0e15da62a..de46e95c6 100644 --- a/ishtar_common/templates/ishtar/merge.html +++ b/ishtar_common/templates/ishtar/merge.html @@ -1,5 +1,4 @@ {% extends "base.html" %} -{% load url from future %} {% load i18n inline_formset %} {% block content %} <h2>{% trans "Merge" %}</h2> diff --git a/ishtar_common/templates/ishtar/merge_organization.html b/ishtar_common/templates/ishtar/merge_organization.html index 87eab7d53..10730e8c5 100644 --- a/ishtar_common/templates/ishtar/merge_organization.html +++ b/ishtar_common/templates/ishtar/merge_organization.html @@ -1,5 +1,4 @@ {% extends "ishtar/merge.html" %} -{% load url from future %} {% block merge_field_row %} {% if form.non_field_errors %}<tr><td colspan='4'></td><td colspan='3' class='errorlist'>{% for error in form.non_field_errors %}{{error}} {% endfor%}</tr>{% endif %} <tr> diff --git a/ishtar_common/templates/ishtar/merge_person.html b/ishtar_common/templates/ishtar/merge_person.html index 4e76c804b..0d03112c5 100644 --- a/ishtar_common/templates/ishtar/merge_person.html +++ b/ishtar_common/templates/ishtar/merge_person.html @@ -1,5 +1,4 @@ {% extends "ishtar/merge.html" %} -{% load url from future %} {% block merge_field_row %} {% if form.non_field_errors %}<tr><td colspan='4'></td><td colspan='3' class='errorlist'>{% for error in form.non_field_errors %}{{error}} {% endfor%}</tr>{% endif %} <tr> diff --git a/ishtar_common/templates/ishtar/organization_form.html b/ishtar_common/templates/ishtar/organization_form.html index 21d5ffa9e..828023908 100644 --- a/ishtar_common/templates/ishtar/organization_form.html +++ b/ishtar_common/templates/ishtar/organization_form.html @@ -1,4 +1,4 @@ -{% load i18n %}{% load url from future %} +{% load i18n %} <div id='orga-form'> <form id='dyn-form-organization' method='post'> {% csrf_token %} diff --git a/ishtar_common/templates/ishtar/organization_person_form.html b/ishtar_common/templates/ishtar/organization_person_form.html index 46f2cdc15..e258441b3 100644 --- a/ishtar_common/templates/ishtar/organization_person_form.html +++ b/ishtar_common/templates/ishtar/organization_person_form.html @@ -1,4 +1,4 @@ -{% load i18n %}{% load url from future %} +{% load i18n %} <div id='orga-person-form'> <form id='dyn-form-person' method='post'> {% csrf_token %} diff --git a/ishtar_common/templates/ishtar/person_form.html b/ishtar_common/templates/ishtar/person_form.html index 555aa1a5f..10a49cd52 100644 --- a/ishtar_common/templates/ishtar/person_form.html +++ b/ishtar_common/templates/ishtar/person_form.html @@ -1,4 +1,4 @@ -{% load i18n %}{% load url from future %} +{% load i18n %} <div id='person-form'> <form id='dyn-form-person' method='post'> {% csrf_token %} diff --git a/ishtar_common/templates/ishtar/sheet_organization.html b/ishtar_common/templates/ishtar/sheet_organization.html index 411aa2de3..403eb7dec 100644 --- a/ishtar_common/templates/ishtar/sheet_organization.html +++ b/ishtar_common/templates/ishtar/sheet_organization.html @@ -25,7 +25,7 @@ <td class='string'>{{person.name|default:""}}</td> <td class='string'>{{person.surname|default:""}}</td> <td>{% for type in person.person_types.all %}{% if forloop.counter0 %}, {% endif %}{{type.label}}{% endfor %}</td> - <td class='link'><a class='display_details' href="#" onclick='load_window("{%url show-person person.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td> + <td class='link'><a class='display_details' href="#" onclick='load_window("{% url "show-person" person.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td> </tr> {% empty %} <tr><td colspan="8" class='no_items'>{% trans "No person in this organization" %}</td></tr> diff --git a/ishtar_common/templates/ishtar/sheet_source.html b/ishtar_common/templates/ishtar/sheet_source.html index 244ca1be3..24477ce2c 100644 --- a/ishtar_common/templates/ishtar/sheet_source.html +++ b/ishtar_common/templates/ishtar/sheet_source.html @@ -19,8 +19,8 @@ {% field_li "Source type" item.source_type %} {% field_li "Format type" item.format_type %} {% field_li "Scale" item.scale %} - {% trans "Web link" as weblink_label %} - {% field_li_url weblink_label item.associated_url %} +{% trans "Web link" as weblink_label %} +{% field_li_url weblink_label item.associated_url %} {% field_li "Item number" item.item_number %} {% field_li "Ref." item.reference %} {% field_li "Internal ref." item.internal_reference %} diff --git a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html index 565256552..7339af9a8 100644 --- a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html @@ -18,8 +18,8 @@ {% for form_label, form_data in datas %} <table class='confirm'> <caption>{{form_label}}</caption> - {% for label, data, cls in form_data %} - <tr{%if cls%} class='{{cls}}'{%endif%}><th>{{label}}</th><td>{{data}}</td></tr> + {% for data in form_data %} + <tr{%if data.2%} class='{{data.2}}'{%endif%}><th>{{data.0}}</th><td>{{data.1}}</td></tr> {% endfor %} </table> {% endfor %} diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html index 204feeebe..19076b0de 100644 --- a/ishtar_common/templates/ishtar/wizard/default_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html @@ -1,6 +1,5 @@ {% extends "base.html" %} {% load i18n range table_form %} -{% load url from future %} {% block extra_head %} {{form.media}} {% endblock %} diff --git a/ishtar_common/templates/ishtar/wizard/validation_bar.html b/ishtar_common/templates/ishtar/wizard/validation_bar.html index a1590858f..b99b9e689 100644 --- a/ishtar_common/templates/ishtar/wizard/validation_bar.html +++ b/ishtar_common/templates/ishtar/wizard/validation_bar.html @@ -1,5 +1,4 @@ {% load i18n %} -{% load url from future %} <div id='validation-bar'> <input type="submit" id="submit_form" name='validate' value="{% trans 'Validate' %}"/> {% if last_step_is_available and next_steps %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_done_summary.html b/ishtar_common/templates/ishtar/wizard/wizard_done_summary.html index ad069a738..c82e32557 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_done_summary.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_done_summary.html @@ -7,8 +7,8 @@ {% for form_label, form_data in datas %} <table class='confirm'> <caption>{{form_label}}</caption> - {% for label, data, cls in form_data %} - <tr{%if cls%} class='{{cls}}'{%endif%}><th>{{label}}</th><td>{{data}}</td></th> + {% for data in form_data %} + <tr{%if data.2%} class='{{data.2}}'{%endif%}><th>{{data.0}}</th><td>{{data.1}}</td></th> {% endfor %} </table> {% endfor %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_done_summary_2.html b/ishtar_common/templates/ishtar/wizard/wizard_done_summary_2.html index 2b907ffc6..91f71de43 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_done_summary_2.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_done_summary_2.html @@ -12,8 +12,8 @@ {% for form_label, form_data in datas %} <table class='confirm'> <caption>{{form_label}}</caption> - {% for label, data, cls in form_data %} - <tr{%if cls%} class='{{cls}}'{%endif%}><th>{{label}}</th><td>{{data}}</td></th> + {% for data in form_data %} + <tr{%if data.2%} class='{{data.2}}'{%endif%}><th>{{data.0}}</th><td>{{data.1}}</td></th> {% endfor %} </table> {% endfor %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_list_search_result.html b/ishtar_common/templates/ishtar/wizard/wizard_list_search_result.html index aca1798d9..5b67c9ceb 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_list_search_result.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_list_search_result.html @@ -14,8 +14,8 @@ {% for form_label, form_data in datas %} <table class='confirm'> <caption>{{form_label}}</caption> - {% for label, data, cls in form_data %} - <tr{%if cls%} class='{{cls}}'{%endif%}><th>{{label}}</th><td>{{data}}</td></th> + {% for data in form_data %} + <tr{%if data.2%} class='{{data.2}}'{%endif%}><th>{{data.0}}</th><td>{{data.1}}</td></th> {% endfor %} </table> {% endfor %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html b/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html index c4d765352..4f35f0c90 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html @@ -6,7 +6,8 @@ <h3>{% trans "Associated persons" %}</h3> <ul class='list'> {% for person in current_object.members.all %} - <li>{{person}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-person person.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{person}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-person" person.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -14,7 +15,8 @@ <h3>{% trans "Associated archaeological files" %}</h3> <ul class='list'> {% for file in current_object.files.all %} - <li>{{file}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-file file.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{file}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-file" file.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -22,7 +24,8 @@ <h3>{% trans "Operator of archaeological operations" %}</h3> <ul class='list'> {% for operation in current_object.operator.all %} - <li>{{operation}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-operation operation.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{operation}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-operation" operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -30,7 +33,8 @@ <h3>{% trans "Adminact: operator of archaeological operations" %}</h3> <ul class='list'> {% for adminact in current_object.adminact_operator.all %} - <li>{{adminact}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-administrativeact adminact.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{adminact}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-administrativeact" adminact.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html b/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html index 86286fad0..6d1f06bd1 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html @@ -6,7 +6,8 @@ <h3>{% trans "In charge of archaeological files" %}</h3> <ul class='list'> {% for file in current_object.file_responsability.all %} - <li>{{file}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-file file.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{file}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-file" file.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -14,7 +15,8 @@ <h3>{% trans "General contractor of archaeological files" %}</h3> <ul class='list'> {% for file in current_object.general_contractor.all %} - <li>{{file}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-file file.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{file}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-file" file.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -22,7 +24,8 @@ <h3>{% trans "Responsible for planning service of archaeological files" %}</h3> <ul class='list'> {% for file in current_object.responsible_town_planning_service.all %} - <li>{{file}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-file file.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{file}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-file" file.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -30,7 +33,8 @@ <h3>{% trans "Scientist in charge of archaeological files" %}</h3> <ul class='list'> {% for file in current_object.scientist.all %} - <li>{{file}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-file file.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{file}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-file" file.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -38,7 +42,8 @@ <h3>{% trans "Scientist in charge of archaeological operations" %}</h3> <ul class='list'> {% for operation in current_object.operation_scientist_responsability.all %} - <li>{{operation}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-operation operation.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{operation}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-operation" operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -46,7 +51,8 @@ <h3>{% trans "In charge of archaeological operations" %}</h3> <ul class='list'> {% for operation in current_object.operation_responsability.all %} - <li>{{operation}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-operation operation.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{operation}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-operation" operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -54,7 +60,8 @@ <h3>{% trans "Rapporteur CIRA des operations" %}</h3> <ul class='list'> {% for operation in current_object.cira_rapporteur.all %} - <li>{{operation}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-operation operation.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{operation}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-operation" operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -62,7 +69,8 @@ <h3>{% trans "Administrativ act: in charge of archaeological operations" %}</h3> <ul class='list'> {% for adminact in current_object.adminact_operation_in_charge.all %} - <li>{{adminact}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-administrativeact adminact.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{adminact}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-administrativeact" adminact.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -70,7 +78,8 @@ <h3>{% trans "Administrativ act: scientist in charge" %}</h3> <ul class='list'> {% for adminact in current_object.adminact_scientist.all %} - <li>{{adminact}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-administrativeact adminact.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{adminact}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-administrativeact" adminact.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -78,7 +87,8 @@ <h3>{% trans "Administrativ act: signatory" %}</h3> <ul class='list'> {% for adminact in current_object.signatory.all %} - <li>{{adminact}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-administrativeact adminact.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{adminact}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-administrativeact" adminact.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} @@ -95,10 +105,14 @@ <ul class='list'> {% for treatments in current_object.treatments.all %} {% if treatment.downstream_treatment %} - <li>{{treatment.downstream_treatment}} ({% trans "downstream"%}) <a class='display_details_inline' href="#" onclick='load_window("{%url show-item treatment.downstream_treatment ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li> + <li>{{treatment.downstream_treatment}} ({% trans "downstream"%}) <a + class='display_details_inline' href="#" + onclick='load_window("{% url "show-item" treatment.downstream_treatment "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li> {% endif %} {% if treatment.upstream_treatment %} - <li>{{treatment.upstream_treatment}} ({% trans "upstream"%}) <a class='display_details_inline' href="#" onclick='load_window("{%url show-find treatment.upstream_treatment ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li> + <li>{{treatment.upstream_treatment}} ({% trans "upstream"%}) <a + class='display_details_inline' href="#" + onclick='load_window("{% url "show-find" treatment.upstream_treatment "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li> {% endif %} {% endfor %} </ul> @@ -108,7 +122,8 @@ <h3>{% trans "Property of items" %}</h3> <ul class='list'> {% for property in current_object.properties.all %} - <li>{{property.find}} <a class='display_details_inline' href="#" onclick='load_window("{%url show-find property.find.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} + <li>{{property.find}} <a class='display_details_inline' href="#" + onclick='load_window("{% url "show-find" property.find.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></li>{% endfor %} </ul> {% endif %} diff --git a/ishtar_common/templates/registration/activation_complete.html b/ishtar_common/templates/registration/activation_complete.html index b243d22f2..7db8c186e 100644 --- a/ishtar_common/templates/registration/activation_complete.html +++ b/ishtar_common/templates/registration/activation_complete.html @@ -1,5 +1,4 @@ {% extends "base.html" %} -{% load url from future %} {% load i18n %} {% block content %} diff --git a/ishtar_common/templates/registration/login.html b/ishtar_common/templates/registration/login.html index ada4f6aa9..e8122f150 100644 --- a/ishtar_common/templates/registration/login.html +++ b/ishtar_common/templates/registration/login.html @@ -13,7 +13,7 @@ </form> </div> <div class='info'> -<p>{% trans "Forgot password?" %} <a href="{% url auth_password_reset %}">{% trans "Reset it" %}</a></p> -<p>{% trans "Not member?" %} <a href="{% url registration_register %}">{% trans "Register" %}</a></p> +<p>{% trans "Forgot password?" %} <a href="{% url 'auth_password_reset' %}">{% trans "Reset it" %}</a></p> +<p>{% trans "Not member?" %} <a href="{% url 'registration_register' %}">{% trans "Register" %}</a></p> </div> {% endblock %} diff --git a/ishtar_common/templates/welcome.html b/ishtar_common/templates/welcome.html index 508f7be02..4b9f3b5c5 100644 --- a/ishtar_common/templates/welcome.html +++ b/ishtar_common/templates/welcome.html @@ -1,5 +1,4 @@ {% load i18n %} -{% load url from future %} <h2>{% trans "Welcome in Ishtar, open source software for management and inventory of archaeological data" %}</h2> {{random_image}} diff --git a/ishtar_common/templatetags/link_to_window.py b/ishtar_common/templatetags/link_to_window.py index 14e4bd6c7..f157b6255 100644 --- a/ishtar_common/templatetags/link_to_window.py +++ b/ishtar_common/templatetags/link_to_window.py @@ -60,12 +60,16 @@ def add_links(items, extra_attr=''): takes_context=True) def modify_toolbar(context, item, action): request = context.get('request') - items_by_idx = request.session['MENU'].items_by_idx.keys() + menu = context.get('MENU', None) + print("TODO: link_to_window - check") + if not menu: + return {} + items_by_idx = menu.items_by_idx.keys() if action not in items_by_idx: return {} - menu = request.session['MENU'].items_by_idx[action] + action = menu.items_by_idx[action] user = request.user if not hasattr(user, 'ishtaruser') or \ - not menu.is_available(user.ishtaruser, item): + not action.is_available(user.ishtaruser, item): return {} return {'item': item} diff --git a/ishtar_common/templatetags/window_field.py b/ishtar_common/templatetags/window_field.py index 5180955d8..022986493 100644 --- a/ishtar_common/templatetags/window_field.py +++ b/ishtar_common/templatetags/window_field.py @@ -25,10 +25,8 @@ def field_li(caption, data, pre_data='', post_data=''): def field_url(caption, link, link_name='', li=False): if link: link = link.strip() - if not link: - return u'' - if not link.startswith('http://') and not link.startswith('https://'): - link = 'http://' + link + if not link.startswith('http://') and not link.startswith('https://'): + link = 'http://' + link return {'caption': caption, 'link': link, "link_name": link_name, 'li': li} diff --git a/ishtar_common/templatetags/window_tables.py b/ishtar_common/templatetags/window_tables.py index bf4dd2b1a..00274c25f 100644 --- a/ishtar_common/templatetags/window_tables.py +++ b/ishtar_common/templatetags/window_tables.py @@ -84,7 +84,7 @@ def dynamic_table_document( if output == 'html': col_names, extra_cols = grid.get_cols() t = get_template('ishtar/blocks/window_tables/dynamic_documents.html') - context = template.Context({ + context = { 'caption': caption, 'name': '{}{}{}'.format(slugify(caption), key, int(time.time())), 'source': source + source_attrs, @@ -97,7 +97,7 @@ def dynamic_table_document( 'loading': unicode(_("Loading...")), 'encoding': settings.ENCODING or 'utf-8', 'large': large - }) + } return t.render(context) else: col_names, extra_cols = grid.get_cols(python=True) @@ -126,11 +126,11 @@ def dynamic_table_document( d.append('') data.append(d) t = get_template('ishtar/blocks/window_tables/static_documents.html') - context = template.Context({ + context = { 'caption': caption, 'col_names': col_names, 'data': data - }) + } return t.render(context) diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index b862b4ea7..4afc74c9b 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -19,6 +19,8 @@ from bs4 import BeautifulSoup as Soup import datetime +import os +import shutil from StringIO import StringIO from django.conf import settings @@ -26,48 +28,18 @@ from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.cache import cache from django.core.exceptions import ValidationError -from django.core.files.base import File as DjangoFile -from django.core.files.uploadedfile import SimpleUploadedFile +from django.core.files import File as DjangoFile from django.core.management import call_command from django.core.urlresolvers import reverse -from django.db import connection, transaction from django.template.defaultfilters import slugify from django.test import TestCase as BaseTestCase from django.test.client import Client -from django.test.simple import DjangoTestSuiteRunner +from django.test.runner import DiscoverRunner from ishtar_common import models -from ishtar_common import forms_common +from ishtar_common import views from ishtar_common.utils import post_save_point -from archaeological_context_records.models import CRBulkView -from archaeological_finds.models import BFBulkView, FBulkView, FirstBaseFindView - -""" -from django.conf import settings -import tempfile, datetime -from zipfile import ZipFile, ZIP_DEFLATED - -from oook_replace.oook_replace import oook_replace - -class OOOGenerationTest(TestCase): - def testGeneration(self): - context = {'test_var':u"Testé", 'test_var2':u"", - "test_date":datetime.date(2015, 1, 1)} - tmp = tempfile.TemporaryFile() - oook_replace("../ishtar_common/tests/test-file.odt", tmp, context) - inzip = ZipFile(tmp, 'r', ZIP_DEFLATED) - value = inzip.read('content.xml') - self.assertTrue(u"Testé" in value or "Testé" in value) - self.assertTrue("testé 2" not in value and "testé 2" not in value) - self.assertTrue("2015" in value) - lg, ct = settings.LANGUAGE_CODE.split('-') - if lg == 'fr': - self.assertTrue('janvier' in value) - if lg == 'en': - self.assertTrue('january' in value) -""" - COMMON_FIXTURES = [ settings.ROOT_PATH + '../fixtures/initial_data-auth-fr.json', @@ -80,21 +52,32 @@ COMMON_FIXTURES = [ OPERATION_FIXTURES = COMMON_FIXTURES + [ settings.ROOT_PATH + - '../archaeological_operations/fixtures/initial_data-fr.json' + '../archaeological_operations/fixtures/initial_data-fr.json', + '../archaeological_operations/fixtures/' + 'initial_data_relation_type_norel-fr.json', + '../archaeological_operations/fixtures/initial_data_relation_type-fr.json', ] def create_superuser(): username = 'username4277' password = 'dcbqj756456!@%' + q = User.objects.filter(username=username) + if q.count(): + return username, password, q.all()[0] user = User.objects.create_superuser(username, "nomail@nomail.com", password) + user.set_password(password) + user.save() return username, password, user def create_user(): username = 'username678' - password = 'dcbqj756456!@%' + password = 'dcbqj756aaa456!@%' + q = User.objects.filter(username=username) + if q.count(): + return username, password, q.all()[0] user = User.objects.create_user(username, email="nomail2@nomail.com") user.set_password(password) user.save() @@ -102,14 +85,7 @@ def create_user(): class TestCase(BaseTestCase): - def _pre_setup(self): - super(TestCase, self)._pre_setup() - if settings.USE_SPATIALITE_FOR_TESTS: - return - c = connection.cursor() - for view in [CRBulkView, FirstBaseFindView, BFBulkView, FBulkView]: - c.execute(view.CREATE_SQL) - transaction.commit_unless_managed() + pass class CommandsTestCase(TestCase): @@ -132,7 +108,7 @@ class WizardTestFormData(object): """ Test set to simulate wizard steps """ - def __init__(self, name, form_datas, ignored=[], pre_tests=[], + def __init__(self, name, form_datas={}, ignored=[], pre_tests=[], extra_tests=[]): """ :param name: explicit name of the test @@ -159,6 +135,8 @@ class WizardTestFormData(object): :param value: value :return: None """ + if form_name not in self.form_datas: + self.form_datas[form_name] = {} self.form_datas[form_name][field_name] = value def append(self, form_name, value): @@ -169,6 +147,8 @@ class WizardTestFormData(object): :param value: value :return: None """ + if form_name not in self.form_datas: + self.form_datas[form_name] = {} self.form_datas[form_name].append(value) def inits(self, test_object): @@ -182,7 +162,6 @@ class WizardTestFormData(object): if suffix in form_name: continue self.form_datas[form_name + suffix] = self.form_datas.pop(form_name) - for pre in self.pre_tests: pre(test_object) @@ -194,15 +173,15 @@ class WizardTestFormData(object): test(test_object, final_step_response) -class ManagedModelTestRunner(DjangoTestSuiteRunner): +class ManagedModelTestRunner(DiscoverRunner): """ Test runner that automatically makes all unmanaged models in your Django project managed for the duration of the test run, so that one doesn't need to execute the SQL manually to create them. """ def setup_test_environment(self, *args, **kwargs): - from django.db.models.loading import get_models - self.unmanaged_models = [m for m in get_models() + from django.apps import apps + self.unmanaged_models = [m for m in apps.get_models() if not m._meta.managed] for m in self.unmanaged_models: m._meta.managed = True @@ -283,8 +262,8 @@ class WizardTest(object): next_form_is_checked = len(self.steps) > idx + 1 and \ self.steps[idx + 1][0] not in ignored try: - response = self.client.post(url, data, - follow=not next_form_is_checked) + response = self.client.post( + url, data, follow=not next_form_is_checked) except ValidationError as e: msg = u"Errors: {} on {}. On \"ManagementForm data is " \ u"missing or...\" error verify the wizard_name or " \ @@ -347,8 +326,15 @@ class AccessControlTest(TestCase): user, created = User.objects.get_or_create(username='myusername') user.is_superuser = True user.save() - ishtar_user = models.IshtarUser.objects.get(username=user.username) + ishtar_user = models.IshtarUser.objects.get( + user_ptr__username='myusername') self.assertIn(admin, ishtar_user.person.person_types.all()) + user = ishtar_user.user_ptr + user.is_superuser = False + user.save() + ishtar_user = models.IshtarUser.objects.get( + user_ptr__username='myusername') + self.assertNotIn(admin, ishtar_user.person.person_types.all()) class AdminGenTypeTest(TestCase): @@ -362,11 +348,14 @@ class AdminGenTypeTest(TestCase): module_name = 'ishtar_common' def setUp(self): - password = 'mypassword' - my_admin = User.objects.create_superuser( - 'myuser', 'myemail@test.com', password) + self.password = 'mypassword' + self.username = "myuser" + user = User.objects.create_superuser( + self.username, 'myemail@test.com', self.password) + user.set_password(self.password) + user.save() self.client = Client() - self.client.login(username=my_admin.username, password=password) + self.client.login(username=self.username, password=self.password) def test_listing_and_detail(self): for model in self.models: @@ -379,7 +368,7 @@ class AdminGenTypeTest(TestCase): response.status_code, 200, msg="Can not access admin list for {}.".format(model)) if model in self.models_with_data: - url = base_url + "{}/".format(model.objects.all()[0].pk) + url = base_url + "{}/change/".format(model.objects.all()[0].pk) response = self.client.get(url) self.assertEqual( response.status_code, 200, @@ -742,7 +731,8 @@ class ShortMenuTest(TestCase): def test_treatment_file(self): c = Client() c.login(username=self.username, password=self.password) - from archaeological_finds.models import TreatmentFile, TreatmentFileType + from archaeological_finds.models import TreatmentFile, \ + TreatmentFileType tf = TreatmentFile.objects.create( type=TreatmentFileType.objects.create(), year=2050 @@ -873,10 +863,14 @@ class ImportTest(TestCase): klass='ishtar_common.models.Person', name='Person') importer_type = models.ImporterType.objects.create( associated_models=imp_model) - mcc_operation_file = DjangoFile(file( + + dest = os.path.join(settings.MEDIA_ROOT, "MCC-operations-example.csv") + shutil.copy( settings.ROOT_PATH + '../archaeological_operations/tests/MCC-operations-example.csv', - 'rb')) + dest + ) + mcc_operation_file = DjangoFile(file(dest, 'rb')) imprt = models.Import.objects.create( user=models.IshtarUser.objects.all()[0], importer_type=importer_type, @@ -998,11 +992,12 @@ class IshtarSiteProfileTest(TestCase): class IshtarBasicTest(TestCase): def setUp(self): - password = 'mypassword' - my_admin = User.objects.create_superuser( - 'myuser', 'myemail@test.com', password) + self.password = 'mypassword' + self.my_admin = User.objects.create_superuser( + 'myuser', 'myemail@test.com', self.password) self.client = Client() - self.client.login(username=my_admin.username, password=password) + self.client.login(username=self.my_admin.username, + password=self.password) def test_status(self): response = self.client.get(reverse('status')) @@ -1015,6 +1010,34 @@ class IshtarBasicTest(TestCase): person.save() self.assertEqual(person.raw_name, "WEASLEY George") + def test_show(self): + person = models.Person.objects.create(name="Weasley", surname="Bill") + orga_type = models.OrganizationType.objects.create( + txt_idx='test', label='testy') + company = models.Organization.objects.create( + history_modifier=self.my_admin, name='Franquin Comp.', + organization_type=orga_type) + c = Client() + + response = c.get(reverse('show-person', kwargs={'pk': person.pk})) + self.assertEqual(response.status_code, 200) + # empty content when not allowed + self.assertEqual(response.content, "") + response = c.get(reverse('show-organization', + kwargs={'pk': company.pk})) + self.assertEqual(response.status_code, 200) + # empty content when not allowed + self.assertEqual(response.content, "") + + c.login(username=self.my_admin.username, password=self.password) + response = c.get(reverse('show-person', kwargs={'pk': person.pk})) + self.assertEqual(response.status_code, 200) + self.assertIn('class="sheet"', response.content) + response = c.get(reverse('show-organization', + kwargs={'pk': company.pk})) + self.assertEqual(response.status_code, 200) + self.assertIn('class="sheet"', response.content) + class GeomaticTest(TestCase): def test_post_save_point(self): @@ -1041,3 +1064,74 @@ class GeomaticTest(TestCase): post_save_point(None, instance=obj) self.assertIsNotNone(obj.point_2d) self.assertIsNotNone(obj.point) + + +class AccountWizardTest(WizardTest, TestCase): + fixtures = [settings.ROOT_PATH + + '../fixtures/initial_data-auth-fr.json', + settings.ROOT_PATH + + '../ishtar_common/fixtures/initial_data-fr.json',] + url_name = 'account_management' + wizard_name = 'account_wizard' + steps = views.account_wizard_steps + form_datas = [ + WizardTestFormData( + "Add an account", + form_datas={ + 'account': { + 'username': "My username", + 'email': "test@example.com", + 'hidden_password': "my_pass", + 'hidden_password_confirm': "my_pass", + } + }, + ), + ] + + def pre_wizard(self): + self.person = models.Person.objects.create( + name='Boule', surname=' ', + ) + self.form_datas[0].set('selec', 'pk', self.person.pk) + self.form_datas[0].set('account', 'pk', self.person.pk) + + self.account_number = models.IshtarUser.objects.count() + super(AccountWizardTest, self).pre_wizard() + + def post_wizard(self): + person = models.Person.objects.get(pk=self.person.pk) + user = person.ishtaruser.user_ptr + self.assertEqual(user.username, "My username") + self.assertEqual(user.email, "test@example.com") + self.assertEqual(models.IshtarUser.objects.count(), + self.account_number + 1) + + +class DashboardTest(TestCase): + + def setUp(self): + self.username, self.password, self.user = create_superuser() + profile, created = models.IshtarSiteProfile.objects.get_or_create( + slug='default', active=True) + profile.files = True + profile.context_record = True + profile.find = True + profile.warehouse = True + profile.save() + + def test_dashboard(self): + c = Client() + c.login(username=self.username, password=self.password) + + url = 'dashboard-main-detail' + + response = c.get(reverse(url, kwargs={'item_name': "zorglub"})) + self.assertEqual( + response.status_code, 404) + + for item in ['users', 'files', 'treatmentfiles', 'treatments', + 'operations', 'contextrecords', 'finds']: + response = c.get(reverse(url, kwargs={'item_name': item})) + self.assertEqual( + response.status_code, 200, + "Reaching dashboard for item: {} return an error.".format(url)) diff --git a/ishtar_common/tests/old.odt b/ishtar_common/tests/old.odt Binary files differnew file mode 100644 index 000000000..4d13ac834 --- /dev/null +++ b/ishtar_common/tests/old.odt diff --git a/ishtar_common/urls.py b/ishtar_common/urls.py index 5abec4215..ce3386363 100644 --- a/ishtar_common/urls.py +++ b/ishtar_common/urls.py @@ -18,9 +18,9 @@ # See the file COPYING for details. from django.conf import settings -from django.conf.urls.defaults import patterns, include, url +from django.conf.urls import include, url from django.conf.urls.static import static -from django.views.generic.simple import direct_to_template +from django.views.generic import TemplateView from menus import menu @@ -30,11 +30,10 @@ from ishtar_common.wizards import check_rights # be careful: each check_rights must be relevant with ishtar_menu # forms -urlpatterns = patterns( - '', +urlpatterns = [ url(r'^status/$', views.status, name='status'), - url(r'^robots\.txt$', direct_to_template, - {'template': 'robots.txt', 'mimetype': 'text/plain'}), + url(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt', + content_type='text/plain')), # internationalization url(r'^i18n/', include('django.conf.urls.i18n')), # General @@ -114,7 +113,7 @@ urlpatterns = patterns( views.ImportDeleteView.as_view(), name='import_delete'), url(r'^import-link-unmatched/(?P<pk>[0-9]+)/$', views.ImportLinkView.as_view(), name='import_link_unmatched'), -) +] actions = [] for section in menu.childs: @@ -127,62 +126,61 @@ for section in menu.childs: actions = r"|".join(actions) # other views -urlpatterns += patterns( - 'ishtar_common.views', +urlpatterns += [ # General - url(r'dashboard-main/$', 'dashboard_main', + url(r'dashboard-main/$', views.dashboard_main, name='dashboard-main'), - url(r'dashboard-main/(?P<item_name>[a-z-]+)/$', 'dashboard_main_detail', + url(r'dashboard-main/(?P<item_name>[a-z-]+)/$', views.dashboard_main_detail, name='dashboard-main-detail'), - url(r'update-current-item/$', 'update_current_item', + url(r'update-current-item/$', views.update_current_item, name='update-current-item'), - url(r'pin/(?P<item_type>[a-z-]+)/(?P<pk>\d+)/$', 'update_current_item', + url(r'pin/(?P<item_type>[a-z-]+)/(?P<pk>\d+)/$', views.update_current_item, name='pin'), - url(r'unpin/(?P<item_type>[a-z-]+)/$', 'unpin', name='unpin'), + url(r'unpin/(?P<item_type>[a-z-]+)/$', views.unpin, name='unpin'), url(r'get-by-importer/(?P<slug>[\w-]+)/(?P<type>[a-z-]+)?$', - 'get_by_importer', name='get-by-importer'), + views.get_by_importer, name='get-by-importer'), url(r'new-person/(?:(?P<parent_name>[^/]+)/)?(?:(?P<limits>[^/]+)/)?$', - 'new_person', name='new-person'), + views.new_person, name='new-person'), url(r'new-person-noorga/' r'(?:(?P<parent_name>[^/]+)/)?(?:(?P<limits>[^/]+)/)?$', - 'new_person_noorga', name='new-person-noorga'), + views.new_person_noorga, name='new-person-noorga'), url(r'autocomplete-person(?:/([0-9_]+))?(?:/([0-9_]*))?/(user)?$', - 'autocomplete_person', name='autocomplete-person'), + views.autocomplete_person, name='autocomplete-person'), url(r'autocomplete-person-permissive(?:/([0-9_]+))?(?:/([0-9_]*))?' - r'/(user)?$', 'autocomplete_person_permissive', + r'/(user)?$', views.autocomplete_person_permissive, name='autocomplete-person-permissive'), - url(r'get-person/(?P<type>.+)?$', 'get_person', + url(r'get-person/(?P<type>.+)?$', views.get_person, name='get-person'), - url(r'get-person-full/(?P<type>.+)?$', 'get_person', + url(r'get-person-full/(?P<type>.+)?$', views.get_person, name='get-person-full', kwargs={'full': True}), url(r'show-person(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_person', name='show-person'), - url(r'department-by-state/(?P<state_id>.+)?$', 'department_by_state', + views.show_person, name='show-person'), + url(r'department-by-state/(?P<state_id>.+)?$', views.department_by_state, name='department-by-state'), - url(r'autocomplete-town/?$', 'autocomplete_town', + url(r'autocomplete-town/?$', views.autocomplete_town, name='autocomplete-town'), url(r'autocomplete-advanced-town/(?P<department_id>[0-9]+[ABab]?)?$', - 'autocomplete_advanced_town', name='autocomplete-advanced-town'), - url(r'autocomplete-department/?$', 'autocomplete_department', + views.autocomplete_advanced_town, name='autocomplete-advanced-town'), + url(r'autocomplete-department/?$', views.autocomplete_department, name='autocomplete-department'), url(r'new-author/(?:(?P<parent_name>[^/]+)/)?(?:(?P<limits>[^/]+)/)?$', - 'new_author', name='new-author'), - url(r'autocomplete-author/$', 'autocomplete_author', + views.new_author, name='new-author'), + url(r'autocomplete-author/$', views.autocomplete_author, name='autocomplete-author'), url(r'new-organization/(?:(?P<parent_name>[^/]+)/)?' r'(?:(?P<limits>[^/]+)/)?$', - 'new_organization', name='new-organization'), - url(r'get-organization/(?P<type>.+)?$', 'get_organization', + views.new_organization, name='new-organization'), + url(r'get-organization/(?P<type>.+)?$', views.get_organization, name='get-organization'), - url(r'get-organization-full/(?P<type>.+)?$', 'get_organization', + url(r'get-organization-full/(?P<type>.+)?$', views.get_organization, name='get-organization-full', kwargs={'full': True}), url(r'show-organization(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_organization', name='show-organization'), + views.show_organization, name='show-organization'), url(r'autocomplete-organization/([0-9_]+)?$', - 'autocomplete_organization', name='autocomplete-organization'), + views.autocomplete_organization, name='autocomplete-organization'), url(r'admin-globalvar/', views.GlobalVarEdit.as_view(), name='admin-globalvar'), - url(r'person-merge/(?:(?P<page>\d+)/)?$', 'person_merge', + url(r'person-merge/(?:(?P<page>\d+)/)?$', views.person_merge, name='person_merge'), url(r'person-manual-merge/$', views.PersonManualMerge.as_view(), @@ -190,28 +188,28 @@ urlpatterns += patterns( url(r'person-manual-merge-items/(?P<pks>[0-9_]+?)/$', views.PersonManualMergeItems.as_view(), name='person_manual_merge_items'), - url(r'organization-merge/(?:(?P<page>\d+)/)?$', 'organization_merge', + url(r'organization-merge/(?:(?P<page>\d+)/)?$', views.organization_merge, name='organization_merge'), url(r'orga-manual-merge/$', views.OrgaManualMerge.as_view(), name='orga_manual_merge'), url(r'orga-manual-merge-items/(?P<pks>[0-9_]+?)/$', views.OrgaManualMergeItems.as_view(), name='orga_manual_merge_items'), - url(r'reset/$', 'reset_wizards', name='reset_wizards'), - url(r'activate-all-search/$', 'activate_all_search', + url(r'reset/$', views.reset_wizards, name='reset_wizards'), + url(r'activate-all-search/$', views.activate_all_search, name='activate-all-search'), - url(r'activate-own-search/$', 'activate_own_search', + url(r'activate-own-search/$', views.activate_own_search, name='activate-own-search'), - url(r'activate-advanced-menu/$', 'activate_advanced_shortcut_menu', + url(r'activate-advanced-menu/$', views.activate_advanced_shortcut_menu, name='activate-advanced-menu'), - url(r'activate-simple-menu/$', 'activate_simple_shortcut_menu', + url(r'activate-simple-menu/$', views.activate_simple_shortcut_menu, name='activate-simple-menu'), - url(r'hide-shortcut-menu/$', 'hide_shortcut_menu', + url(r'hide-shortcut-menu/$', views.hide_shortcut_menu, name='hide-shortcut-menu'), - url(r'show-shortcut-menu/$', 'show_shortcut_menu', + url(r'show-shortcut-menu/$', views.show_shortcut_menu, name='show-shortcut-menu'), - url(r'(?P<action_slug>' + actions + r')/$', 'action', name='action'), -) + url(r'(?P<action_slug>' + actions + r')/$', views.action, name='action'), +] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index f1e2e4b96..c6a4032f0 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -17,7 +17,9 @@ # See the file COPYING for details. +import datetime from functools import wraps +from itertools import chain import hashlib import random @@ -31,6 +33,24 @@ from django.utils.translation import ugettext_lazy as _, ugettext from django.template.defaultfilters import slugify +class BColors: + """ + Bash colors. Don't forget to finish your colored string with ENDC. + """ + HEADER = '\033[95m' + OKBLUE = '\033[94m' + OKGREEN = '\033[92m' + WARNING = '\033[93m' + FAIL = '\033[91m' + ENDC = '\033[0m' + BOLD = '\033[1m' + UNDERLINE = '\033[4m' + + +def get_current_year(): + return datetime.datetime.now().year + + def get_cache(cls, extra_args=[]): cache_key = u"{}-{}-{}".format( settings.PROJECT_SLUG, cls._meta.app_label, cls.__name__) @@ -222,3 +242,50 @@ def post_save_point(sender, **kwargs): instance.skip_history_when_saving = True instance.save() return + + +def create_slug(model, name, slug_attr='slug', max_length=100): + base_slug = slugify(name) + slug = base_slug[:max_length] + final_slug = None + idx = 1 + while not final_slug: + if slug and not model.objects.filter(**{slug_attr:slug}).exists(): + final_slug = slug + break + slug = base_slug[:(max_length - 1 - len(str(idx)))] + "-" + str(idx) + idx += 1 + return final_slug + + +def get_all_field_names(model): + return list(set(chain.from_iterable( + (field.name, field.attname) if hasattr(field, 'attname') else ( + field.name,) + for field in model._meta.get_fields() + if not (field.many_to_one and field.related_model is None) + ))) + + +def get_all_related_m2m_objects_with_model(model): + return [ + (f, f.model if f.model != model else None) + for f in model._meta.get_fields(include_hidden=True) + if f.many_to_many and f.auto_created + ] + + +def get_all_related_many_to_many_objects(model): + return [ + f for f in model._meta.get_fields(include_hidden=True) + if f.many_to_many and f.auto_created + ] + + +def get_all_related_objects(model): + return [ + f for f in model._meta.get_fields() + if (f.one_to_many or f.one_to_one) + and f.auto_created and not f.concrete + ] + diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 86c87d049..d56165bf4 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -19,11 +19,15 @@ from tidylib import tidy_document as tidy -from copy import copy +from copy import copy, deepcopy import csv import cStringIO as StringIO import datetime + +import reportlab +reportlab.Version = "2.2" # stupid hack for an old library... import ho.pisa as pisa + import json import logging from markdown import markdown @@ -44,8 +48,8 @@ from django.db.models.fields import FieldDoesNotExist from django.forms.models import modelformset_factory from django.http import HttpResponse, Http404, HttpResponseRedirect, \ HttpResponseBadRequest -from django.shortcuts import render_to_response, redirect -from django.template import RequestContext, loader +from django.shortcuts import redirect, render +from django.template import loader from django.utils.decorators import method_decorator from django.utils.translation import ugettext, ugettext_lazy as _ from django.views.generic import ListView, UpdateView, TemplateView @@ -68,7 +72,8 @@ from archaeological_finds.forms import DashboardTreatmentForm, \ from ishtar_common.forms import FinalForm, FinalDeleteForm from ishtar_common.widgets import JQueryAutoComplete -from ishtar_common.utils import get_random_item_image_link, shortify +from ishtar_common.utils import get_random_item_image_link, shortify, \ + get_all_field_names from ishtar_common import forms_common as forms from ishtar_common import wizards from ishtar_common.models import HistoryError, PRIVATE_FIELDS, \ @@ -109,13 +114,11 @@ def index(request): else: dct['random_image'] = image try: - return render_to_response('index.html', dct, - context_instance=RequestContext(request)) + return render(request, 'index.html', dct) except NoReverseMatch: # probably rights exception (rights revoked) logout(request) - return render_to_response('index.html', dct, - context_instance=RequestContext(request)) + return render(request, 'index.html', dct) person_search_wizard = wizards.SearchWizard.as_view( [('general-person_search', forms.PersonFormSelection)], @@ -186,10 +189,13 @@ organization_deletion_wizard = wizards.OrganizationDeletionWizard.as_view( label=_(u"Organization deletion"), url_name='organization_deletion',) +account_wizard_steps = [ + ('selec-account_management', forms.PersonUserFormSelection), + ('account-account_management', forms.AccountForm), + ('final-account_management', forms.FinalAccountForm)] + account_management_wizard = wizards.AccountWizard.as_view( - [('selec-account_management', forms.PersonUserFormSelection), - ('account-account_management', forms.AccountForm), - ('final-account_management', forms.FinalAccountForm)], + account_wizard_steps, label=_(u"Account management"), url_name='account_management',) @@ -214,44 +220,44 @@ def get_autocomplete_generic(model, extra={'available': True}): else unicode(x) data = json.dumps([{'id': obj.pk, 'value': get_label(obj)} for obj in objects]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') return func def hide_shortcut_menu(request): request.session['SHORTCUT_SHOW'] = 'off' - return HttpResponse('OK', mimetype='text/plain') + return HttpResponse('OK', content_type='text/plain') def show_shortcut_menu(request): request.session['SHORTCUT_SHOW'] = 'on' - return HttpResponse('OK', mimetype='text/plain') + return HttpResponse('OK', content_type='text/plain') def activate_all_search(request): request.session['SHORTCUT_SEARCH'] = 'all' - return HttpResponse('OK', mimetype='text/plain') + return HttpResponse('OK', content_type='text/plain') def activate_own_search(request): request.session['SHORTCUT_SEARCH'] = 'own' - return HttpResponse('OK', mimetype='text/plain') + return HttpResponse('OK', content_type='text/plain') def activate_advanced_shortcut_menu(request): if not hasattr(request.user, 'ishtaruser'): - return HttpResponse('KO', mimetype='text/plain') + return HttpResponse('KO', content_type='text/plain') request.user.ishtaruser.advanced_shortcut_menu = True request.user.ishtaruser.save() - return HttpResponse('OK', mimetype='text/plain') + return HttpResponse('OK', content_type='text/plain') def activate_simple_shortcut_menu(request): if not hasattr(request.user, 'ishtaruser'): - return HttpResponse('KO', mimetype='text/plain') + return HttpResponse('KO', content_type='text/plain') request.user.ishtaruser.advanced_shortcut_menu = False request.user.ishtaruser.save() - return HttpResponse('OK', mimetype='text/plain') + return HttpResponse('OK', content_type='text/plain') def shortcut_menu(request): @@ -288,9 +294,9 @@ def shortcut_menu(request): model).render( model.SLUG + '-shortcut', value=current, attrs={'id': 'current_' + model.SLUG}))) - return render_to_response( - 'ishtar/blocks/advanced_shortcut_menu.html', - dct, context_instance=RequestContext(request)) + return render( + request, 'ishtar/blocks/advanced_shortcut_menu.html', dct + ) dct = { 'current_menu': [], 'SHORTCUT_SHOW': request.session['SHORTCUT_SHOW'] @@ -333,8 +339,7 @@ def shortcut_menu(request): dct['current_menu'].append((lbl, model_name, cls, items)) if new_selected_item: current_selected_item[model_name] = new_selected_item - return render_to_response('ishtar/blocks/shortcut_menu.html', dct, - context_instance=RequestContext(request)) + return render(request, 'ishtar/blocks/shortcut_menu.html', dct) CURRENT_ITEM_KEYS = (('file', File), ('operation', Operation), @@ -352,7 +357,7 @@ def get_current_items(request): if key in request.session and request.session[key]: try: currents[key] = model.objects.get(pk=int(request.session[key])) - except (ValueError, File.DoesNotExist): + except (ValueError, model.DoesNotExist): continue return currents @@ -462,7 +467,7 @@ def autocomplete_person(request, person_types=None, attached_to=None, own_items = request.user.has_perm('ishtar_common.view_own_person', models.Person) if not all_items and not own_items or not request.GET.get('term'): - return HttpResponse('[]', mimetype='text/plain') + return HttpResponse('[]', content_type='text/plain') q = request.GET.get('term') limit = request.GET.get('limit', 20) try: @@ -493,12 +498,12 @@ def autocomplete_person(request, person_types=None, attached_to=None, persons = models.Person.objects.filter(query)[:limit] data = json.dumps([{'id': person.pk, 'value': unicode(person)} for person in persons if person]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def autocomplete_department(request): if not request.GET.get('term'): - return HttpResponse('[]', mimetype='text/plain') + return HttpResponse('[]', content_type='text/plain') q = request.GET.get('term') q = unicodedata.normalize("NFKD", q).encode('ascii', 'ignore') query = Q() @@ -509,12 +514,12 @@ def autocomplete_department(request): departments = models.Department.objects.filter(query)[:limit] data = json.dumps([{'id': department.pk, 'value': unicode(department)} for department in departments]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def autocomplete_town(request): if not request.GET.get('term'): - return HttpResponse(mimetype='text/plain') + return HttpResponse(content_type='text/plain') q = request.GET.get('term') q = unicodedata.normalize("NFKD", q).encode('ascii', 'ignore') query = Q() @@ -527,12 +532,12 @@ def autocomplete_town(request): towns = models.Town.objects.filter(query)[:limit] data = json.dumps([{'id': town.pk, 'value': unicode(town)} for town in towns]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def autocomplete_advanced_town(request, department_id=None, state_id=None): if not request.GET.get('term'): - return HttpResponse(mimetype='text/plain') + return HttpResponse(content_type='text/plain') q = request.GET.get('term') q = unicodedata.normalize("NFKD", q).encode('ascii', 'ignore') query = Q() @@ -556,7 +561,7 @@ def autocomplete_advanced_town(request, department_id=None, state_id=None): val += " (%s)" % town.numero_insee result.append({'id': town.pk, 'value': val}) data = json.dumps(result) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def department_by_state(request, state_id=''): @@ -567,7 +572,7 @@ def department_by_state(request, state_id=''): data = json.dumps([{'id': department.pk, 'number': department.number, 'value': unicode(department)} for department in departments]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def format_val(val): @@ -585,6 +590,23 @@ HIERARCHIC_FIELDS = ['periods', 'period', 'unit', 'material_types', 'material_type', 'conservatory_state'] +def _get_values(request, val): + if hasattr(val, 'all'): # manage related objects + vals = list(val.all()) + else: + vals = [val] + new_vals = [] + for v in vals: + if callable(v): + v = v() + if hasattr(v, 'url'): + v = request.is_secure() and \ + 'https' or 'http' + '://' + \ + request.get_host() + v.url + new_vals.append(v) + return new_vals + + def get_item(model, func_name, default_name, extra_request_keys=[], base_request=None, bool_fields=[], reversed_bool_fields=[], dated_fields=[], associated_models=[], relative_session_names=[], @@ -607,7 +629,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[], allowed, own = models.check_model_access_control(request, model, available_perms) if not allowed: - return HttpResponse(EMPTY, mimetype='text/plain') + return HttpResponse(EMPTY, content_type='text/plain') if force_own: own = True @@ -653,8 +675,8 @@ def get_item(model, func_name, default_name, extra_request_keys=[], else: my_relation_types_prefix = copy(relation_types_prefix) - fields = [model._meta.get_field_by_name(k)[0] - for k in model._meta.get_all_field_names()] + fields = [model._meta.get_field(k) + for k in get_all_field_names(model)] request_keys = dict([ (field.name, field.name + (hasattr(field, 'rel') and field.rel and '__pk' @@ -666,8 +688,8 @@ def get_item(model, func_name, default_name, extra_request_keys=[], continue associated_model = globals()[associated_model] associated_fields = [ - associated_model._meta.get_field_by_name(k)[0] - for k in associated_model._meta.get_all_field_names()] + associated_model._meta.get_field(k) + for k in get_all_field_names(associated_model)] request_keys.update( dict([(key + "__" + field.name, key + "__" + field.name + @@ -683,7 +705,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[], try: old = 'old' in request_items and int(request_items['old']) except ValueError: - return HttpResponse('[]', mimetype='text/plain') + return HttpResponse('[]', content_type='text/plain') # manage relations types if 'relation_types' not in my_relation_types_prefix: @@ -730,7 +752,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[], try: dct = {"pk": request.session[default_name]} pinned_search = unicode(model._meta.verbose_name)\ - + u" - " + unicode( + + u" - " + unicode( model.objects.get(pk=dct["pk"])) except model.DoesNotExist: pass @@ -856,7 +878,11 @@ def get_item(model, func_name, default_name, extra_request_keys=[], query |= Q(**altor_dct) if own: - query = query & model.get_query_owns(request.user) + q = models.IshtarUser.objects.filter(user_ptr=request.user) + if q.count(): + query = query & model.get_query_owns(q.all()[0]) + else: + return HttpResponse(EMPTY, content_type='text/plain') for and_req in and_reqs: query = query & and_req @@ -1007,23 +1033,11 @@ def get_item(model, func_name, default_name, extra_request_keys=[], val = list(val.all()) for v in val: v = getattr(v, ky) - if callable(v): - v = v() - if hasattr(v, 'url'): - v = request.is_secure() and \ - 'https' or 'http' + '://' + \ - request.get_host() + v.url - new_vals.append(v) + new_vals += _get_values(request, v) elif val: try: val = getattr(val, ky) - if callable(val): - val = val() - if hasattr(val, 'url'): - val = request.is_secure() and \ - 'https' or 'http' + '://' + \ - request.get_host() + val.url - new_vals.append(val) + new_vals += _get_values(request, val) except AttributeError: # must be a query key such as "contains" pass @@ -1111,9 +1125,9 @@ def get_item(model, func_name, default_name, extra_request_keys=[], "page": page_nb, "total": (items_nb / row_nb + 1) if row_nb else items_nb, }) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') elif data_type == "csv": - response = HttpResponse(mimetype='text/csv') + response = HttpResponse(content_type='text/csv') n = datetime.datetime.now() filename = u'%s_%s.csv' % (default_name, n.strftime('%Y%m%d-%H%M%S')) @@ -1154,14 +1168,15 @@ def get_item(model, func_name, default_name, extra_request_keys=[], val = data[1:][idx + delta].encode( ENCODING, errors='replace') if col_name and "|" in col_name[0]: - for delta_idx in range(len(col_name[0].split('|')) - 1): + for delta_idx in range( + len(col_name[0].split('|')) - 1): delta += 1 val += data[1:][idx + delta].encode( ENCODING, errors='replace') row.append(val) writer.writerow(row) return response - return HttpResponse('{}', mimetype='text/plain') + return HttpResponse('{}', content_type='text/plain') return func @@ -1173,7 +1188,7 @@ def get_by_importer(request, slug, data_type='json', full=False, res = '' if data_type == "json": res = '{}' - return HttpResponse(res, mimetype='text/plain') + return HttpResponse(res, content_type='text/plain') imp = q.all()[0].get_importer_class() cols, col_names = [], [] for formater in imp.LINE_FORMAT: @@ -1193,8 +1208,7 @@ def display_item(model, extra_dct=None, show_url=None): dct['show_url'] = "/{}{}/".format(show_url, pk) else: dct['show_url'] = "/show-{}/{}/".format(model.SLUG, pk) - return render_to_response('ishtar/display_item.html', dct, - context_instance=RequestContext(request)) + return render(request, 'ishtar/display_item.html', dct) return func @@ -1231,7 +1245,7 @@ def show_item(model, name, extra_dct=None): item = item.get_previous(date=date) assert item is not None except (ValueError, AssertionError): - return HttpResponse(None, mimetype='text/plain') + return HttpResponse(None, content_type='text/plain') dct['previous'] = item._previous dct['next'] = item._next else: @@ -1244,8 +1258,7 @@ def show_item(model, name, extra_dct=None): # add context if extra_dct: dct.update(extra_dct(request, item)) - context_instance = RequestContext(request) - context_instance.update(dct) + context_instance = deepcopy(dct) context_instance['output'] = 'html' if hasattr(item, 'history_object'): filename = item.history_object.associated_filename @@ -1254,7 +1267,7 @@ def show_item(model, name, extra_dct=None): if doc_type == "odt" and settings.ODT_TEMPLATE: tpl = loader.get_template('ishtar/sheet_%s.html' % name) context_instance['output'] = 'ODT' - content = tpl.render(context_instance) + content = tpl.render(context_instance, request) try: tidy_options = {'output-xhtml': 1, 'indent': 1, 'tidy-mark': 0, 'doctype': 'auto', @@ -1286,7 +1299,7 @@ def show_item(model, name, extra_dct=None): except xhtml2odt.ODTExportError: return HttpResponse(content, content_type="application/xhtml") response = HttpResponse( - mimetype='application/vnd.oasis.opendocument.text') + content_type='application/vnd.oasis.opendocument.text') response['Content-Disposition'] = 'attachment; filename=%s.odt' % \ filename response.write(odtfile) @@ -1294,14 +1307,14 @@ def show_item(model, name, extra_dct=None): elif doc_type == 'pdf': tpl = loader.get_template('ishtar/sheet_%s_pdf.html' % name) context_instance['output'] = 'PDF' - content = tpl.render(context_instance) + content = tpl.render(context_instance, request) result = StringIO.StringIO() html = content.encode('utf-8') html = html.replace("<table", "<pdf:nextpage/><table repeat='1'") pdf = pisa.pisaDocument(StringIO.StringIO(html), result, encoding='utf-8') response = HttpResponse(result.getvalue(), - mimetype='application/pdf') + content_type='application/pdf') response['Content-Disposition'] = 'attachment; filename=%s.pdf' % \ filename if not pdf.err: @@ -1309,7 +1322,7 @@ def show_item(model, name, extra_dct=None): return HttpResponse(content, content_type="application/xhtml") else: tpl = loader.get_template('ishtar/sheet_%s_window.html' % name) - content = tpl.render(context_instance) + content = tpl.render(context_instance, request) return HttpResponse(content, content_type="application/xhtml") return func @@ -1321,8 +1334,8 @@ def revert_item(model): date = datetime.datetime.strptime(date, '%Y-%m-%dT%H:%M:%S.%f') item.rollback(date) except (ObjectDoesNotExist, ValueError, HistoryError): - return HttpResponse(None, mimetype='text/plain') - return HttpResponse("True", mimetype='text/plain') + return HttpResponse(None, content_type='text/plain') + return HttpResponse("True", content_type='text/plain') return func @@ -1333,9 +1346,9 @@ def autocomplete_organization(request, orga_type=None): models.Organization) and not request.user.ishtaruser.has_right( 'person_search', session=request.session)): - return HttpResponse('[]', mimetype='text/plain') + return HttpResponse('[]', content_type='text/plain') if not request.GET.get('term'): - return HttpResponse('[]', mimetype='text/plain') + return HttpResponse('[]', content_type='text/plain') q = request.GET.get('term') query = Q() for q in q.split(' '): @@ -1352,16 +1365,16 @@ def autocomplete_organization(request, orga_type=None): organizations = models.Organization.objects.filter(query)[:limit] data = json.dumps([{'id': org.pk, 'value': unicode(org)} for org in organizations]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def autocomplete_author(request): if not request.user.has_perm('ishtar_common.view_author', models.Author)\ and not request.user.has_perm('ishtar_common.view_own_author', models.Author): - return HttpResponse('[]', mimetype='text/plain') + return HttpResponse('[]', content_type='text/plain') if not request.GET.get('term'): - return HttpResponse('[]', mimetype='text/plain') + return HttpResponse('[]', content_type='text/plain') q = request.GET.get('term') query = Q() for q in q.split(' '): @@ -1374,7 +1387,7 @@ def autocomplete_author(request): authors = models.Author.objects.filter(query)[:limit] data = json.dumps([{'id': author.pk, 'value': unicode(author)} for author in authors]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def new_item(model, frm, many=False): @@ -1396,13 +1409,10 @@ def new_item(model, frm, many=False): if dct['parent_pk'] and '_select_' in dct['parent_pk']: parents = dct['parent_pk'].split('_') dct['parent_pk'] = "_".join([parents[0]] + parents[2:]) - return render_to_response( - 'window.html', dct, - context_instance=RequestContext(request)) + return render(request, 'window.html', dct) else: dct['form'] = frm(limits=limits) - return render_to_response('window.html', dct, - context_instance=RequestContext(request)) + return render(request, 'window.html', dct) return func new_person = new_item(models.Person, forms.PersonForm) @@ -1431,8 +1441,7 @@ def action(request, action_slug, obj_id=None, *args, **kwargs): globals_dct = globals() if action_slug in globals_dct: return globals_dct[action_slug](request, dct, obj_id, *args, **kwargs) - return render_to_response('index.html', dct, - context_instance=RequestContext(request)) + return render(request, 'index.html', dct) def dashboard_main(request, dct, obj_id=None, *args, **kwargs): @@ -1452,8 +1461,7 @@ def dashboard_main(request, dct, obj_id=None, *args, **kwargs): app_list.append((_(u"Treatment requests"), 'treatmentfiles')) app_list.append((_(u"Treatments"), 'treatments')) dct = {'app_list': app_list} - return render_to_response('ishtar/dashboards/dashboard_main.html', dct, - context_instance=RequestContext(request)) + return render(request, 'ishtar/dashboards/dashboard_main.html', dct) DASHBOARD_FORMS = { 'files': DashboardFormFile, 'operations': DashboardFormOpe, @@ -1468,9 +1476,8 @@ def dashboard_main_detail(request, item_name): """ if item_name == 'users': dct = {'ishtar_users': models.UserDashboard()} - return render_to_response( - 'ishtar/dashboards/dashboard_main_detail_users.html', - dct, context_instance=RequestContext(request)) + return render( + request, 'ishtar/dashboards/dashboard_main_detail_users.html', dct) form = None slicing, date_source, fltr, show_detail = 'year', None, {}, False profile = models.get_current_profile() @@ -1534,8 +1541,7 @@ def dashboard_main_detail(request, item_name): n = datetime.datetime.now() dct['unique_id'] = dct['item_name'] + "_" + \ '%d_%d_%d' % (n.minute, n.second, n.microsecond) - return render_to_response('ishtar/dashboards/dashboard_main_detail.html', - dct, context_instance=RequestContext(request)) + return render(request, 'ishtar/dashboards/dashboard_main_detail.html', dct) def reset_wizards(request): @@ -1587,9 +1593,7 @@ def merge_action(model, form, key): return redirect(reverse(current_url, kwargs={'page': page})) else: context['formset'] = FormSet(queryset=queryset) - return render_to_response( - 'ishtar/merge_' + key + '.html', context, - context_instance=RequestContext(request)) + return render(request, 'ishtar/merge_' + key + '.html', context) return merge diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 42a93ddaa..eb68bac2e 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -26,15 +26,16 @@ from django.conf import settings from django.core.urlresolvers import reverse, NoReverseMatch from django.db.models import fields from django.forms import ClearableFileInput -from django.forms.widgets import flatatt, \ - CheckboxSelectMultiple as CheckboxSelectMultipleBase -from django.template import Context, loader +from django.forms.utils import flatatt +from django.forms.widgets import CheckboxSelectMultiple as \ + CheckboxSelectMultipleBase +from django.template import loader from django.template.defaultfilters import slugify from django.utils.encoding import smart_unicode from django.utils.functional import lazy from django.utils.html import escape from django.utils.safestring import mark_safe -from django.utils.simplejson import JSONEncoder +from json import JSONEncoder from django.utils.translation import ugettext_lazy as _ from ishtar_common import models @@ -134,8 +135,8 @@ class Select2Multiple(forms.SelectMultiple): else: options = "{" options += " containerCssClass: 'full-width'}" - html = super(Select2Multiple, self).render(name, value, attrs, - choices) + self.choices = choices + html = super(Select2Multiple, self).render(name, value, attrs) html += """<script type="text/javascript"> $(document).ready(function() {{ $("#id_{}").select2({}); @@ -155,8 +156,7 @@ class CheckboxSelectMultiple(CheckboxSelectMultipleBase): value = value.split(',') if type(value) not in (list, tuple): value = [value] - return super(CheckboxSelectMultiple, self).render(name, value, attrs, - choices) + return super(CheckboxSelectMultiple, self).render(name, value, attrs) class Select2MultipleField(forms.MultipleChoiceField): @@ -191,9 +191,9 @@ class Select2MultipleField(forms.MultipleChoiceField): class DeleteWidget(forms.CheckboxInput): - def render(self, name, value, attrs=None): - final_attrs = flatatt(self.build_attrs(attrs, name=name, - value='1')) + def render(self, name, value, attrs=None, renderer=None): + final_attrs = flatatt( + self.build_attrs(attrs, {"name": name, "value": '1'})) output = ['<tr class="delete"><td colspan="2">'] output.append(u"<button%s>%s</button>" % (final_attrs, _("Delete"))) output.append('</td></tr>') @@ -206,16 +206,17 @@ class ImageFileInput(ClearableFileInput): class SquareMeterWidget(forms.TextInput): - def render(self, name, value, attrs=None): + def render(self, name, value, attrs=None, renderer=None): if not value: value = u"" - final_attrs = flatatt(self.build_attrs(attrs, name=name, value=value)) + final_attrs = flatatt( + self.build_attrs(attrs, {"name": name, "value": value})) dct = {'final_attrs': final_attrs, 'unit': settings.SURFACE_UNIT_LABEL, 'id': attrs['id'], "safe_id": attrs['id'].replace('-', '_')} t = loader.get_template('blocks/SquareMeterWidget.html') - rendered = t.render(Context(dct)) + rendered = t.render(dct) return mark_safe(rendered) AreaWidget = forms.TextInput @@ -231,7 +232,7 @@ class JQueryDate(forms.TextInput): self.attrs['class'] = '' self.attrs['class'] = 'date-pickup' - def render(self, name, value=None, attrs=None): + def render(self, name, value, attrs=None, renderer=None): if value: value = unicode(value) # very specific... @@ -266,25 +267,29 @@ class JQueryDate(forms.TextInput): class JQueryAutoComplete(forms.TextInput): - def __init__(self, source, associated_model=None, options={}, attrs={}, - new=False, url_new='', multiple=False, limit={}, - dynamic_limit=[]): + def __init__(self, source, associated_model=None, options=None, attrs=None, + new=False, url_new='', multiple=False, limit=None, + dynamic_limit=None): """ Source can be a list containing the autocomplete values or a string containing the url used for the request. """ - self.options = None - self.attrs = {} self.source = source self.associated_model = associated_model - if len(options) > 0: + + self.options = None + if options and len(options) > 0: self.options = JSONEncoder().encode(options) - self.attrs.update(attrs) + self.attrs = {} + + if attrs: + self.attrs.update(attrs) + self.new = new self.url_new = url_new self.multiple = multiple - self.limit = limit - self.dynamic_limit = dynamic_limit + self.limit = limit or {} + self.dynamic_limit = dynamic_limit or [] def value_from_datadict(self, data, files, name): if self.multiple: @@ -313,22 +318,20 @@ class JQueryAutoComplete(forms.TextInput): if self.options: dct['options'] = mark_safe('%s' % self.options) - js = "" tpl = 'blocks/JQueryAutocomplete.js' if self.multiple: tpl = 'blocks/JQueryAutocompleteMultiple.js' t = loader.get_template(tpl) - js = t.render(Context(dct)) + js = t.render(dct) return js - def render(self, name, value=None, attrs=None): - attrs_hidden = self.build_attrs(attrs, name=name) + def render(self, name, value, attrs=None, renderer=None): + attrs_hidden = self.build_attrs(attrs, {"name": name}) attrs_select = self.build_attrs(attrs) attrs_select['placeholder'] = _(u"Search...") if value: hiddens = [] selects = [] - values = value if type(value) not in (list, tuple): values = unicode(escape(smart_unicode(value))) values = values.replace('[', '').replace(']', '') @@ -428,8 +431,8 @@ class JQueryTown(forms.TextInput): raise ValueError('source type is not valid') return encoded_src - def render(self, name, value=None, attrs=None): - attrs_hidden = self.build_attrs(attrs, name=name) + def render(self, name, value, attrs=None, renderer=None): + attrs_hidden = self.build_attrs(attrs, {"name": name}) attrs_select = self.build_attrs(attrs) attrs_select['placeholder'] = _(u"Search...") selected = '' @@ -487,7 +490,7 @@ class JQueryTown(forms.TextInput): 'selected_state': selected_state} ) html = loader.get_template('blocks/JQueryAdvancedTown.html')\ - .render(Context(dct)) + .render(dct) return html @@ -540,11 +543,11 @@ class JQueryPersonOrganization(forms.TextInput): 'field_id': field_id} if self.options: dct['options'] = mark_safe('%s' % self.options) - js = loader.get_template(self.js_template).render(Context(dct)) + js = loader.get_template(self.js_template).render(dct) return js - def render(self, name, value=None, attrs=None): - attrs_hidden = self.build_attrs(attrs, name=name) + def render(self, name, value, attrs=None, renderer=None): + attrs_hidden = self.build_attrs(attrs, {'name': name}) attrs_select = self.build_attrs(attrs) attrs_select['placeholder'] = _(u"Search...") selected = '' @@ -586,7 +589,7 @@ class JQueryPersonOrganization(forms.TextInput): 'name': name, 'js': self.render_js(name, selected), 'new': mark_safe(new)} - html = loader.get_template(self.html_template).render(Context(dct)) + html = loader.get_template(self.html_template).render(dct) return html @@ -692,11 +695,10 @@ class JQueryJqGrid(forms.RadioSelect): extra_cols = extra_cols and ", ".join(extra_cols) or "" return jq_col_names, extra_cols - def render(self, name, value=None, attrs=None): + def render(self, name, value, attrs=None, renderer=None): t = loader.get_template('blocks/form_flex_snippet.html') form = self.form() - rendered = t.render(Context({'form': form, - 'flex': True})) + rendered = t.render({'form': form, 'flex': True}) dct = {} if self.new: model_name = self.associated_model._meta.object_name.lower() @@ -744,5 +746,5 @@ class JQueryJqGrid(forms.RadioSelect): 'multi_cols': ",".join((u'"%d"' % col for col in self.multiple_cols))}) t = loader.get_template('blocks/JQueryJqGrid.html') - rendered += t.render(Context(dct)) + rendered += t.render(dct) return mark_safe(rendered) diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index c5158dfcd..f522188a8 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -22,24 +22,27 @@ import logging # from functools import wraps from django.conf import settings -from django.contrib.formtools.wizard.views import NamedUrlWizardView, \ - normalize_name, get_storage, StepsHelper +from formtools.wizard.views import NamedUrlWizardView, normalize_name, \ + get_storage, StepsHelper + from django.contrib.sites.models import Site from django.core.exceptions import ObjectDoesNotExist from django.core.files.images import ImageFile from django.core.files.storage import default_storage from django.core.mail import send_mail -from django.db.models.fields.files import FileField +from django.db.models.fields.files import FileField, ImageFieldFile from django.db.models.fields.related import ManyToManyField from django.db.models.fields import NOT_PROVIDED from django.http import HttpResponseRedirect from django.forms import ValidationError -from django.shortcuts import render_to_response, redirect -from django.template import Context, RequestContext, loader +from django.shortcuts import redirect, render +from django.template import loader from django.utils.datastructures import MultiValueDict as BaseMultiValueDict from django.utils.translation import ugettext_lazy as _ -import models + +from ishtar_common import models +from ishtar_common.utils import get_all_field_names logger = logging.getLogger(__name__) @@ -127,8 +130,7 @@ class Wizard(NamedUrlWizardView): label = '' translated_keys = [] modification = None # True when the wizard modify an item - storage_name = \ - 'django.contrib.formtools.wizard.storage.session.SessionStorage' + storage_name = 'formtools.wizard.storage.session.SessionStorage' wizard_done_template = 'ishtar/wizard/wizard_done.html' wizard_done_window = '' wizard_confirm = 'ishtar/wizard/confirm_wizard.html' @@ -276,6 +278,7 @@ class Wizard(NamedUrlWizardView): # simulate a non empty data for form that might be # valid when empty prefixed_values['__non_empty_data'] = '' + self.prepare_serialization(prefixed_values) storage.set_step_data(next_step, prefixed_values) if step == next_step: current_step_passed = True @@ -357,7 +360,7 @@ class Wizard(NamedUrlWizardView): if form_datas: form_datas.append(("", "", "spacer")) items = hasattr(base_form, 'fields') and \ - base_form.fields.keyOrder or cleaned_data.keys() + base_form.fields.keys() or cleaned_data.keys() for key in items: lbl = None if key.startswith('hidden_'): @@ -368,7 +371,7 @@ class Wizard(NamedUrlWizardView): if hasattr(base_form, 'associated_labels') \ and key in base_form.associated_labels: lbl = base_form.associated_labels[key] - if not lbl: + if not lbl or key not in cleaned_data: continue value = cleaned_data[key] if value is None or value == '': @@ -528,7 +531,7 @@ class Wizard(NamedUrlWizardView): for k in dct: if k.startswith('pk'): continue - if k not in obj.__class__._meta.get_all_field_names(): + if k not in get_all_field_names(obj.__class__): continue # False set to None for images and files if not k.endswith('_id') and ( @@ -608,7 +611,7 @@ class Wizard(NamedUrlWizardView): if 'pk' in dct: dct.pop('pk') # remove non relevant fields - all_field_names = self.get_saved_model()._meta.get_all_field_names() + all_field_names = get_all_field_names(self.get_saved_model()) for k in dct.copy(): if not (k.endswith('_id') and k[:-3] in all_field_names) \ and k not in all_field_names and \ @@ -715,19 +718,22 @@ class Wizard(NamedUrlWizardView): # check if there is no missing fields # should be managed normally in forms but... - if hasattr(model._meta, 'get_fields'): # django 1.8 - fields = model._meta.get_field() - else: - fields = model._meta.fields + fields = model._meta.get_fields() - has_problemetic_null = [ - (field.name, field.default == NOT_PROVIDED) - for field in fields + + has_problemetic_null = False + for field in fields: if (field.name not in value - or not value[field.name]) - and not field.null and not field.blank - and (not field.default - or field.default == NOT_PROVIDED)] + or not value[field.name]) \ + and (hasattr(field, 'null') + and not field.null) \ + and (hasattr(field, 'blank') + and not field.blank) \ + and (hasattr(field, 'default') + and (not field.default + or field.default == NOT_PROVIDED)): + has_problemetic_null = True + break if has_problemetic_null: continue @@ -739,7 +745,9 @@ class Wizard(NamedUrlWizardView): value.save() # force post_save # check that an item is not add multiple times (forged forms) if value not in related_model.all() and\ - hasattr(related_model, 'add'): + (not hasattr(related_model, 'through') or + not isinstance(value, related_model.through)): + # many to many and the value have been already managed related_model.add(value) # necessary to manage interaction between models like # material_index management for baseitems @@ -771,8 +779,7 @@ class Wizard(NamedUrlWizardView): wizard_done_window = unicode(self.wizard_done_window) if wizard_done_window: dct['wizard_done_window'] = wizard_done_window - res = render_to_response(self.wizard_done_template, dct, - context_instance=RequestContext(self.request)) + res = render(self.request, self.wizard_done_template, dct) return return_object and (obj, res) or res def get_deleted(self, keys): @@ -876,7 +883,7 @@ class Wizard(NamedUrlWizardView): frm = form.forms[0] if frm: # autofocus on first field - first_field = frm.fields[frm.fields.keyOrder[0]] + first_field = frm.fields[frm.fields.keys()[0]] attrs = first_field.widget.attrs attrs.update({'autofocus': "autofocus"}) first_field.widget.attrs = attrs @@ -984,6 +991,19 @@ class Wizard(NamedUrlWizardView): data[key] = value storage.set_step_data(form_key, data) + @classmethod + def prepare_serialization(cls, data): + """ + Image and file cannot be passed as object + """ + for k in data: + if isinstance(data[k], ImageFieldFile) \ + or isinstance(data[k], FileField): + try: + data[k] = data[k].path + except ValueError: + data[k] = None + def session_get_value(self, form_key, key, multi=False, multi_value=False): """Get the value of a specific form""" if not self.session_has_key(form_key, key, multi): @@ -1112,9 +1132,9 @@ class Wizard(NamedUrlWizardView): continue if hasattr(value, 'pk'): value = value.pk - if value in (True, False) or \ - isinstance(value, FileField) or \ - isinstance(value, ImageFile): + if value in (True, False) \ + or isinstance(value, ImageFieldFile) \ + or isinstance(value, FileField): initial[base_field] = value elif value is not None: initial[base_field] = unicode(value) @@ -1164,8 +1184,7 @@ class SearchWizard(NamedUrlWizardView): model = None label = '' modification = None # True when the wizard modify an item - storage_name = \ - 'django.contrib.formtools.wizard.storage.session.SessionStorage' + storage_name = 'formtools.wizard.storage.session.SessionStorage' def get_wizard_name(self): """ @@ -1241,9 +1260,8 @@ class DeletionWizard(Wizard): obj.delete() except ObjectDoesNotExist: pass - return render_to_response( - 'ishtar/wizard/wizard_delete_done.html', {}, - context_instance=RequestContext(self.request)) + return render( + self.request, 'ishtar/wizard/wizard_delete_done.html', {}) class ClosingWizard(Wizard): @@ -1294,9 +1312,8 @@ class ClosingWizard(Wizard): and hasattr(obj, 'end_date'): obj.end_date = form.cleaned_data['end_date'] obj.save() - return render_to_response( - 'ishtar/wizard/wizard_closing_done.html', {}, - context_instance=RequestContext(self.request)) + return render( + self.request, 'ishtar/wizard/wizard_closing_done.html', {}) class PersonWizard(Wizard): @@ -1377,17 +1394,24 @@ class AccountWizard(Wizard): if key.startswith('hidden_password'): dct['password'] = dct.pop(key) try: - account = models.IshtarUser.objects.get(person=person) + account = models.IshtarUser.objects.get(person=person).user_ptr account.username = dct['username'] account.email = dct['email'] except ObjectDoesNotExist: now = datetime.datetime.now() - account = models.IshtarUser( - person=person, username=dct['username'], email=dct['email'], + account = models.User.objects.create( + username=dct['username'], email=dct['email'], first_name=person.surname or '***', last_name=person.name or '***', is_staff=False, is_active=True, is_superuser=False, - last_login=now, date_joined=now) + last_login=now, date_joined=now + ) + ishtaruser = account.ishtaruser + old_person_pk = ishtaruser.person.pk + ishtaruser.person = person + ishtaruser.save() + models.Person.objects.get(pk=old_person_pk).delete() + if dct['password']: account.set_password(dct['password']) account.save() @@ -1398,20 +1422,21 @@ class AccountWizard(Wizard): app_name = site and ("Ishtar - " + site.name) \ or "Ishtar" - context = Context({ + context = { 'login': dct['username'], 'password': dct['password'], 'app_name': app_name, 'site': site and site.domain or "" - }) + } t = loader.get_template('account_activation_email.txt') - msg = t.render(context) + msg = t.render(context, self.request) subject = _(u"[%(app_name)s] Account creation/modification") % { "app_name": app_name} send_mail(subject, msg, settings.ADMINS[0][1], [dct['email']], fail_silently=True) - res = render_to_response('ishtar/wizard/wizard_done.html', {}, - context_instance=RequestContext(self.request)) + res = render( + self.request, 'ishtar/wizard/wizard_done.html', {}, + ) return res def get_form_kwargs(self, step=None): |