diff options
554 files changed, 42458 insertions, 39529 deletions
diff --git a/.gitignore b/.gitignore index bfc61f6ac..a1984e0ff 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyc *.mo *~ +.~* django-simple-history/* django-formwizard/* ishtar-docs diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14f80da21..988b8fc6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ before_script: - apt-get update - - apt-get install -q -y git python-pip libpq-dev python-dev libjpeg-dev zlib1g-dev libxml2-dev libxslt1-dev libgeos-dev tidy + - apt-get install -q -y git python-pip libpq-dev python-dev libjpeg-dev zlib1g-dev libxml2-dev libxslt1-dev libgeos-dev tidy binutils libproj-dev gdal-bin - pip install -q -r requirements.txt - cp Makefile.example Makefile - cp example_project/local_settings.py.gitlab-ci example_project/local_settings.py diff --git a/Makefile.example b/Makefile.example index 1e0545ef7..84325806b 100644 --- a/Makefile.example +++ b/Makefile.example @@ -8,6 +8,7 @@ project=example_project # list used apps apps="ishtar_common" "archaeological_operations" "archaeological_context_records" "archaeological_files" "archaeological_finds" "archaeological_warehouse" "archaeological_files_pdl" default_data='fr' +version=`head -n 1 version.py | cut -d' ' -f2` help: # Actions available: @@ -16,7 +17,6 @@ help: # * test: # * pep8: # * pylint: - # * fresh_syncdb: # * syncdb: # * shell: # * makemessages: @@ -51,7 +51,6 @@ coverage: clean archaeological_files_pdl" ./manage.py test $(apps) && coverage report build_gitlab: - cd $(project); $(PYTHON) ./manage.py syncdb --noinput 2> /dev/null > /dev/null cd $(project); $(PYTHON) ./manage.py migrate test_gitlab: clean @@ -65,45 +64,7 @@ pylint: pylint "$(CURDIR)/$$DIR" --ignore=.git,migrations --max-public-methods=50 --ignored-classes=Item.Meta --method-rgx='[a-z_][a-z0-9_]{2,40}$$'; \ done -fresh_syncdb: - cd $(project); $(PYTHON) ./manage.py syncdb --noinput 2> /dev/null > /dev/null - cd $(project); $(PYTHON) ./manage.py migrate ishtar_common 2> /dev/null > /dev/null - if [[ '$(apps)' == *archaeological_files* ]]; then cd $(project); $(PYTHON) ./manage.py migrate archaeological_files 2> /dev/null > /dev/null; fi - $(PYTHON) ./manage.py migrate archaeological_operations 2> /dev/null > /dev/null - cd $(project); $(PYTHON) ./manage.py migrate 2> /dev/null > /dev/null - echo "* load default data" - # data migrations have created some default data - return to a clean state - cd $(project); $(PYTHON) ./manage.py flush --noinput 2> /dev/null - cd $(project); $(PYTHON) ./manage.py loaddata \ - '../fixtures/initial_data-auth-'$(default_data)'.json' 2> /dev/null - cd $(project); $(PYTHON) ./manage.py loaddata \ - '../ishtar_common/fixtures/initial_data-'$(default_data)'.json' 2> /dev/null - cd $(project); $(PYTHON) ./manage.py loaddata \ - '../ishtar_common/fixtures/initial_towns-'$(default_data)'.json' 2> /dev/null - cd $(project); $(PYTHON) ./manage.py loaddata \ - '../ishtar_common/fixtures/initial_importtypes-'$(default_data)'.json' 2> /dev/null - if [[ '$(apps)' == *archaeological_operations* ]]; then cd $(project); $(PYTHON) ./manage.py loaddata \ - '../archaeological_operations/fixtures/initial_data-'$(default_data)'.json' 2> /dev/null; fi - if [[ '$(apps)' == *archaeological_files* ]]; then cd $(project); $(PYTHON) ./manage.py loaddata \ - '../archaeological_files/fixtures/initial_data-'$(default_data)'.json' 2> /dev/null; fi - if [[ '$(apps)' == *archaeological_context_records* ]]; then cd $(project); $(PYTHON) ./manage.py loaddata \ - '../archaeological_context_records/fixtures/initial_data-'$(default_data)'.json' 2> /dev/null; fi - if [[ '$(apps)' == *archaeological_finds* ]]; then cd $(project); $(PYTHON) ./manage.py loaddata \ - '../archaeological_finds/fixtures/initial_data-'$(default_data)'.json' 2> /dev/null; fi - if [[ '$(apps)' == *archaeological_warehouse* ]]; then cd $(project); $(PYTHON) ./manage.py loaddata \ - '../archaeological_warehouse/fixtures/initial_data-'$(default_data)'.json' 2> /dev/null; fi - echo "* create superuser" - cd $(project); $(PYTHON) ./manage.py createsuperuser - # "de-flush" migrations - $(PYTHON) ./manage.py migrate --fake 2> /dev/null > /dev/null - # add a default site - echo '[{"pk":null, "model": "sites.site", "fields": {"domain": "'$(URL)'", "name": "'$(PROJECT_NAME)'"}}]' > \ - /tmp/site.json - cd $(project); $(PYTHON) ./manage.py loaddata /tmp/site.json - rm /tmp/site.json - -syncdb: - cd $(project); $(PYTHON) manage.py syncdb --noinput +migrate: cd $(project); $(PYTHON) manage.py migrate shell: @@ -128,18 +89,11 @@ compilemessages: collectstatic: cd $(project);$(PYTHON) manage.py collectstatic --noinput -schemamigrations: +migrations: cd $(project);\ for APP in $(apps); do \ - echo "* schemamigration for "$$APP; \ - $(PYTHON) manage.py schemamigration --auto $$APP; \ - done - -schemamigrations_initial: - cd $(project);\ - for APP in $(apps); do \ - echo "* schemamigration for "$$APP; \ - $(PYTHON) manage.py schemamigration --initial $$APP; \ + echo "* makemigrations for "$$APP; \ + $(PYTHON) ./manage.py makemigrations $$APP; \ done generate_doc: @@ -157,12 +111,12 @@ generate_doc: fixtures: fixtures_auth fixtures_common fixtures_operations fixtures_context_records fixtures_finds fixtures_warehouse fixtures_files fixtures_auth: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ auth.permission auth.group \ > '../fixtures/initial_data-auth-'$(default_data)'.json' fixtures_common: fixtures_common_importers fixtures_spatialrefsystem - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ ishtar_common.authortype \ ishtar_common.persontype \ ishtar_common.organizationtype \ @@ -175,7 +129,7 @@ fixtures_common: fixtures_common_importers fixtures_spatialrefsystem > '../ishtar_common/fixtures/initial_data-'$(default_data)'.json' fixtures_common_importers: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ ishtar_common.importermodel \ ishtar_common.importertype \ ishtar_common.regexp \ @@ -195,33 +149,43 @@ fixtures_common_towns: > '../ishtar_common/fixtures/initial_towns-'$(default_data)'.json' fixtures_spatialrefsystem: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ ishtar_common.SpatialReferenceSystem \ > '../ishtar_common/fixtures/initial_spatialrefsystem-'$(default_data)'.json' fixtures_operations: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ archaeological_operations.acttype \ archaeological_operations.period \ archaeological_operations.remaintype \ - archaeological_operations.relationtype \ archaeological_operations.reportstate \ > '../archaeological_operations/fixtures/initial_data-'$(default_data)'.json' + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ + archaeological_operations.relationtype \ + > '../archaeological_operations/fixtures/initial_data_relation_type-'$(default_data)'.json' + cat archaeological_operations/fixtures/initial_data_relation_type-$(default_data).json | tr '\n' '\r' | \ + sed -e 's/"inverse_relation": *\[\r *\"[-_a-z0-9]*\" *\r *\]/"inverse_relation": null/g' | \ + tr '\r' '\n' > archaeological_operations/fixtures/initial_data_relation_type_norel-'$(default_data)'.json fixtures_context_records: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ archaeological_context_records.datingquality \ archaeological_context_records.activitytype \ archaeological_context_records.identificationtype \ archaeological_context_records.unit \ archaeological_context_records.datingtype \ - archaeological_context_records.relationtype \ archaeological_context_records.excavationtechnictype \ archaeological_context_records.documentationtype \ > '../archaeological_context_records/fixtures/initial_data-'$(default_data)'.json' + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ + archaeological_context_records.relationtype \ + > '../archaeological_context_records/fixtures/initial_data_relation_type-'$(default_data)'.json' + cat archaeological_context_records/fixtures/initial_data_relation_type-$(default_data).json | tr '\n' '\r' | \ + sed -e 's/"inverse_relation": *\[\r *\"[-_a-z0-9]*\" *\r *\]/"inverse_relation": null/g' | \ + tr '\r' '\n' > archaeological_context_records/fixtures/initial_data_relation_type_norel-'$(default_data)'.json fixtures_finds: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ archaeological_finds.materialtype \ archaeological_finds.treatmenttype \ archaeological_finds.treatmentstate \ @@ -235,14 +199,14 @@ fixtures_finds: > '../archaeological_finds/fixtures/initial_data-'$(default_data)'.json' fixtures_warehouse: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ archaeological_warehouse.containertype \ archaeological_warehouse.warehousetype \ archaeological_warehouse.warehousedivision \ > '../archaeological_warehouse/fixtures/initial_data-'$(default_data)'.json' fixtures_files: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ archaeological_files.saisinetype \ archaeological_files.filetype \ archaeological_files.permittype \ @@ -270,3 +234,8 @@ distribute_main: sdist deb: clean debuild -i -us -uc -b + +push_install: clean + tar cvjf install-ishtar-$(version).tar.bz2 install/ + scp install-ishtar-$(version).tar.bz2 root@git:/var/www/ishtar/install/ + rm install-ishtar-$(version).tar.bz2 diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 000000000..34d1560db --- /dev/null +++ b/UPGRADE.md @@ -0,0 +1,37 @@ +v1 to v2.0 +---------- + +Before upgrading to v2.0, update to the last v1 version. Then apply all +databases migrations: + +``` +cd <application-path> +./manage.py migrate +``` + +Just after upgrade of the code and of the lib, some manual db migrations (user, +database name and password can be found in your local settings): + +``` +cd <ishtar-path> +psql -h 127.0.0.1 -U myishtardbuser myishtardb -f scripts/migrate_from_v1_to_v2.sql +``` + +Upgrade to ishtar sources and fake initial migrations. + +``` +cd <application-path> +./manage.py migrate --fake admin +./manage.py migrate --fake auth +./manage.py migrate --fake contenttypes +./manage.py migrate --fake registration +./manage.py migrate --fake sessions +./manage.py migrate --fake sites +./manage.py migrate --fake ishtar_common 0001_initial +./manage.py migrate --fake archaeological_operations 0003_views +./manage.py migrate --fake archaeological_files 0003_views +./manage.py migrate --fake archaeological_context_records 0004_views +./manage.py migrate --fake archaeological_finds 0003_views +./manage.py migrate --fake archaeological_warehouse 0002_auto_20170414_2123 +./manage.py migrate +``` diff --git a/archaeological_context_records/__init__.py b/archaeological_context_records/__init__.py index e69de29bb..8b0803727 100644 --- a/archaeological_context_records/__init__.py +++ b/archaeological_context_records/__init__.py @@ -0,0 +1 @@ +default_app_config = 'ishtar_common.apps.ArchaeologicalContextRecordConfig' diff --git a/archaeological_context_records/admin.py b/archaeological_context_records/admin.py index 567f50014..2733fa2ff 100644 --- a/archaeological_context_records/admin.py +++ b/archaeological_context_records/admin.py @@ -17,31 +17,55 @@ # See the file COPYING for details. +from ajax_select import make_ajax_form +from ajax_select.fields import AutoCompleteSelectField + +from django import forms from django.contrib import admin +from django.contrib.gis.forms import PointField, PolygonField, OSMWidget +from django.utils.translation import ugettext_lazy as _ +from ishtar_common.apps import admin_site from ishtar_common.admin import HistorizedObjectAdmin, GeneralTypeAdmin import models class DatingAdmin(admin.ModelAdmin): - list_display = ('period', 'start_date', 'end_date', 'dating_type', - 'quality') + list_display = ('period', 'context_records_lbl', 'finds_lbl') list_filter = ("period", 'dating_type', 'quality') model = models.Dating + search_fields = ['context_records__cached_label', 'period__label', + 'find__cached_label'] + readonly_fields = ['context_records_lbl', 'finds_lbl'] + +admin_site.register(models.Dating, DatingAdmin) + -admin.site.register(models.Dating, DatingAdmin) +class AdminContextRecordForm(forms.ModelForm): + class Meta: + model = models.ContextRecord + exclude = [] + point_2d = PointField(label=_(u"Point"), required=False, + widget=OSMWidget) + polygon = PolygonField(label=_(u"Polygon"), required=False, + widget=OSMWidget) + operation = AutoCompleteSelectField('operation') + parcel = AutoCompleteSelectField('parcel') class ContextRecordAdmin(HistorizedObjectAdmin): - list_display = ('label', 'length', 'width', - 'thickness', 'depth') - list_filter = ('documentations',) - search_fields = ('label', 'parcel__operation__common_name', - 'datings__period__label') + list_display = ('label', 'operation', 'parcel') + list_filter = ('unit',) + search_fields = ('label', 'parcel__operation__cached_label', + 'parcel__section', 'parcel__parcel_number') model = models.ContextRecord + form = AdminContextRecordForm + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports', 'cached_label', 'datings' + ] -admin.site.register(models.ContextRecord, ContextRecordAdmin) +admin_site.register(models.ContextRecord, ContextRecordAdmin) class ContextRecordSourceAdmin(admin.ModelAdmin): @@ -49,41 +73,50 @@ class ContextRecordSourceAdmin(admin.ModelAdmin): list_filter = ('source_type',) search_fields = ('title', ) model = models.ContextRecordSource + form = make_ajax_form(model, { + "context_record": 'context_record', + 'authors': 'author' + }) -admin.site.register(models.ContextRecordSource, ContextRecordSourceAdmin) +admin_site.register(models.ContextRecordSource, ContextRecordSourceAdmin) class RecordRelationsAdmin(admin.ModelAdmin): list_display = ('left_record', 'relation_type', 'right_record') list_filter = ('relation_type',) + model = models.RecordRelations + form = make_ajax_form(model, { + 'left_record': 'context_record', + 'right_record': 'context_record', + }) -admin.site.register(models.RecordRelations, RecordRelationsAdmin) +admin_site.register(models.RecordRelations, RecordRelationsAdmin) class RelationTypeAdmin(admin.ModelAdmin): list_display = ('label', 'txt_idx', 'tiny_label', 'available', 'symmetrical', 'inverse_relation', 'order', 'comment') -admin.site.register(models.RelationType, RelationTypeAdmin) +admin_site.register(models.RelationType, RelationTypeAdmin) class UnitAdmin(admin.ModelAdmin): list_display = ['label', 'txt_idx', 'parent', 'available', 'order', 'comment'] -admin.site.register(models.Unit, UnitAdmin) +admin_site.register(models.Unit, UnitAdmin) class IdentificationTypeAdmin(admin.ModelAdmin): list_display = ['label', 'txt_idx', 'available', 'order', 'comment'] -admin.site.register(models.IdentificationType, IdentificationTypeAdmin) +admin_site.register(models.IdentificationType, IdentificationTypeAdmin) general_models = [ models.DatingType, models.DatingQuality, models.DocumentationType, models.ActivityType, models.ExcavationTechnicType] for model in general_models: - admin.site.register(model, GeneralTypeAdmin) + admin_site.register(model, GeneralTypeAdmin) diff --git a/archaeological_context_records/fixtures/initial_data-fr.json b/archaeological_context_records/fixtures/initial_data-fr.json index f43b46a2a..89406c37b 100644 --- a/archaeological_context_records/fixtures/initial_data-fr.json +++ b/archaeological_context_records/fixtures/initial_data-fr.json @@ -1,682 +1,494 @@ [ - { - "pk": 1, - "model": "archaeological_context_records.datingquality", - "fields": { - "comment": "Datation fond\u00e9e sur des faits", - "available": true, - "txt_idx": "sure", - "label": "Av\u00e9r\u00e9e" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.datingquality", - "fields": { - "comment": "Datation \u00e0 v\u00e9rifier", - "available": true, - "txt_idx": "estimated", - "label": "Estim\u00e9e " - } - }, - { - "pk": 1, - "model": "archaeological_context_records.activitytype", - "fields": { - "comment": "Unit\u00e9 d'enregistrement qui n'est pas directement d'origine anthropique. ", - "available": true, - "txt_idx": "natural", - "order": 1000, - "label": "Naturelle" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.activitytype", - "fields": { - "comment": "Unit\u00e9 \u00e9labor\u00e9e par l'homme, comme un mur ou un sol am\u00e9nag\u00e9 par exemple.", - "available": true, - "txt_idx": "construction", - "order": 1100, - "label": "Construction" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.activitytype", - "fields": { - "comment": "Unit\u00e9 li\u00e9e \u00e0 l'anthropisation elle-m\u00eame.", - "available": true, - "txt_idx": "occupation", - "order": 1300, - "label": "Occupation" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.activitytype", - "fields": { - "comment": "Unit\u00e9 r\u00e9sultant de l'arr\u00eat d'anthropisation.", - "available": true, - "txt_idx": "desertion", - "order": 1500, - "label": "Abandon" - } - }, - { - "pk": 14, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "unknown", - "order": 10, - "label": "Ind\u00e9termin\u00e9" - } - }, - { - "pk": 12, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "windthrow", - "order": 1000, - "label": "Chablis" - } - }, - { - "pk": 11, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "colluvial_unit", - "order": 1000, - "label": "Colluvions" - } - }, - { - "pk": 13, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "filling", - "order": 1000, - "label": "Comblement" - } - }, - { - "pk": 10, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "digging", - "order": 1000, - "label": "Creusement" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "masonry", - "order": 1000, - "label": "Ma\u00e7onnerie" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "wall", - "order": 1000, - "label": "Mur" - } - }, - { - "pk": 5, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "desertion_level", - "order": 1000, - "label": "Niveau d'abandon" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "occupation_level", - "order": 1000, - "label": "Niveau d'occupation" - } - }, - { - "pk": 6, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "geological_level", - "order": 1000, - "label": "Niveau g\u00e9ologique" - } - }, - { - "pk": 9, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "foundation_level", - "order": 1000, - "label": "Radier" - } - }, - { - "pk": 7, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "embankment", - "order": 1000, - "label": "Remblai" - } - }, - { - "pk": 8, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "archaeological_soil", - "order": 1000, - "label": "Sol arch\u00e9ologique" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "Niveau cultiv\u00e9 ou non, actuel.", - "available": true, - "txt_idx": "soil", - "order": 1000, - "label": "Terre v\u00e9g\u00e9tale" - } - }, - { - "pk": 15, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Anomalie", - "order": 100, - "txt_idx": "anomaly" - } - }, - { - "pk": 10, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "Unit\u00e9 repr\u00e9sentant une partie d'un niveau d\u00e9coup\u00e9 en carr\u00e9s r\u00e9f\u00e9renc\u00e9s.", - "available": true, - "parent": null, - "label": "Carr\u00e9", - "order": 100, - "txt_idx": "square" - } - }, - { - "pk": 16, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Fait", - "order": 100, - "txt_idx": "fact" - } - }, - { - "pk": 9, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "Unit\u00e9 g\u00e9n\u00e9rale (d'ordinaire virtuelle) pouvant regrouper du mobilier trouv\u00e9 en dehors d'un contexte spatialis\u00e9 : mobilier trouv\u00e9 lors d'un d\u00e9capage, sous une semelle d'un fouilleur, dans les d\u00e9blais, etc.", - "available": true, - "parent": null, - "label": "Hors contexte", - "order": 100, - "txt_idx": "not_in_context" - } - }, - { - "pk": 18, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Log", - "order": 100, - "txt_idx": "log" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "Cette unit\u00e9 n'a pas de volume.", - "available": true, - "parent": 17, - "label": "N\u00e9gative", - "order": 100, - "txt_idx": "negative" - } - }, - { - "pk": 13, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Secteur", - "order": 100, - "txt_idx": "sector" - } - }, - { - "pk": 12, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Structure", - "order": 100, - "txt_idx": "structure" - } - }, - { - "pk": 11, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Tranch\u00e9e", - "order": 100, - "txt_idx": "trench" - } - }, - { - "pk": 17, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "US", - "order": 100, - "txt_idx": "stratigraphic-unit" - } - }, - { - "pk": 14, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Zone", - "order": 100, - "txt_idx": "zone" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.datingtype", - "fields": { - "comment": "D'apr\u00e8s une datation de type C14, OSL, TL, arch\u00e9omagn\u00e9tisme, etc, fournissant une date en BP cal avec une marge.", - "available": true, - "txt_idx": "from_absolute_dating", - "label": "D'apr\u00e8s datation absolue" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.datingtype", - "fields": { - "comment": "Une \u00e9tude du mobilier est la source de datation.", - "available": true, - "txt_idx": "from_artefact", - "label": "D'apr\u00e8s \u00e9tude du mobilier" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE en remplissant une autre (qui doit \u00eatre vraisemblablement une US de creusement)", - "available": true, - "tiny_label": "", - "label": "Comble", - "symmetrical": false, - "inverse_relation": 10, - "order": 1, - "txt_idx": "filling" - } - }, - { - "pk": 10, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE remplie par une autre", - "available": true, - "tiny_label": "", - "label": "Combl\u00e9e par", - "symmetrical": false, - "inverse_relation": 2, - "order": 1, - "txt_idx": "filled_by" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE en coupant une autre", - "available": true, - "tiny_label": "", - "label": "Coupe", - "symmetrical": false, - "inverse_relation": 8, - "order": 1, - "txt_idx": "cutting" - } - }, - { - "pk": 8, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE recoup\u00e9e par une autre", - "available": true, - "tiny_label": "", - "label": "Coup\u00e9e par", - "symmetrical": false, - "inverse_relation": 1, - "order": 1, - "txt_idx": "cutted" - } - }, - { - "pk": 9, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE \u00e9quivalant \u00e0 une autre", - "available": true, - "tiny_label": null, - "label": "\u00c9quivaut \u00e0", - "symmetrical": true, - "inverse_relation": null, - "order": 1, - "txt_idx": "equals" - } - }, - { - "pk": 6, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE faisant partie d'une autre", - "available": true, - "tiny_label": "", - "label": "Incluse dans", - "symmetrical": false, - "inverse_relation": 5, - "order": 1, - "txt_idx": "is_included" - } - }, - { - "pk": 5, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE en incluant (regroupant) d'autres (ex: tranch\u00e9e / structures ou entre structure / US, etc.)", - "available": true, - "tiny_label": "", - "label": "Inclut", - "symmetrical": false, - "inverse_relation": 6, - "order": 1, - "txt_idx": "include" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "\u00c0 pr\u00e9ciser ", - "available": true, - "tiny_label": "", - "label": "Relation indirecte", - "symmetrical": true, - "inverse_relation": null, - "order": 1, - "txt_idx": "indirect_relation" - } - }, - { - "pk": 7, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE situ\u00e9e en-dessous d'une autre", - "available": true, - "tiny_label": "", - "label": "Sous", - "symmetrical": false, - "inverse_relation": 3, - "order": 1, - "txt_idx": "is_below" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE situ\u00e9e au-dessus d'une autre", - "available": true, - "tiny_label": "", - "label": "Sur", - "symmetrical": false, - "inverse_relation": 7, - "order": 1, - "txt_idx": "is_above" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-overflowing-cut", - "label": "Coupe manuelle d\u00e9bordante" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "mechanical-overflowing-cut", - "label": "Coupe m\u00e9canique d\u00e9bordante" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "mechanical-stripping", - "label": "D\u00e9capage m\u00e9canique" - } - }, - { - "pk": 6, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "100-percent-excavated", - "label": "Fouill\u00e9e \u00e0 100%" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "25-percent-excavated", - "label": "Fouill\u00e9e \u00e0 25%" - } - }, - { - "pk": 5, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "50-percent-excavated", - "label": "Fouill\u00e9e \u00e0 50%" - } - }, - { - "pk": 7, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-dig", - "label": "Fouille manuelle" - } - }, - { - "pk": 10, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-dig-by-planimetry", - "label": "Fouille manuelle en planim\u00e9trie" - } - }, - { - "pk": 9, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-dig-by-half", - "label": "Fouille manuelle par moiti\u00e9" - } - }, - { - "pk": 8, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-dig-by-quarter", - "label": "Fouille manuelle par quart" - } - }, - { - "pk": 11, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "mechanical-dig", - "label": "Fouille m\u00e9canique" - } - }, - { - "pk": 12, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "not-digged", - "label": "Non fouill\u00e9e" - } - }, - { - "pk": 13, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "tested", - "label": "Test\u00e9e" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.documentationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "section", - "label": "Coupe" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.documentationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "photo", - "label": "Photo" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.documentationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "map", - "label": "Plan" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.documentationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "has-furniture", - "label": "Pr\u00e9sence de mobilier" - } - } -]
\ No newline at end of file +{ + "model": "archaeological_context_records.datingquality", + "fields": { + "label": "Av\u00e9r\u00e9e", + "txt_idx": "sure", + "comment": "Datation fond\u00e9e sur des faits", + "available": true + } +}, +{ + "model": "archaeological_context_records.datingquality", + "fields": { + "label": "Estim\u00e9e ", + "txt_idx": "estimated", + "comment": "Datation \u00e0 v\u00e9rifier", + "available": true + } +}, +{ + "model": "archaeological_context_records.activitytype", + "fields": { + "label": "Naturelle", + "txt_idx": "natural", + "comment": "Unit\u00e9 d'enregistrement qui n'est pas directement d'origine anthropique. ", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.activitytype", + "fields": { + "label": "Construction", + "txt_idx": "construction", + "comment": "Unit\u00e9 \u00e9labor\u00e9e par l'homme, comme un mur ou un sol am\u00e9nag\u00e9 par exemple.", + "available": true, + "order": 1100 + } +}, +{ + "model": "archaeological_context_records.activitytype", + "fields": { + "label": "Abandon", + "txt_idx": "desertion", + "comment": "Unit\u00e9 r\u00e9sultant de l'arr\u00eat d'anthropisation.", + "available": true, + "order": 1500 + } +}, +{ + "model": "archaeological_context_records.activitytype", + "fields": { + "label": "Occupation", + "txt_idx": "occupation", + "comment": "Unit\u00e9 li\u00e9e \u00e0 l'anthropisation elle-m\u00eame.", + "available": true, + "order": 1300 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Terre v\u00e9g\u00e9tale", + "txt_idx": "soil", + "comment": "Niveau cultiv\u00e9 ou non, actuel.", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Ma\u00e7onnerie", + "txt_idx": "masonry", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Mur", + "txt_idx": "wall", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Niveau d'occupation", + "txt_idx": "occupation_level", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Niveau d'abandon", + "txt_idx": "desertion_level", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Niveau g\u00e9ologique", + "txt_idx": "geological_level", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Remblai", + "txt_idx": "embankment", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Sol arch\u00e9ologique", + "txt_idx": "archaeological_soil", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Radier", + "txt_idx": "foundation_level", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Creusement", + "txt_idx": "digging", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Colluvions", + "txt_idx": "colluvial_unit", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Chablis", + "txt_idx": "windthrow", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Comblement", + "txt_idx": "filling", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Ind\u00e9termin\u00e9", + "txt_idx": "unknown", + "comment": "", + "available": true, + "order": 10 + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "US", + "txt_idx": "stratigraphic-unit", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Hors contexte", + "txt_idx": "not_in_context", + "comment": "Unit\u00e9 g\u00e9n\u00e9rale (d'ordinaire virtuelle) pouvant regrouper du mobilier trouv\u00e9 en dehors d'un contexte spatialis\u00e9 : mobilier trouv\u00e9 lors d'un d\u00e9capage, sous une semelle d'un fouilleur, dans les d\u00e9blais, etc.", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Carr\u00e9", + "txt_idx": "square", + "comment": "Unit\u00e9 repr\u00e9sentant une partie d'un niveau d\u00e9coup\u00e9 en carr\u00e9s r\u00e9f\u00e9renc\u00e9s.", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Tranch\u00e9e", + "txt_idx": "trench", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Structure", + "txt_idx": "structure", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Secteur", + "txt_idx": "sector", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Zone", + "txt_idx": "zone", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Anomalie", + "txt_idx": "anomaly", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Fait", + "txt_idx": "fact", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "N\u00e9gative", + "txt_idx": "negative", + "comment": "Cette unit\u00e9 n'a pas de volume.", + "available": true, + "order": 100, + "parent": [ + "stratigraphic-unit" + ] + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Log", + "txt_idx": "log", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.datingtype", + "fields": { + "label": "D'apr\u00e8s datation absolue", + "txt_idx": "from_absolute_dating", + "comment": "D'apr\u00e8s une datation de type C14, OSL, TL, arch\u00e9omagn\u00e9tisme, etc, fournissant une date en BP cal avec une marge.", + "available": true + } +}, +{ + "model": "archaeological_context_records.datingtype", + "fields": { + "label": "D'apr\u00e8s \u00e9tude du mobilier", + "txt_idx": "from_artefact", + "comment": "Une \u00e9tude du mobilier est la source de datation.", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Coupe manuelle d\u00e9bordante", + "txt_idx": "manual-overflowing-cut", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Coupe m\u00e9canique d\u00e9bordante", + "txt_idx": "mechanical-overflowing-cut", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "D\u00e9capage m\u00e9canique", + "txt_idx": "mechanical-stripping", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouill\u00e9e \u00e0 25%", + "txt_idx": "25-percent-excavated", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouill\u00e9e \u00e0 50%", + "txt_idx": "50-percent-excavated", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouill\u00e9e \u00e0 100%", + "txt_idx": "100-percent-excavated", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille manuelle", + "txt_idx": "manual-dig", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille manuelle par quart", + "txt_idx": "manual-dig-by-quarter", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille manuelle par moiti\u00e9", + "txt_idx": "manual-dig-by-half", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille manuelle en planim\u00e9trie", + "txt_idx": "manual-dig-by-planimetry", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille m\u00e9canique", + "txt_idx": "mechanical-dig", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Non fouill\u00e9e", + "txt_idx": "not-digged", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Test\u00e9e", + "txt_idx": "tested", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.documentationtype", + "fields": { + "label": "Pr\u00e9sence de mobilier", + "txt_idx": "has-furniture", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.documentationtype", + "fields": { + "label": "Coupe", + "txt_idx": "section", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.documentationtype", + "fields": { + "label": "Photo", + "txt_idx": "photo", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.documentationtype", + "fields": { + "label": "Plan", + "txt_idx": "map", + "comment": "", + "available": true + } +} +] diff --git a/archaeological_context_records/fixtures/initial_data_relation_type-fr.json b/archaeological_context_records/fixtures/initial_data_relation_type-fr.json new file mode 100644 index 000000000..0f3bee39c --- /dev/null +++ b/archaeological_context_records/fixtures/initial_data_relation_type-fr.json @@ -0,0 +1,148 @@ +[ +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Coupe", + "txt_idx": "cutting", + "comment": "UE en coupant une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "cutted" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Comble", + "txt_idx": "filling", + "comment": "UE en remplissant une autre (qui doit \u00eatre vraisemblablement une US de creusement)", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "filled_by" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Sur", + "txt_idx": "is_above", + "comment": "UE situ\u00e9e au-dessus d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "is_below" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Relation indirecte", + "txt_idx": "indirect_relation", + "comment": "\u00c0 pr\u00e9ciser ", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Inclut", + "txt_idx": "include", + "comment": "UE en incluant (regroupant) d'autres (ex: tranch\u00e9e / structures ou entre structure / US, etc.)", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "is_included" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Incluse dans", + "txt_idx": "is_included", + "comment": "UE faisant partie d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "include" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Sous", + "txt_idx": "is_below", + "comment": "UE situ\u00e9e en-dessous d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "is_above" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Coup\u00e9e par", + "txt_idx": "cutted", + "comment": "UE recoup\u00e9e par une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "cutting" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "\u00c9quivaut \u00e0", + "txt_idx": "equals", + "comment": "UE \u00e9quivalant \u00e0 une autre", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": null, + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Combl\u00e9e par", + "txt_idx": "filled_by", + "comment": "UE remplie par une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "filling" + ] + } +} +] diff --git a/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json b/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json new file mode 100644 index 000000000..871c2a541 --- /dev/null +++ b/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json @@ -0,0 +1,132 @@ +[ +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Coupe", + "txt_idx": "cutting", + "comment": "UE en coupant une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Comble", + "txt_idx": "filling", + "comment": "UE en remplissant une autre (qui doit \u00eatre vraisemblablement une US de creusement)", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Sur", + "txt_idx": "is_above", + "comment": "UE situ\u00e9e au-dessus d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Relation indirecte", + "txt_idx": "indirect_relation", + "comment": "\u00c0 pr\u00e9ciser ", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Inclut", + "txt_idx": "include", + "comment": "UE en incluant (regroupant) d'autres (ex: tranch\u00e9e / structures ou entre structure / US, etc.)", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Incluse dans", + "txt_idx": "is_included", + "comment": "UE faisant partie d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Sous", + "txt_idx": "is_below", + "comment": "UE situ\u00e9e en-dessous d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Coup\u00e9e par", + "txt_idx": "cutted", + "comment": "UE recoup\u00e9e par une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "\u00c9quivaut \u00e0", + "txt_idx": "equals", + "comment": "UE \u00e9quivalant \u00e0 une autre", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": null, + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Combl\u00e9e par", + "txt_idx": "filled_by", + "comment": "UE remplie par une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +} +] diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 86a371538..e5c244fde 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -293,13 +293,6 @@ class RecordRelationsForm(OpeRecordRelationsForm): crs = None if 'data' in kwargs and 'CONTEXT_RECORDS' in kwargs['data']: crs = kwargs['data']['CONTEXT_RECORDS'] - # clean data if not "real" data - prefix_value = kwargs['prefix'] + '-right_record' - if not [k for k in kwargs['data'].keys() - if k.startswith(prefix_value) and kwargs['data'][k]]: - kwargs['data'] = None - if 'files' in kwargs: - kwargs.pop('files') super(RecordRelationsForm, self).__init__(*args, **kwargs) self.fields['relation_type'].choices = \ models.RelationType.get_types( diff --git a/archaeological_context_records/lookups.py b/archaeological_context_records/lookups.py new file mode 100644 index 000000000..92115d98b --- /dev/null +++ b/archaeological_context_records/lookups.py @@ -0,0 +1,23 @@ +from ajax_select import register, LookupChannel + +from django.db.models import Q + +from archaeological_context_records import models + + +@register('context_record') +class ContextRecordLookup(LookupChannel): + model = models.ContextRecord + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(cached_label__icontains=term) | + Q(parcel__town__name__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by('cached_label')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.cached_label diff --git a/archaeological_context_records/migrations/0001_initial.py b/archaeological_context_records/migrations/0001_initial.py index 599a6d4f7..743659f01 100644 --- a/archaeological_context_records/migrations/0001_initial.py +++ b/archaeological_context_records/migrations/0001_initial.py @@ -1,587 +1,318 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import models, migrations +import re +import django.contrib.gis.db.models.fields +import django.db.models.deletion +from django.conf import settings +import ishtar_common.models +import django.core.validators -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'DatingType' - db.create_table('archaeological_context_records_datingtype', ( - ('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('archaeological_context_records', ['DatingType']) +class Migration(migrations.Migration): - # Adding model 'DatingQuality' - db.create_table('archaeological_context_records_datingquality', ( - ('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('archaeological_context_records', ['DatingQuality']) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - # Adding model 'Dating' - db.create_table('archaeological_context_records_dating', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('period', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.Period'])), - ('start_date', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('dating_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.DatingType'], null=True, blank=True)), - ('quality', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.DatingQuality'], null=True, blank=True)), - )) - db.send_create_signal('archaeological_context_records', ['Dating']) - - # Adding model 'Unit' - db.create_table('archaeological_context_records_unit', ( - ('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)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.Unit'], null=True, blank=True)), - )) - db.send_create_signal('archaeological_context_records', ['Unit']) - - # Adding model 'ActivityType' - db.create_table('archaeological_context_records_activitytype', ( - ('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)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('archaeological_context_records', ['ActivityType']) - - # Adding model 'IdentificationType' - db.create_table('archaeological_context_records_identificationtype', ( - ('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)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('archaeological_context_records', ['IdentificationType']) - - # Adding model 'HistoricalContextRecord' - db.create_table('archaeological_context_records_historicalcontextrecord', ( - ('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)), - ('parcel_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('operation_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('thickness', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('depth', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('location', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), - ('unit_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('has_furniture', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('filling', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('interpretation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('taq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('taq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('tpq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('tpq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('identification_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('activity_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('archaeological_context_records', ['HistoricalContextRecord']) - - # Adding model 'ContextRecord' - db.create_table('archaeological_context_records_contextrecord', ( - ('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'])), - ('parcel', self.gf('django.db.models.fields.related.ForeignKey')(related_name='context_record', to=orm['archaeological_operations.Parcel'])), - ('operation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='context_record', to=orm['archaeological_operations.Operation'])), - ('label', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('thickness', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('depth', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('location', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), - ('unit', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['archaeological_context_records.Unit'])), - ('has_furniture', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('filling', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('interpretation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('taq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('taq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('tpq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('tpq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('identification', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.IdentificationType'], null=True, blank=True)), - ('activity', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.ActivityType'], null=True, blank=True)), - )) - db.send_create_signal('archaeological_context_records', ['ContextRecord']) - - # Adding M2M table for field datings on 'ContextRecord' - db.create_table('archaeological_context_records_contextrecord_datings', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('contextrecord', models.ForeignKey(orm['archaeological_context_records.contextrecord'], null=False)), - ('dating', models.ForeignKey(orm['archaeological_context_records.dating'], null=False)) - )) - db.create_unique('archaeological_context_records_contextrecord_datings', ['contextrecord_id', 'dating_id']) - - # Adding model 'ContextRecordSource' - db.create_table('archaeological_context_records_contextrecordsource', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), - ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), - ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('context_record', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_context_records.ContextRecord'])), - )) - db.send_create_signal('archaeological_context_records', ['ContextRecordSource']) - - # Adding M2M table for field authors on 'ContextRecordSource' - db.create_table('archaeological_context_records_contextrecordsource_authors', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('contextrecordsource', models.ForeignKey(orm['archaeological_context_records.contextrecordsource'], null=False)), - ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) - )) - db.create_unique('archaeological_context_records_contextrecordsource_authors', ['contextrecordsource_id', 'author_id']) - - - def backwards(self, orm): - # Deleting model 'DatingType' - db.delete_table('archaeological_context_records_datingtype') - - # Deleting model 'DatingQuality' - db.delete_table('archaeological_context_records_datingquality') - - # Deleting model 'Dating' - db.delete_table('archaeological_context_records_dating') - - # Deleting model 'Unit' - db.delete_table('archaeological_context_records_unit') - - # Deleting model 'ActivityType' - db.delete_table('archaeological_context_records_activitytype') - - # Deleting model 'IdentificationType' - db.delete_table('archaeological_context_records_identificationtype') - - # Deleting model 'HistoricalContextRecord' - db.delete_table('archaeological_context_records_historicalcontextrecord') - - # Deleting model 'ContextRecord' - db.delete_table('archaeological_context_records_contextrecord') - - # Removing M2M table for field datings on 'ContextRecord' - db.delete_table('archaeological_context_records_contextrecord_datings') - - # Deleting model 'ContextRecordSource' - db.delete_table('archaeological_context_records_contextrecordsource') - - # Removing M2M table for field authors on 'ContextRecordSource' - db.delete_table('archaeological_context_records_contextrecordsource_authors') - - - models = { - 'archaeological_context_records.activitytype': { - 'Meta': {'object_name': 'ActivityType'}, - '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'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_context_records.contextrecord': { - 'Meta': {'object_name': 'ContextRecord'}, - 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), - 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), - 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.contextrecordsource': { - 'Meta': {'object_name': 'ContextRecordSource'}, - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), - 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) - }, - 'archaeological_context_records.dating': { - 'Meta': {'object_name': 'Dating'}, - 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), - 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.datingquality': { - 'Meta': {'object_name': 'DatingQuality'}, - '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'}) - }, - 'archaeological_context_records.datingtype': { - 'Meta': {'object_name': 'DatingType'}, - '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'}) - }, - 'archaeological_context_records.historicalcontextrecord': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, - 'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.identificationtype': { - 'Meta': {'object_name': 'IdentificationType'}, - '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'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_context_records.unit': { - 'Meta': {'object_name': 'Unit'}, - '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'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_files.file': { - 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), - 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'object_name': 'FileType'}, - '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'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'object_name': 'PermitType'}, - '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'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {}), - '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'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'object_name': 'Operation'}, - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operationtype': { - 'Meta': {'object_name': 'OperationType'}, - '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'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'object_name': 'Parcel'}, - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.period': { - 'Meta': {'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'object_name': 'RemainType'}, - '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'}) - }, - '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.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 = ['archaeological_context_records']
\ No newline at end of file + operations = [ + migrations.CreateModel( + name='RecordRelationView', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + 'db_table': 'record_relations', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ActivityType', + 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(verbose_name='Order')), + ], + options={ + 'ordering': ('order',), + 'verbose_name': 'Activity Type', + 'verbose_name_plural': 'Activity Types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ContextRecord', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('label', models.CharField(max_length=200, verbose_name='ID')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='General comment', blank=True)), + ('opening_date', models.DateField(null=True, verbose_name="Date d'ouverture", blank=True)), + ('closing_date', models.DateField(null=True, verbose_name='End date', blank=True)), + ('length', models.FloatField(null=True, verbose_name='Length (m)', blank=True)), + ('width', models.FloatField(null=True, verbose_name='Width (m)', blank=True)), + ('thickness', models.FloatField(null=True, verbose_name='Thickness (m)', blank=True)), + ('diameter', models.FloatField(null=True, verbose_name='Diameter (m)', blank=True)), + ('depth', models.FloatField(null=True, verbose_name='Depth (m)', blank=True)), + ('depth_of_appearance', models.FloatField(null=True, verbose_name='Depth of appearance (m)', blank=True)), + ('location', models.TextField(help_text='A short description of the location of the context record', null=True, verbose_name='Location', blank=True)), + ('datings_comment', models.TextField(null=True, verbose_name='Comment on datings', blank=True)), + ('filling', models.TextField(null=True, verbose_name='Filling', blank=True)), + ('interpretation', models.TextField(null=True, verbose_name='Interpretation', blank=True)), + ('taq', models.IntegerField(help_text='"Terminus Ante Quem" the context record can\'t have been created after this date', null=True, verbose_name='TAQ', blank=True)), + ('taq_estimated', models.IntegerField(help_text='Estimation of a "Terminus Ante Quem"', null=True, verbose_name='Estimated TAQ', blank=True)), + ('tpq', models.IntegerField(help_text='"Terminus Post Quem" the context record can\'t have been created before this date', null=True, verbose_name='TPQ', blank=True)), + ('tpq_estimated', models.IntegerField(help_text='Estimation of a "Terminus Post Quem"', null=True, verbose_name='Estimated TPQ', blank=True)), + ('point', django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point', blank=True)), + ('polygon', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, verbose_name='Polygon', blank=True)), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', blank=True)), + ], + options={ + 'ordering': ('cached_label',), + 'verbose_name': 'Context Record', + 'verbose_name_plural': 'Context Record', + 'permissions': (('view_contextrecord', "Peut voir toutes les Unit\xe9s d'Enregistrement"), ('view_own_contextrecord', "Peut voir sa propre Unit\xe9 d'Enregistrement"), ('add_own_contextrecord', "Peut ajouter sa propre Unit\xe9 d'Enregistrement"), ('change_own_contextrecord', "Peut modifier sa propre Unit\xe9 d'Enregistrement"), ('delete_own_contextrecord', "Peut supprimer sa propre Unit\xe9 d'Enregistrement")), + }, + bases=(models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter, ishtar_common.models.ShortMenuItem), + ), + migrations.CreateModel( + name='ContextRecordSource', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('title', models.CharField(max_length=300, verbose_name='Title')), + ('external_id', models.TextField(max_length=300, null=True, verbose_name='External ID', blank=True)), + ('scale', models.CharField(max_length=30, null=True, verbose_name='Scale', blank=True)), + ('associated_url', models.URLField(null=True, verbose_name='Numerical ressource (web address)', blank=True)), + ('receipt_date', models.DateField(null=True, verbose_name='Receipt date', blank=True)), + ('creation_date', models.DateField(null=True, verbose_name='Creation date', blank=True)), + ('receipt_date_in_documentation', models.DateField(null=True, verbose_name='Receipt date in documentation', blank=True)), + ('item_number', models.IntegerField(default=1, verbose_name='Item number')), + ('reference', models.CharField(max_length=100, null=True, verbose_name='Ref.', blank=True)), + ('internal_reference', models.CharField(max_length=100, null=True, verbose_name='Internal ref.', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('additional_information', models.TextField(null=True, verbose_name='Additional information', blank=True)), + ('duplicate', models.BooleanField(default=False, verbose_name='Has a duplicate')), + ], + options={ + 'verbose_name': 'Context record documentation', + 'verbose_name_plural': 'Context record documentations', + 'permissions': (('view_contextrecordsource', 'Can view all Context record sources'), ('view_own_contextrecordsource', 'Can view own Context record source'), ('add_own_contextrecordsource', 'Can add own Context record source'), ('change_own_contextrecordsource', 'Can change own Context record source'), ('delete_own_contextrecordsource', 'Can delete own Context record source')), + }, + bases=(ishtar_common.models.OwnPerms, models.Model), + ), + migrations.CreateModel( + name='Dating', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('start_date', models.IntegerField(null=True, verbose_name='Start date', blank=True)), + ('end_date', models.IntegerField(null=True, verbose_name='End date', blank=True)), + ('precise_dating', models.TextField(null=True, verbose_name='Precise dating', blank=True)), + ], + options={ + 'verbose_name': 'Dating', + 'verbose_name_plural': 'Datings', + }, + ), + migrations.CreateModel( + name='DatingQuality', + 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': 'Dating quality type', + 'verbose_name_plural': 'Dating quality types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='DatingType', + 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': 'Dating type', + 'verbose_name_plural': 'Dating types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='DocumentationType', + 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': 'Documentation type', + 'verbose_name_plural': 'Documentation types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ExcavationTechnicType', + 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': 'Excavation technique type', + 'verbose_name_plural': 'Excavation technique types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='HistoricalContextRecord', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('image', models.TextField(max_length=255, null=True, blank=True)), + ('thumbnail', models.TextField(max_length=255, null=True, blank=True)), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('label', models.CharField(max_length=200, verbose_name='ID')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='General comment', blank=True)), + ('opening_date', models.DateField(null=True, verbose_name="Date d'ouverture", blank=True)), + ('closing_date', models.DateField(null=True, verbose_name='End date', blank=True)), + ('length', models.FloatField(null=True, verbose_name='Length (m)', blank=True)), + ('width', models.FloatField(null=True, verbose_name='Width (m)', blank=True)), + ('thickness', models.FloatField(null=True, verbose_name='Thickness (m)', blank=True)), + ('diameter', models.FloatField(null=True, verbose_name='Diameter (m)', blank=True)), + ('depth', models.FloatField(null=True, verbose_name='Depth (m)', blank=True)), + ('depth_of_appearance', models.FloatField(null=True, verbose_name='Depth of appearance (m)', blank=True)), + ('location', models.TextField(help_text='A short description of the location of the context record', null=True, verbose_name='Location', blank=True)), + ('datings_comment', models.TextField(null=True, verbose_name='Comment on datings', blank=True)), + ('filling', models.TextField(null=True, verbose_name='Filling', blank=True)), + ('interpretation', models.TextField(null=True, verbose_name='Interpretation', blank=True)), + ('taq', models.IntegerField(help_text='"Terminus Ante Quem" the context record can\'t have been created after this date', null=True, verbose_name='TAQ', blank=True)), + ('taq_estimated', models.IntegerField(help_text='Estimation of a "Terminus Ante Quem"', null=True, verbose_name='Estimated TAQ', blank=True)), + ('tpq', models.IntegerField(help_text='"Terminus Post Quem" the context record can\'t have been created before this date', null=True, verbose_name='TPQ', blank=True)), + ('tpq_estimated', models.IntegerField(help_text='Estimation of a "Terminus Post Quem"', null=True, verbose_name='Estimated TPQ', blank=True)), + ('point', django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point', blank=True)), + ('polygon', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, verbose_name='Polygon', blank=True)), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', 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')])), + ('activity', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.ActivityType', null=True)), + ('excavation_technic', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.ExcavationTechnicType', null=True)), + ('history_creator', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('history_modifier', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('history_user', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical Context Record', + }, + ), + migrations.CreateModel( + name='IdentificationType', + 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(verbose_name='Order')), + ], + options={ + 'ordering': ('order', 'label'), + 'verbose_name': 'Identification Type', + 'verbose_name_plural': 'Identification Types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='RecordRelations', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('left_record', models.ForeignKey(related_name='right_relations', to='archaeological_context_records.ContextRecord')), + ], + options={ + 'verbose_name': 'Record relation', + 'verbose_name_plural': 'Record relations', + }, + bases=(ishtar_common.models.GeneralRecordRelations, models.Model), + ), + migrations.CreateModel( + name='RelationType', + 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')), + ('symmetrical', models.BooleanField(verbose_name='Symmetrical')), + ('tiny_label', models.CharField(max_length=50, null=True, verbose_name='Tiny label', blank=True)), + ('inverse_relation', models.ForeignKey(verbose_name='Inverse relation', blank=True, to='archaeological_context_records.RelationType', null=True)), + ], + options={ + 'ordering': ('order', 'label'), + 'verbose_name': 'Relation type', + 'verbose_name_plural': 'Relation types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Unit', + 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(verbose_name='Order')), + ('parent', models.ForeignKey(verbose_name='Parent context record type', blank=True, to='archaeological_context_records.Unit', null=True)), + ], + options={ + 'ordering': ('order', 'label'), + 'verbose_name': 'Context record Type', + 'verbose_name_plural': 'Context record Types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.AddField( + model_name='recordrelations', + name='relation_type', + field=models.ForeignKey(to='archaeological_context_records.RelationType'), + ), + migrations.AddField( + model_name='recordrelations', + name='right_record', + field=models.ForeignKey(related_name='left_relations', to='archaeological_context_records.ContextRecord'), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='identification', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.IdentificationType', null=True), + ), + ] diff --git a/archaeological_context_records/migrations/0002_auto_20170414_2123.py b/archaeological_context_records/migrations/0002_auto_20170414_2123.py new file mode 100644 index 000000000..ba54b3e65 --- /dev/null +++ b/archaeological_context_records/migrations/0002_auto_20170414_2123.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0001_initial'), + ('archaeological_context_records', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='historicalcontextrecord', + name='operation', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_operations.Operation', null=True), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='parcel', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_operations.Parcel', null=True), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='unit', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.Unit', null=True), + ), + migrations.AddField( + model_name='dating', + name='dating_type', + field=models.ForeignKey(verbose_name='Dating type', blank=True, to='archaeological_context_records.DatingType', null=True), + ), + migrations.AddField( + model_name='dating', + name='period', + field=models.ForeignKey(verbose_name='Period', to='archaeological_operations.Period'), + ), + migrations.AddField( + model_name='dating', + name='quality', + field=models.ForeignKey(verbose_name='Quality', blank=True, to='archaeological_context_records.DatingQuality', null=True), + ), + ] diff --git a/archaeological_context_records/migrations/0003_auto_20170414_2123.py b/archaeological_context_records/migrations/0003_auto_20170414_2123.py new file mode 100644 index 000000000..87bc70ebb --- /dev/null +++ b/archaeological_context_records/migrations/0003_auto_20170414_2123.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0001_initial'), + ('archaeological_context_records', '0002_auto_20170414_2123'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('ishtar_common', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='contextrecordsource', + name='authors', + field=models.ManyToManyField(related_name='contextrecordsource_related', verbose_name='Authors', to='ishtar_common.Author'), + ), + migrations.AddField( + model_name='contextrecordsource', + name='context_record', + field=models.ForeignKey(related_name='source', verbose_name='Context record', to='archaeological_context_records.ContextRecord'), + ), + migrations.AddField( + model_name='contextrecordsource', + name='format_type', + field=models.ForeignKey(verbose_name='Format', blank=True, to='ishtar_common.Format', null=True), + ), + migrations.AddField( + model_name='contextrecordsource', + name='source_type', + field=models.ForeignKey(verbose_name='Type', to='ishtar_common.SourceType'), + ), + migrations.AddField( + model_name='contextrecordsource', + name='support_type', + field=models.ForeignKey(verbose_name='Support', blank=True, to='ishtar_common.SupportType', null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='activity', + field=models.ForeignKey(verbose_name='Activity', blank=True, to='archaeological_context_records.ActivityType', null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='datings', + field=models.ManyToManyField(related_name='context_records', to='archaeological_context_records.Dating'), + ), + migrations.AddField( + model_name='contextrecord', + name='documentations', + field=models.ManyToManyField(to='archaeological_context_records.DocumentationType', blank=True), + ), + migrations.AddField( + model_name='contextrecord', + name='excavation_technic', + field=models.ForeignKey(verbose_name='Excavation technique', blank=True, to='archaeological_context_records.ExcavationTechnicType', null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='contextrecord', + name='identification', + field=models.ForeignKey(verbose_name='Identification', blank=True, to='archaeological_context_records.IdentificationType', null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_context_records_contextrecord', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='contextrecord', + name='operation', + field=models.ForeignKey(related_name='context_record', verbose_name='Operation', to='archaeological_operations.Operation'), + ), + migrations.AddField( + model_name='contextrecord', + name='parcel', + field=models.ForeignKey(related_name='context_record', verbose_name='Parcel', to='archaeological_operations.Parcel'), + ), + migrations.AddField( + model_name='contextrecord', + name='related_context_records', + field=models.ManyToManyField(to='archaeological_context_records.ContextRecord', through='archaeological_context_records.RecordRelations', blank=True), + ), + migrations.AddField( + model_name='contextrecord', + name='unit', + field=models.ForeignKey(related_name='+', verbose_name='Context record type', blank=True, to='archaeological_context_records.Unit', null=True), + ), + ] diff --git a/archaeological_context_records/migrations/0004_views.py b/archaeological_context_records/migrations/0004_views.py new file mode 100644 index 000000000..77116ef85 --- /dev/null +++ b/archaeological_context_records/migrations/0004_views.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations +from archaeological_context_records.models import RecordRelationView, CRBulkView + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0003_auto_20170414_2123'), + ] + + operations = [ + migrations.RunSQL(RecordRelationView.CREATE_SQL + + CRBulkView.CREATE_SQL), + ] diff --git a/archaeological_context_records/migrations/0005_auto_20170802_1557.py b/archaeological_context_records/migrations/0005_auto_20170802_1557.py new file mode 100644 index 000000000..3e4f9028b --- /dev/null +++ b/archaeological_context_records/migrations/0005_auto_20170802_1557.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0004_views'), + ] + + operations = [ + migrations.AlterModelOptions( + name='contextrecord', + options={'ordering': ('cached_label',), 'verbose_name': 'Context Record', 'verbose_name_plural': 'Context Record', 'permissions': (('view_contextrecord', 'Can view all Context Records'), ('view_own_contextrecord', 'Can view own Context Record'), ('add_own_contextrecord', 'Can add own Context Record'), ('change_own_contextrecord', 'Can change own Context Record'), ('delete_own_contextrecord', 'Can delete own Context Record'))}, + ), + migrations.AlterField( + model_name='contextrecord', + name='closing_date', + field=models.DateField(null=True, verbose_name='Closing date', blank=True), + ), + migrations.AlterField( + model_name='contextrecord', + name='opening_date', + field=models.DateField(null=True, verbose_name='Opening date', blank=True), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='closing_date', + field=models.DateField(null=True, verbose_name='Closing date', blank=True), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='opening_date', + field=models.DateField(null=True, verbose_name='Opening date', blank=True), + ), + ] diff --git a/archaeological_context_records/migrations/0006_auto_20170804_1741.py b/archaeological_context_records/migrations/0006_auto_20170804_1741.py new file mode 100644 index 000000000..1286c1e07 --- /dev/null +++ b/archaeological_context_records/migrations/0006_auto_20170804_1741.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.contrib.gis.db.models.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0005_auto_20170802_1557'), + ] + + operations = [ + migrations.AddField( + model_name='contextrecord', + name='point_2d', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, verbose_name='Point (2D)', blank=True), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='point_2d', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, verbose_name='Point (2D)', blank=True), + ), + ] diff --git a/archaeological_context_records/migrations/0007_auto_20170804_2024.py b/archaeological_context_records/migrations/0007_auto_20170804_2024.py new file mode 100644 index 000000000..b6d8be87c --- /dev/null +++ b/archaeological_context_records/migrations/0007_auto_20170804_2024.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import re +import django.contrib.gis.db.models.fields +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0006_auto_20170804_1741'), + ] + + operations = [ + migrations.AlterField( + model_name='activitytype', + 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='contextrecord', + name='point', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point (3D)', blank=True), + ), + migrations.AlterField( + model_name='datingquality', + 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='datingtype', + 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='documentationtype', + 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='excavationtechnictype', + 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='historicalcontextrecord', + name='point', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point (3D)', blank=True), + ), + migrations.AlterField( + model_name='identificationtype', + 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='relationtype', + 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='unit', + 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/archaeological_context_records/migrations/0008_auto_20170826_1152.py b/archaeological_context_records/migrations/0008_auto_20170826_1152.py new file mode 100644 index 000000000..6c9cb4837 --- /dev/null +++ b/archaeological_context_records/migrations/0008_auto_20170826_1152.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-26 11:52 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0007_auto_20170804_2024'), + ] + + operations = [ + migrations.AlterField( + model_name='activitytype', + 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='datingquality', + 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='datingtype', + 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='documentationtype', + 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='excavationtechnictype', + 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='identificationtype', + 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='relationtype', + 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='unit', + 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/archaeological_context_records/migrations/0009_auto_20170829_1639.py b/archaeological_context_records/migrations/0009_auto_20170829_1639.py new file mode 100644 index 000000000..25df86eb4 --- /dev/null +++ b/archaeological_context_records/migrations/0009_auto_20170829_1639.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-29 16:39 +from __future__ import unicode_literals + +from django.db import migrations, models +import ishtar_common.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0008_auto_20170826_1152'), + ] + + operations = [ + migrations.AlterField( + model_name='contextrecord', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='contextrecord', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='contextrecordsource', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='contextrecordsource', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + ] diff --git a/archaeological_context_records/migrations/0034_auto__chg_field_contextrecordsource_external_id.py b/archaeological_context_records/migrations/0034_auto__chg_field_contextrecordsource_external_id.py deleted file mode 100644 index 1c8348bbd..000000000 --- a/archaeological_context_records/migrations/0034_auto__chg_field_contextrecordsource_external_id.py +++ /dev/null @@ -1,681 +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): - - # Changing field 'ContextRecordSource.external_id' - db.alter_column('archaeological_context_records_contextrecordsource', 'external_id', self.gf('django.db.models.fields.TextField')(max_length=300, null=True)) - - def backwards(self, orm): - - # Changing field 'ContextRecordSource.external_id' - db.alter_column('archaeological_context_records_contextrecordsource', 'external_id', self.gf('django.db.models.fields.CharField')(max_length=12, null=True)) - - models = { - 'archaeological_context_records.activitytype': { - 'Meta': {'ordering': "('order',)", 'object_name': 'ActivityType'}, - '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', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.contextrecord': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'ContextRecord'}, - 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), - 'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'documentations': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.DocumentationType']", 'null': 'True', 'blank': 'True'}), - 'excavation_technic': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ExcavationTechnicType']", 'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'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'}), - 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_context_records_contextrecord'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), - 'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), - 'related_context_records': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.ContextRecord']", 'null': 'True', 'through': "orm['archaeological_context_records.RecordRelations']", 'blank': 'True'}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), - 'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.contextrecordsource': { - 'Meta': {'object_name': 'ContextRecordSource'}, - 'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'contextrecordsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) - }, - 'archaeological_context_records.dating': { - 'Meta': {'object_name': 'Dating'}, - 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), - 'precise_dating': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.datingquality': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DatingQuality'}, - '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'}) - }, - 'archaeological_context_records.datingtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DatingType'}, - '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'}) - }, - 'archaeological_context_records.documentationtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DocumentationType'}, - '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'}) - }, - 'archaeological_context_records.excavationtechnictype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ExcavationTechnicType'}, - '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'}) - }, - 'archaeological_context_records.historicalcontextrecord': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, - 'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_technic_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'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'}), - 'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), - 'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.identificationtype': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'IdentificationType'}, - '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', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.recordrelations': { - 'Meta': {'object_name': 'RecordRelations'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']"}), - 'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}) - }, - 'archaeological_context_records.recordrelationview': { - 'Meta': {'unique_together': "(('id', 'right_record'),)", 'object_name': 'RecordRelationView', 'db_table': "'record_relations'", 'managed': 'False'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.RelationType']"}), - 'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}) - }, - 'archaeological_context_records.relationtype': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, - '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'}), - 'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']", 'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.unit': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'Unit'}, - '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', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_files.file': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - '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'}), - 'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), - 'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), - 'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, - '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'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, - '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'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), - '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'}) - }, - 'archaeological_operations.archaeologicalsite': { - 'Meta': {'object_name': 'ArchaeologicalSite'}, - '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_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, - 'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'code_patriarche': ('django.db.models.fields.TextField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'operation_collaborator'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Person']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), - 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), - 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', '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_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.period': { - 'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, - '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'}) - }, - 'archaeological_operations.reportstate': { - 'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, - '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', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - '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': {'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.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.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.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.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.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.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.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.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 = ['archaeological_context_records']
\ No newline at end of file diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index f5df4e5ec..2f02ed9df 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -17,6 +17,8 @@ # See the file COPYING for details. +import time + from django.conf import settings from django.contrib.gis.db import models from django.core.urlresolvers import reverse @@ -24,13 +26,14 @@ from django.db import connection, transaction from django.db.models import Q from django.db.models.signals import post_delete, post_save from django.utils.translation import ugettext_lazy as _, ugettext, pgettext +from django.utils.text import slugify from ishtar_common.utils import cached_label_changed from ishtar_common.models import GeneralType, BaseHistorizedItem, \ HistoricalRecords, OwnPerms, ShortMenuItem, Source, GeneralRelationType,\ - GeneralRecordRelations, post_delete_record_relation, get_external_id, \ - ImageModel, post_save_cache, ValueGetter + GeneralRecordRelations, post_delete_record_relation, \ + ImageModel, post_save_cache, ValueGetter, BulkUpdatedItem from archaeological_operations.models import Operation, Period, Parcel @@ -74,6 +77,20 @@ class Dating(models.Model): return unicode(self.period) return u"%s (%s-%s)" % (self.period, start_date, end_date) + def context_records_lbl(self): + return u" - ".join( + [cr.cached_label for cr in self.context_records.all()] + ) + context_records_lbl.short_description = _(u"Context record") + context_records_lbl.admin_order_field = "context_records__cached_label" + + def finds_lbl(self): + return u" - ".join( + [f.cached_label for f in self.find.all()] + ) + finds_lbl.short_description = _(u"Find") + finds_lbl.admin_order_field = "find__cached_label" + @classmethod def fix_dating_association(cls, obj): """ @@ -172,10 +189,12 @@ class CRBulkView(object): """ -class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, - ValueGetter, ShortMenuItem): +class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, + ImageModel, OwnPerms, ValueGetter, ShortMenuItem): SHOW_URL = 'show-contextrecord' SLUG = 'contextrecord' + EXTERNAL_ID_KEY = 'context_record_external_id' + EXTERNAL_ID_DEPENDENCIES = ['base_finds'] TABLE_COLS = ['label', 'operation__common_name', 'parcel__town__name', 'parcel__label', 'unit'] if settings.COUNTRY == 'fr': @@ -199,7 +218,6 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, 'related_context_records': 'detailled_related_context_records' } } - IMAGE_PREFIX = 'context_records/' # search parameters EXTRA_REQUEST_KEYS = { @@ -248,9 +266,8 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, _(u"Location"), blank=True, null=True, help_text=_(u"A short description of the location of the context " u"record")) - datings = models.ManyToManyField(Dating) - documentations = models.ManyToManyField(DocumentationType, blank=True, - null=True) + datings = models.ManyToManyField(Dating, related_name='context_records') + documentations = models.ManyToManyField(DocumentationType, blank=True) datings_comment = models.TextField(_(u"Comment on datings"), blank=True, null=True) unit = models.ForeignKey(Unit, verbose_name=_(u"Context record type"), @@ -281,8 +298,9 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ExcavationTechnicType, blank=True, null=True, verbose_name=_(u"Excavation technique")) related_context_records = models.ManyToManyField( - 'ContextRecord', through='RecordRelations', blank=True, null=True) - point = models.PointField(_(u"Point"), blank=True, null=True, dim=3) + 'ContextRecord', through='RecordRelations', blank=True) + point_2d = models.PointField(_(u"Point (2D)"), blank=True, null=True) + point = models.PointField(_(u"Point (3D)"), blank=True, null=True, dim=3) polygon = models.PolygonField(_(u"Polygon"), blank=True, null=True) cached_label = models.TextField(_(u"Cached name"), null=True, blank=True) history = HistoricalRecords() @@ -291,15 +309,11 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, verbose_name = _(u"Context Record") verbose_name_plural = _(u"Context Record") permissions = ( - ("view_contextrecord", ugettext(u"Can view all Context Records")), - ("view_own_contextrecord", - ugettext(u"Can view own Context Record")), - ("add_own_contextrecord", - ugettext(u"Can add own Context Record")), - ("change_own_contextrecord", - ugettext(u"Can change own Context Record")), - ("delete_own_contextrecord", - ugettext(u"Can delete own Context Record")), + ("view_contextrecord", u"Can view all Context Records"), + ("view_own_contextrecord", u"Can view own Context Record"), + ("add_own_contextrecord", u"Can add own Context Record"), + ("change_own_contextrecord", u"Can change own Context Record"), + ("delete_own_contextrecord", u"Can delete own Context Record"), ) ordering = ('cached_label',) @@ -315,7 +329,13 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, return self.short_label @classmethod - def cached_label_bulk_update(cls, operation_id=None, parcel_id=None): + def cached_label_bulk_update(cls, operation_id=None, parcel_id=None, + transaction_id=None): + transaction_id, is_recursion = cls.bulk_recursion( + transaction_id, [operation_id, parcel_id]) + if is_recursion: + return + if operation_id: where = "operation_id = %s" args = [int(operation_id)] @@ -326,6 +346,8 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, kwargs = {'parcel_id': parcel_id} else: return + kwargs['transaction_id'] = transaction_id + sql = """ UPDATE "archaeological_context_records_contextrecord" AS cr SET cached_label = @@ -362,12 +384,10 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, """.format(main_ope_prefix=settings.ISHTAR_OPE_PREFIX, ope_prefix=settings.ISHTAR_DEF_OPE_PREFIX, join=settings.JOINT, where=where) - # with connection.cursor() as c: # django 1.8 - c = connection.cursor() - c.execute(sql, args) - transaction.commit_unless_managed() - cls._meta.get_field_by_name( - 'base_finds')[0].model.cached_label_bulk_update(**kwargs) + with connection.cursor() as c: + c.execute(sql, args) + cls._meta.get_field( + 'base_finds').related_model.cached_label_bulk_update(**kwargs) @property def short_label(self): @@ -379,11 +399,11 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, return reverse('show-contextrecord', args=[self.pk, '']) @classmethod - def get_query_owns(cls, user): - return (Q(operation__scientist=user.ishtaruser.person) | - Q(operation__in_charge=user.ishtaruser.person) | - Q(operation__collaborators__pk=user.ishtaruser.person.pk) | - Q(history_creator=user)) \ + def get_query_owns(cls, ishtaruser): + return (Q(operation__scientist=ishtaruser.person) | + Q(operation__in_charge=ishtaruser.person) | + Q(operation__collaborators__pk=ishtaruser.person.pk) | + Q(history_creator=ishtaruser.user_ptr)) \ & Q(operation__end_date__isnull=True) @classmethod @@ -429,6 +449,13 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, context_record_id=self.pk) return True + def _get_base_image_path(self): + ope = self.operation + return u"operation/{}/{}/{}/{}".format( + ope.year, ope.reference, self.SLUG, + slugify(self.label or u"00") + ) + @property def reference(self): if not self.operation: @@ -493,20 +520,6 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, from archaeological_finds.models import FindSource return FindSource.objects.filter(find__base_finds__context_record=self) - def save(self, *args, **kwargs): - returned = super(ContextRecord, self).save(*args, **kwargs) - updated = False - if not self.external_id or self.auto_external_id: - external_id = get_external_id('context_record_external_id', self) - if external_id != self.external_id: - updated = True - self.auto_external_id = True - self.external_id = external_id - if updated: - self._cached_label_checked = False - self.save() - return returned - def fix(self): """ Fix redundant m2m dating association (usually after imports) @@ -518,10 +531,6 @@ post_save.connect(cached_label_changed, sender=ContextRecord) class RelationType(GeneralRelationType): - inverse_relation = models.ForeignKey( - 'RelationType', verbose_name=_(u"Inverse relation"), blank=True, - null=True) - class Meta: verbose_name = _(u"Relation type") verbose_name_plural = _(u"Relation types") @@ -567,7 +576,7 @@ post_delete.connect(post_delete_record_relation, sender=RecordRelations) class RecordRelationView(models.Model): - """ + CREATE_SQL = """ CREATE VIEW record_relations AS SELECT DISTINCT right_record_id as id, right_record_id, @@ -579,6 +588,9 @@ class RecordRelationView(models.Model): CREATE RULE record_relations_del AS ON DELETE TO record_relations DO INSTEAD DELETE FROM record_relations where id=NULL; """ + DELETE_SQL = """ + DROP VIEW record_relations; + """ TABLE_COLS = [ "relation_type", "right_record__label", "right_record__unit", "right_record__parcel", @@ -648,15 +660,15 @@ class ContextRecordSource(Source): verbose_name_plural = _(u"Context record documentations") permissions = ( ("view_contextrecordsource", - ugettext(u"Can view all Context record sources")), + u"Can view all Context record sources"), ("view_own_contextrecordsource", - ugettext(u"Can view own Context record source")), + u"Can view own Context record source"), ("add_own_contextrecordsource", - ugettext(u"Can add own Context record source")), + u"Can add own Context record source"), ("change_own_contextrecordsource", - ugettext(u"Can change own Context record source")), + u"Can change own Context record source"), ("delete_own_contextrecordsource", - ugettext(u"Can delete own Context record source")), + u"Can delete own Context record source"), ) context_record = models.ForeignKey( ContextRecord, verbose_name=_(u"Context record"), @@ -674,3 +686,4 @@ class ContextRecordSource(Source): Q(context_record__operation__collaborators__pk= user.ishtaruser.person.pk)) \ & Q(context_record__operation__end_date__isnull=True) + diff --git a/archaeological_context_records/old_migrations/0001_initial.py b/archaeological_context_records/old_migrations/0001_initial.py new file mode 100644 index 000000000..599a6d4f7 --- /dev/null +++ b/archaeological_context_records/old_migrations/0001_initial.py @@ -0,0 +1,587 @@ +# -*- 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 'DatingType' + db.create_table('archaeological_context_records_datingtype', ( + ('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('archaeological_context_records', ['DatingType']) + + # Adding model 'DatingQuality' + db.create_table('archaeological_context_records_datingquality', ( + ('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('archaeological_context_records', ['DatingQuality']) + + # Adding model 'Dating' + db.create_table('archaeological_context_records_dating', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('period', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.Period'])), + ('start_date', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('end_date', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('dating_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.DatingType'], null=True, blank=True)), + ('quality', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.DatingQuality'], null=True, blank=True)), + )) + db.send_create_signal('archaeological_context_records', ['Dating']) + + # Adding model 'Unit' + db.create_table('archaeological_context_records_unit', ( + ('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)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.Unit'], null=True, blank=True)), + )) + db.send_create_signal('archaeological_context_records', ['Unit']) + + # Adding model 'ActivityType' + db.create_table('archaeological_context_records_activitytype', ( + ('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)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + )) + db.send_create_signal('archaeological_context_records', ['ActivityType']) + + # Adding model 'IdentificationType' + db.create_table('archaeological_context_records_identificationtype', ( + ('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)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + )) + db.send_create_signal('archaeological_context_records', ['IdentificationType']) + + # Adding model 'HistoricalContextRecord' + db.create_table('archaeological_context_records_historicalcontextrecord', ( + ('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)), + ('parcel_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('operation_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('thickness', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('depth', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('location', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), + ('unit_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('has_furniture', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('filling', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('interpretation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('taq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('taq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('tpq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('tpq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('identification_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('activity_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('archaeological_context_records', ['HistoricalContextRecord']) + + # Adding model 'ContextRecord' + db.create_table('archaeological_context_records_contextrecord', ( + ('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'])), + ('parcel', self.gf('django.db.models.fields.related.ForeignKey')(related_name='context_record', to=orm['archaeological_operations.Parcel'])), + ('operation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='context_record', to=orm['archaeological_operations.Operation'])), + ('label', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('thickness', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('depth', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('location', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), + ('unit', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['archaeological_context_records.Unit'])), + ('has_furniture', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('filling', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('interpretation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('taq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('taq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('tpq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('tpq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('identification', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.IdentificationType'], null=True, blank=True)), + ('activity', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.ActivityType'], null=True, blank=True)), + )) + db.send_create_signal('archaeological_context_records', ['ContextRecord']) + + # Adding M2M table for field datings on 'ContextRecord' + db.create_table('archaeological_context_records_contextrecord_datings', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('contextrecord', models.ForeignKey(orm['archaeological_context_records.contextrecord'], null=False)), + ('dating', models.ForeignKey(orm['archaeological_context_records.dating'], null=False)) + )) + db.create_unique('archaeological_context_records_contextrecord_datings', ['contextrecord_id', 'dating_id']) + + # Adding model 'ContextRecordSource' + db.create_table('archaeological_context_records_contextrecordsource', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), + ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), + ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('context_record', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_context_records.ContextRecord'])), + )) + db.send_create_signal('archaeological_context_records', ['ContextRecordSource']) + + # Adding M2M table for field authors on 'ContextRecordSource' + db.create_table('archaeological_context_records_contextrecordsource_authors', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('contextrecordsource', models.ForeignKey(orm['archaeological_context_records.contextrecordsource'], null=False)), + ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) + )) + db.create_unique('archaeological_context_records_contextrecordsource_authors', ['contextrecordsource_id', 'author_id']) + + + def backwards(self, orm): + # Deleting model 'DatingType' + db.delete_table('archaeological_context_records_datingtype') + + # Deleting model 'DatingQuality' + db.delete_table('archaeological_context_records_datingquality') + + # Deleting model 'Dating' + db.delete_table('archaeological_context_records_dating') + + # Deleting model 'Unit' + db.delete_table('archaeological_context_records_unit') + + # Deleting model 'ActivityType' + db.delete_table('archaeological_context_records_activitytype') + + # Deleting model 'IdentificationType' + db.delete_table('archaeological_context_records_identificationtype') + + # Deleting model 'HistoricalContextRecord' + db.delete_table('archaeological_context_records_historicalcontextrecord') + + # Deleting model 'ContextRecord' + db.delete_table('archaeological_context_records_contextrecord') + + # Removing M2M table for field datings on 'ContextRecord' + db.delete_table('archaeological_context_records_contextrecord_datings') + + # Deleting model 'ContextRecordSource' + db.delete_table('archaeological_context_records_contextrecordsource') + + # Removing M2M table for field authors on 'ContextRecordSource' + db.delete_table('archaeological_context_records_contextrecordsource_authors') + + + models = { + 'archaeological_context_records.activitytype': { + 'Meta': {'object_name': 'ActivityType'}, + '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'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_context_records.contextrecord': { + 'Meta': {'object_name': 'ContextRecord'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), + 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), + 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'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'}), + 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), + 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), + 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), + 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), + 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_context_records.contextrecordsource': { + 'Meta': {'object_name': 'ContextRecordSource'}, + 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), + 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), + 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) + }, + 'archaeological_context_records.dating': { + 'Meta': {'object_name': 'Dating'}, + 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), + 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_context_records.datingquality': { + 'Meta': {'object_name': 'DatingQuality'}, + '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'}) + }, + 'archaeological_context_records.datingtype': { + 'Meta': {'object_name': 'DatingType'}, + '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'}) + }, + 'archaeological_context_records.historicalcontextrecord': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, + 'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'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'}), + 'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_context_records.identificationtype': { + 'Meta': {'object_name': 'IdentificationType'}, + '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'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_context_records.unit': { + 'Meta': {'object_name': 'Unit'}, + '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'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_files.file': { + 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), + 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), + 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), + 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), + 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), + 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), + 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) + }, + 'archaeological_files.filetype': { + 'Meta': {'object_name': 'FileType'}, + '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'}) + }, + 'archaeological_files.permittype': { + 'Meta': {'object_name': 'PermitType'}, + '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'}) + }, + 'archaeological_files.saisinetype': { + 'Meta': {'object_name': 'SaisineType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'delay': ('django.db.models.fields.IntegerField', [], {}), + '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'}) + }, + 'archaeological_operations.operation': { + 'Meta': {'object_name': 'Operation'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {}), + 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), + 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), + 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), + 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), + 'year': ('django.db.models.fields.IntegerField', [], {}), + 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.operationtype': { + 'Meta': {'object_name': 'OperationType'}, + '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'}) + }, + 'archaeological_operations.parcel': { + 'Meta': {'object_name': 'Parcel'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), + 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6'}), + 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), + 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.period': { + 'Meta': {'object_name': 'Period'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.IntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.remaintype': { + 'Meta': {'object_name': 'RemainType'}, + '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'}) + }, + '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.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 = ['archaeological_context_records']
\ No newline at end of file diff --git a/archaeological_context_records/migrations/0002_auto__add_field_contextrecordsource_reference__add_field_contextrecord.py b/archaeological_context_records/old_migrations/0002_auto__add_field_contextrecordsource_reference__add_field_contextrecord.py index 07be02460..07be02460 100644 --- a/archaeological_context_records/migrations/0002_auto__add_field_contextrecordsource_reference__add_field_contextrecord.py +++ b/archaeological_context_records/old_migrations/0002_auto__add_field_contextrecordsource_reference__add_field_contextrecord.py diff --git a/archaeological_context_records/migrations/0003_auto__add_field_contextrecord_history_creator__add_field_historicalcon.py b/archaeological_context_records/old_migrations/0003_auto__add_field_contextrecord_history_creator__add_field_historicalcon.py index e00de4865..e00de4865 100644 --- a/archaeological_context_records/migrations/0003_auto__add_field_contextrecord_history_creator__add_field_historicalcon.py +++ b/archaeological_context_records/old_migrations/0003_auto__add_field_contextrecord_history_creator__add_field_historicalcon.py diff --git a/archaeological_context_records/migrations/0004_init_history_creator.py b/archaeological_context_records/old_migrations/0004_init_history_creator.py index b231214a4..b231214a4 100644 --- a/archaeological_context_records/migrations/0004_init_history_creator.py +++ b/archaeological_context_records/old_migrations/0004_init_history_creator.py diff --git a/archaeological_context_records/migrations/0005_reinit_history_creator.py b/archaeological_context_records/old_migrations/0005_reinit_history_creator.py index 7e4f62200..7e4f62200 100644 --- a/archaeological_context_records/migrations/0005_reinit_history_creator.py +++ b/archaeological_context_records/old_migrations/0005_reinit_history_creator.py diff --git a/archaeological_context_records/migrations/0006_auto__chg_field_contextrecord_history_creator__chg_field_contextrecord.py b/archaeological_context_records/old_migrations/0006_auto__chg_field_contextrecord_history_creator__chg_field_contextrecord.py index 0d9a3b5da..0d9a3b5da 100644 --- a/archaeological_context_records/migrations/0006_auto__chg_field_contextrecord_history_creator__chg_field_contextrecord.py +++ b/archaeological_context_records/old_migrations/0006_auto__chg_field_contextrecord_history_creator__chg_field_contextrecord.py diff --git a/archaeological_context_records/migrations/0007_auto__add_relationtype__add_recordrelations.py b/archaeological_context_records/old_migrations/0007_auto__add_relationtype__add_recordrelations.py index c9c7d2842..c9c7d2842 100644 --- a/archaeological_context_records/migrations/0007_auto__add_relationtype__add_recordrelations.py +++ b/archaeological_context_records/old_migrations/0007_auto__add_relationtype__add_recordrelations.py diff --git a/archaeological_context_records/migrations/0008_auto__add_field_contextrecord_external_id__add_field_contextrecord_com.py b/archaeological_context_records/old_migrations/0008_auto__add_field_contextrecord_external_id__add_field_contextrecord_com.py index 133406cf1..133406cf1 100644 --- a/archaeological_context_records/migrations/0008_auto__add_field_contextrecord_external_id__add_field_contextrecord_com.py +++ b/archaeological_context_records/old_migrations/0008_auto__add_field_contextrecord_external_id__add_field_contextrecord_com.py diff --git a/archaeological_context_records/migrations/0009_auto__add_field_contextrecordsource_external_id.py b/archaeological_context_records/old_migrations/0009_auto__add_field_contextrecordsource_external_id.py index cc0b83c99..cc0b83c99 100644 --- a/archaeological_context_records/migrations/0009_auto__add_field_contextrecordsource_external_id.py +++ b/archaeological_context_records/old_migrations/0009_auto__add_field_contextrecordsource_external_id.py diff --git a/archaeological_context_records/migrations/0010_auto.py b/archaeological_context_records/old_migrations/0010_auto.py index f04e73c4c..f04e73c4c 100644 --- a/archaeological_context_records/migrations/0010_auto.py +++ b/archaeological_context_records/old_migrations/0010_auto.py diff --git a/archaeological_context_records/migrations/0011_auto__chg_field_datingtype_txt_idx__chg_field_datingquality_txt_idx__c.py b/archaeological_context_records/old_migrations/0011_auto__chg_field_datingtype_txt_idx__chg_field_datingquality_txt_idx__c.py index dec4559be..dec4559be 100644 --- a/archaeological_context_records/migrations/0011_auto__chg_field_datingtype_txt_idx__chg_field_datingquality_txt_idx__c.py +++ b/archaeological_context_records/old_migrations/0011_auto__chg_field_datingtype_txt_idx__chg_field_datingquality_txt_idx__c.py diff --git a/archaeological_context_records/migrations/0012_auto__add_field_dating_precise_dating.py b/archaeological_context_records/old_migrations/0012_auto__add_field_dating_precise_dating.py index 3bd640ea3..3bd640ea3 100644 --- a/archaeological_context_records/migrations/0012_auto__add_field_dating_precise_dating.py +++ b/archaeological_context_records/old_migrations/0012_auto__add_field_dating_precise_dating.py diff --git a/archaeological_context_records/migrations/0013_auto__add_field_contextrecordsource_duplicate__chg_field_contextrecord.py b/archaeological_context_records/old_migrations/0013_auto__add_field_contextrecordsource_duplicate__chg_field_contextrecord.py index 2bed4037f..2bed4037f 100644 --- a/archaeological_context_records/migrations/0013_auto__add_field_contextrecordsource_duplicate__chg_field_contextrecord.py +++ b/archaeological_context_records/old_migrations/0013_auto__add_field_contextrecordsource_duplicate__chg_field_contextrecord.py diff --git a/archaeological_context_records/migrations/0014_auto__add_field_contextrecordsource_receipt_date_in_documentation.py b/archaeological_context_records/old_migrations/0014_auto__add_field_contextrecordsource_receipt_date_in_documentation.py index 61649e977..61649e977 100644 --- a/archaeological_context_records/migrations/0014_auto__add_field_contextrecordsource_receipt_date_in_documentation.py +++ b/archaeological_context_records/old_migrations/0014_auto__add_field_contextrecordsource_receipt_date_in_documentation.py diff --git a/archaeological_context_records/migrations/0015_auto__add_field_contextrecord_point__add_field_contextrecord_polygon__.py b/archaeological_context_records/old_migrations/0015_auto__add_field_contextrecord_point__add_field_contextrecord_polygon__.py index ba49c8e49..ba49c8e49 100644 --- a/archaeological_context_records/migrations/0015_auto__add_field_contextrecord_point__add_field_contextrecord_polygon__.py +++ b/archaeological_context_records/old_migrations/0015_auto__add_field_contextrecord_point__add_field_contextrecord_polygon__.py diff --git a/archaeological_context_records/migrations/0016_auto__add_field_relationtype_short_label.py b/archaeological_context_records/old_migrations/0016_auto__add_field_relationtype_short_label.py index 022de2e93..022de2e93 100644 --- a/archaeological_context_records/migrations/0016_auto__add_field_relationtype_short_label.py +++ b/archaeological_context_records/old_migrations/0016_auto__add_field_relationtype_short_label.py diff --git a/archaeological_context_records/migrations/0017_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py b/archaeological_context_records/old_migrations/0017_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py index fb49cce27..fb49cce27 100644 --- a/archaeological_context_records/migrations/0017_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py +++ b/archaeological_context_records/old_migrations/0017_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py diff --git a/archaeological_context_records/migrations/0018_auto__chg_field_contextrecord_external_id__chg_field_historicalcontext.py b/archaeological_context_records/old_migrations/0018_auto__chg_field_contextrecord_external_id__chg_field_historicalcontext.py index 0a5d3c569..0a5d3c569 100644 --- a/archaeological_context_records/migrations/0018_auto__chg_field_contextrecord_external_id__chg_field_historicalcontext.py +++ b/archaeological_context_records/old_migrations/0018_auto__chg_field_contextrecord_external_id__chg_field_historicalcontext.py diff --git a/archaeological_context_records/migrations/0019_auto__add_field_contextrecord_auto_external_id__add_field_historicalco.py b/archaeological_context_records/old_migrations/0019_auto__add_field_contextrecord_auto_external_id__add_field_historicalco.py index 8a0d056e3..8a0d056e3 100644 --- a/archaeological_context_records/migrations/0019_auto__add_field_contextrecord_auto_external_id__add_field_historicalco.py +++ b/archaeological_context_records/old_migrations/0019_auto__add_field_contextrecord_auto_external_id__add_field_historicalco.py diff --git a/archaeological_context_records/migrations/0020_auto__add_field_contextrecord_datings_comment__add_field_historicalcon.py b/archaeological_context_records/old_migrations/0020_auto__add_field_contextrecord_datings_comment__add_field_historicalcon.py index c4600591e..c4600591e 100644 --- a/archaeological_context_records/migrations/0020_auto__add_field_contextrecord_datings_comment__add_field_historicalcon.py +++ b/archaeological_context_records/old_migrations/0020_auto__add_field_contextrecord_datings_comment__add_field_historicalcon.py diff --git a/archaeological_context_records/migrations/0021_auto__chg_field_contextrecord_depth__chg_field_contextrecord_thickness.py b/archaeological_context_records/old_migrations/0021_auto__chg_field_contextrecord_depth__chg_field_contextrecord_thickness.py index c48d595a7..c48d595a7 100644 --- a/archaeological_context_records/migrations/0021_auto__chg_field_contextrecord_depth__chg_field_contextrecord_thickness.py +++ b/archaeological_context_records/old_migrations/0021_auto__chg_field_contextrecord_depth__chg_field_contextrecord_thickness.py diff --git a/archaeological_context_records/migrations/0022_auto__add_field_contextrecord_image__add_field_contextrecord_thumbnail.py b/archaeological_context_records/old_migrations/0022_auto__add_field_contextrecord_image__add_field_contextrecord_thumbnail.py index 616951092..616951092 100644 --- a/archaeological_context_records/migrations/0022_auto__add_field_contextrecord_image__add_field_contextrecord_thumbnail.py +++ b/archaeological_context_records/old_migrations/0022_auto__add_field_contextrecord_image__add_field_contextrecord_thumbnail.py diff --git a/archaeological_context_records/migrations/0023_clean_parcels.py b/archaeological_context_records/old_migrations/0023_clean_parcels.py index cd38a1deb..cd38a1deb 100644 --- a/archaeological_context_records/migrations/0023_clean_parcels.py +++ b/archaeological_context_records/old_migrations/0023_clean_parcels.py diff --git a/archaeological_context_records/migrations/0024_auto__add_field_contextrecord_cached_label__add_field_historicalcontex.py b/archaeological_context_records/old_migrations/0024_auto__add_field_contextrecord_cached_label__add_field_historicalcontex.py index 675326715..675326715 100644 --- a/archaeological_context_records/migrations/0024_auto__add_field_contextrecord_cached_label__add_field_historicalcontex.py +++ b/archaeological_context_records/old_migrations/0024_auto__add_field_contextrecord_cached_label__add_field_historicalcontex.py diff --git a/archaeological_context_records/migrations/0025_generate_cached_label.py b/archaeological_context_records/old_migrations/0025_generate_cached_label.py index 1c559b21a..1c559b21a 100644 --- a/archaeological_context_records/migrations/0025_generate_cached_label.py +++ b/archaeological_context_records/old_migrations/0025_generate_cached_label.py diff --git a/archaeological_context_records/migrations/0026_auto__chg_field_contextrecord_image__chg_field_contextrecord_thumbnail.py b/archaeological_context_records/old_migrations/0026_auto__chg_field_contextrecord_image__chg_field_contextrecord_thumbnail.py index d17c902c5..d17c902c5 100644 --- a/archaeological_context_records/migrations/0026_auto__chg_field_contextrecord_image__chg_field_contextrecord_thumbnail.py +++ b/archaeological_context_records/old_migrations/0026_auto__chg_field_contextrecord_image__chg_field_contextrecord_thumbnail.py diff --git a/archaeological_context_records/migrations/0027_view_record_relations.py b/archaeological_context_records/old_migrations/0027_view_record_relations.py index ebf4a1349..ebf4a1349 100644 --- a/archaeological_context_records/migrations/0027_view_record_relations.py +++ b/archaeological_context_records/old_migrations/0027_view_record_relations.py diff --git a/archaeological_context_records/migrations/0028_auto__chg_field_contextrecord_location__chg_field_historicalcontextrec.py b/archaeological_context_records/old_migrations/0028_auto__chg_field_contextrecord_location__chg_field_historicalcontextrec.py index ef2c330cb..ef2c330cb 100644 --- a/archaeological_context_records/migrations/0028_auto__chg_field_contextrecord_location__chg_field_historicalcontextrec.py +++ b/archaeological_context_records/old_migrations/0028_auto__chg_field_contextrecord_location__chg_field_historicalcontextrec.py diff --git a/archaeological_context_records/migrations/0029_create_bulk_update_view.py b/archaeological_context_records/old_migrations/0029_create_bulk_update_view.py index 1dc20a752..1dc20a752 100644 --- a/archaeological_context_records/migrations/0029_create_bulk_update_view.py +++ b/archaeological_context_records/old_migrations/0029_create_bulk_update_view.py diff --git a/archaeological_context_records/migrations/0030_auto__add_excavationtechnictype__add_field_contextrecord_excavation_te.py b/archaeological_context_records/old_migrations/0030_auto__add_excavationtechnictype__add_field_contextrecord_excavation_te.py index 3a4097451..3a4097451 100644 --- a/archaeological_context_records/migrations/0030_auto__add_excavationtechnictype__add_field_contextrecord_excavation_te.py +++ b/archaeological_context_records/old_migrations/0030_auto__add_excavationtechnictype__add_field_contextrecord_excavation_te.py diff --git a/archaeological_context_records/migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py b/archaeological_context_records/old_migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py index f56f26e9f..f56f26e9f 100644 --- a/archaeological_context_records/migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py +++ b/archaeological_context_records/old_migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py diff --git a/archaeological_context_records/migrations/0032_has_furniture_to_documentations.py b/archaeological_context_records/old_migrations/0032_has_furniture_to_documentations.py index 0b5de776a..0b5de776a 100644 --- a/archaeological_context_records/migrations/0032_has_furniture_to_documentations.py +++ b/archaeological_context_records/old_migrations/0032_has_furniture_to_documentations.py diff --git a/archaeological_context_records/migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py b/archaeological_context_records/old_migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py index 65c5d54da..65c5d54da 100644 --- a/archaeological_context_records/migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py +++ b/archaeological_context_records/old_migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py diff --git a/archaeological_files_pdl/migrations/__init__.py b/archaeological_context_records/old_migrations/__init__.py index e69de29bb..e69de29bb 100644 --- a/archaeological_files_pdl/migrations/__init__.py +++ b/archaeological_context_records/old_migrations/__init__.py diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 0a5ea30fc..170c2d87c 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -95,7 +95,7 @@ <h3>{% trans "Localisation"%}</h3> <p><label>{%trans "Towns"%}</label> <span class='value'>{{ item.operation.towns.all|join:", " }}</span></p> <p><label>{%trans "Related operation"%}</label> -<span class='value'><a href="#" onclick='load_window("{% url show-operation item.operation.pk ''%}");'>{{ item.operation }}</a></span></p> +<span class='value'><a href="#" onclick='load_window("{% url "show-operation" item.operation.pk ''%}");'>{{ item.operation }}</a></span></p> {% else %}<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <label>{%trans "No operation linked to this context unit!"%}</label></p> {% endif %} diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index 7277eaef0..89b15fbbf 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -41,11 +41,19 @@ from archaeological_context_records import views CONTEXT_RECORD_FIXTURES = FILE_FIXTURES + [ settings.ROOT_PATH + '../archaeological_context_records/fixtures/initial_data-fr.json', + '../archaeological_context_records/fixtures/' + 'initial_data_relation_type_norel-fr.json', + '../archaeological_context_records/fixtures/' + 'initial_data_relation_type-fr.json', ] CONTEXT_RECORD_TOWNS_FIXTURES = FILE_TOWNS_FIXTURES + [ settings.ROOT_PATH + '../archaeological_context_records/fixtures/initial_data-fr.json', + '../archaeological_context_records/fixtures/' + 'initial_data_relation_type_norel-fr.json', + '../archaeological_context_records/fixtures/' + 'initial_data_relation_type-fr.json', ] @@ -374,7 +382,6 @@ class ContextRecordTest(ContextRecordInit, TestCase): self.assertEqual(obj.datings.count(), 2) - class ContextRecordSearchTest(ContextRecordInit, TestCase): fixtures = CONTEXT_RECORD_TOWNS_FIXTURES @@ -618,7 +625,7 @@ class ContextRecordWizardCreationTest(WizardTest, ContextRecordInit, TestCase): 'relations', {'right_record': self.related_cr.pk, 'relation_type': models.RelationType.objects.create( - label="Test").pk} + label="Test", symmetrical=False).pk} ) period = models.Period.objects.all()[0].pk diff --git a/archaeological_context_records/urls.py b/archaeological_context_records/urls.py index e89a76aef..86e4c3137 100644 --- a/archaeological_context_records/urls.py +++ b/archaeological_context_records/urls.py @@ -17,17 +17,16 @@ # See the file COPYING for details. -from django.conf.urls.defaults import * +from django.conf.urls import url from archaeological_context_records import models from ishtar_common.wizards import check_rights -import views +from archaeological_context_records import views # be careful: each check_rights must be relevant with ishtar_menu # forms -urlpatterns = patterns( - '', +urlpatterns = [ # Context records url(r'record_search/(?P<step>.+)?$', check_rights(['view_contextrecord', 'view_own_contextrecord'])( @@ -61,50 +60,47 @@ urlpatterns = patterns( check_rights(['change_contextrecord', 'change_own_contextrecord'])( views.record_source_deletion_wizard), name='record_source_deletion'), -) - -urlpatterns += patterns( - 'archaeological_context_records.views', - url(r'autocomplete-contextrecord/$', 'autocomplete_contextrecord', + url(r'autocomplete-contextrecord/$', views.autocomplete_contextrecord, name='autocomplete-contextrecord'), url(r'show-contextrecord(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_contextrecord', name=models.ContextRecord.SHOW_URL), + views.show_contextrecord, name=models.ContextRecord.SHOW_URL), # show-contextrecordrelation is only a view the id point to a context record url(r'show-contextrecord(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_contextrecord', name='show-contextrecordrelation'), + views.show_contextrecord, name='show-contextrecordrelation'), url(r'show-historized-contextrecord/(?P<pk>.+)?/(?P<date>.+)?$', - 'show_contextrecord', name='show-historized-contextrecord'), + views.show_contextrecord, name='show-historized-contextrecord'), url(r'revert-contextrecord/(?P<pk>.+)/(?P<date>.+)$', - 'revert_contextrecord', name='revert-contextrecord'), - url(r'get-contextrecord/own/(?P<type>.+)?$', 'get_contextrecord', + views.revert_contextrecord, name='revert-contextrecord'), + url(r'get-contextrecord/own/(?P<type>.+)?$', views.get_contextrecord, name='get-own-contextrecord', kwargs={'force_own': True}), - url(r'get-contextrecord/(?P<type>.+)?$', 'get_contextrecord', + url(r'get-contextrecord/(?P<type>.+)?$', views.get_contextrecord, name='get-contextrecord'), url(r'get-contextrecord-for-ope/own/(?P<type>.+)?$', - 'get_contextrecord_for_ope', + views.get_contextrecord_for_ope, name='get-own-contextrecord-for-ope', kwargs={'force_own': True}), url(r'get-contextrecord-for-ope/(?P<type>.+)?$', - 'get_contextrecord_for_ope', + views.get_contextrecord_for_ope, name='get-contextrecord-for-ope'), url(r'get-contextrecord-full/own/(?P<type>.+)?$', - 'get_contextrecord', name='get-own-contextrecord-full', + views.get_contextrecord, name='get-own-contextrecord-full', kwargs={'full': True, 'force_own': True}), url(r'get-contextrecord-full/(?P<type>.+)?$', - 'get_contextrecord', name='get-contextrecord-full', + views.get_contextrecord, name='get-contextrecord-full', kwargs={'full': True}), url(r'get-contextrecord-shortcut/(?P<type>.+)?$', - 'get_contextrecord', name='get-contextrecord-shortcut', + views.get_contextrecord, name='get-contextrecord-shortcut', kwargs={'full': 'shortcut'}), url(r'get-contextrecordrelation/(?P<type>.+)?$', - 'get_contextrecordrelation', name='get-contextrecordrelation'), + views.get_contextrecordrelation, name='get-contextrecordrelation'), url(r'get-contextrecordrelationdetail/(?P<type>.+)?$', - 'get_contextrecordrelationdetail', + views.get_contextrecordrelationdetail, name='get-contextrecordrelationdetail'), url(r'show-contextrecordsource(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_contextrecordsource', name=models.ContextRecordSource.SHOW_URL), + views.show_contextrecordsource, + name=models.ContextRecordSource.SHOW_URL), url(r'get-contexrecordsource/(?P<type>.+)?$', - 'get_contextrecordsource', name='get-contextrecordsource'), + views.get_contextrecordsource, name='get-contextrecordsource'), url(r'get-contexrecordsource-full/(?P<type>.+)?$', - 'get_contextrecordsource', name='get-contextrecordsource-full', + views.get_contextrecordsource, name='get-contextrecordsource-full', kwargs={'full': True}), -) +] diff --git a/archaeological_context_records/views.py b/archaeological_context_records/views.py index 250fdafc0..3bfe544be 100644 --- a/archaeological_context_records/views.py +++ b/archaeological_context_records/views.py @@ -43,9 +43,9 @@ def autocomplete_contextrecord(request): and not request.user.has_perm( 'archaeological_context_records.view_own_contextrecord', models.ArchaeologicalSite)): - 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() if request.GET.get('operation__pk'): @@ -62,7 +62,7 @@ def autocomplete_contextrecord(request): data = json.dumps([{'id': item.pk, 'value': unicode(item)[:60]} for item in items]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') get_contextrecord = get_item( models.ContextRecord, diff --git a/archaeological_files/__init__.py b/archaeological_files/__init__.py index e69de29bb..c76037d94 100644 --- a/archaeological_files/__init__.py +++ b/archaeological_files/__init__.py @@ -0,0 +1 @@ +default_app_config = 'ishtar_common.apps.ArchaeologicalFilesConfig' diff --git a/archaeological_files/admin.py b/archaeological_files/admin.py index 9e1f56392..525f7e840 100644 --- a/archaeological_files/admin.py +++ b/archaeological_files/admin.py @@ -17,27 +17,46 @@ # See the file COPYING for details. +from ajax_select import make_ajax_form + from django.conf import settings -from django.contrib import admin +from ishtar_common.apps import admin_site from ishtar_common.admin import HistorizedObjectAdmin, GeneralTypeAdmin import models class FileAdmin(HistorizedObjectAdmin): - list_display = ['year', 'numeric_reference', 'internal_reference', - 'end_date', 'file_type', 'general_contractor'] + list_display = ['year', 'numeric_reference', 'file_type', 'name'] if settings.COUNTRY == 'fr': list_display += ['saisine_type', 'permit_reference'] - list_filter = ("file_type", "year",) - search_fields = ('towns__name',) + list_filter = ["file_type", "year"] + if settings.COUNTRY == 'fr': + list_filter += ['saisine_type'] + search_fields = ('name', 'towns__name', 'permit_reference') + form = make_ajax_form( + models.File, {'in_charge': 'person', + 'general_contractor': 'person', + 'corporation_general_contractor': 'organization', + 'responsible_town_planning_service': 'person', + 'planning_service': 'organization', + 'organization': 'organization', + 'scientist': 'person', + 'main_town': 'town', + 'towns': 'town', + 'related_file': 'file' + }) + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'raw_general_contractor', 'raw_town_planning_service', 'imports', + 'cached_label', 'imported_line' + ] model = models.File -admin.site.register(models.File, FileAdmin) +admin_site.register(models.File, FileAdmin) general_models = [models.FileType, models.PermitType] if settings.COUNTRY == 'fr': general_models.append(models.SaisineType) for model in general_models: - admin.site.register(model, GeneralTypeAdmin) + admin_site.register(model, GeneralTypeAdmin) diff --git a/archaeological_files/fixtures/initial_data-fr.json b/archaeological_files/fixtures/initial_data-fr.json index fff42cfb7..4941364ef 100644 --- a/archaeological_files/fixtures/initial_data-fr.json +++ b/archaeological_files/fixtures/initial_data-fr.json @@ -1,280 +1,253 @@ [ - { - "pk": 5, - "model": "archaeological_files.saisinetype", - "fields": { - "comment": "Article 6\r\n\r\n Lorsqu'il dispose d'informations lui indiquant qu'un projet qui ne lui est pas transmis en application de l'arr\u00eat\u00e9 mentionn\u00e9 \u00e0 l'article 5 est n\u00e9anmoins susceptible d'affecter des \u00e9l\u00e9ments du patrimoine arch\u00e9ologique, le pr\u00e9fet de r\u00e9gion peut demander au maire de lui communiquer au cours de l'instruction, selon le cas, le dossier de demande de permis de construire, de permis d'am\u00e9nager, de permis de d\u00e9molir ou le dossier de r\u00e9alisation de zone d'am\u00e9nagement concert\u00e9 qui correspond \u00e0 ce projet.\r\n\r\nIl peut, pour le m\u00eame motif, demander au maire de lui communiquer le dossier d'une d\u00e9claration pr\u00e9alable d\u00e9pos\u00e9e en application de l'article L. 421-4 du code de l'urbanisme.", - "available": true, - "txt_idx": "Article_6", - "delay": 30, - "label": "Auto-saisine (n'existe plus, pour archives donc)" - } - }, - { - "pk": 3, - "model": "archaeological_files.saisinetype", - "fields": { - "comment": "Les am\u00e9nageurs peuvent, avant de d\u00e9poser une demande pour obtenir les autorisations requises par les lois et r\u00e8glements ou avant d'engager toute autre proc\u00e9dure, saisir le pr\u00e9fet de r\u00e9gion afin qu'il examine si leur projet est susceptible de donner lieu \u00e0 des prescriptions arch\u00e9ologiques.\r\nA cette fin, ils produisent un dossier qui comporte un plan parcellaire et les r\u00e9f\u00e9rences cadastrales, le descriptif du projet et son emplacement sur le terrain d'assiette ainsi que, le cas \u00e9ch\u00e9ant, une notice pr\u00e9cisant les modalit\u00e9s techniques envisag\u00e9es pour l'ex\u00e9cution des travaux.\r\nSi le pr\u00e9fet de r\u00e9gion constate que le projet est susceptible d'affecter des \u00e9l\u00e9ments du patrimoine arch\u00e9ologique, il informe le demandeur, dans le d\u00e9lai de deux mois \u00e0 compter de la r\u00e9ception de la demande, que le projet qu'il lui a pr\u00e9sent\u00e9 donnera lieu \u00e0 des prescriptions arch\u00e9ologiques.", - "available": true, - "txt_idx": "Article_10", - "delay": 60, - "label": "Demande d'AVIS (Art. R. 523-12 du code du patrimoine)" - } - }, - { - "pk": 6, - "model": "archaeological_files.saisinetype", - "fields": { - "comment": "Lorsque des op\u00e9rations sont r\u00e9alis\u00e9es par tranches successives, le calendrier pr\u00e9visionnel de leur r\u00e9alisation est communiqu\u00e9 au pr\u00e9fet de r\u00e9gion qui peut d\u00e9cider de prescrire les mesures pr\u00e9vues \u00e0 l'article R. 523-15 soit pour la totalit\u00e9 du projet, soit lors de l'ex\u00e9cution de chaque tranche. Dans ce dernier cas, il d\u00e9finit par arr\u00eat\u00e9 les d\u00e9lais de sa saisine et la nature des documents \u00e0 fournir.\r\nLes op\u00e9rations de diagnostic sont toutefois conduites pour l'ensemble du projet si la personne qui r\u00e9alise ce projet en fait la demande.", - "available": true, - "txt_idx": "partial_demand", - "delay": 30, - "label": "Demande de r\u00e9alisation d'une TRANCHE (suite \u00e0 un arr\u00eat\u00e9 initial, Article R523-21)" - } - }, - { - "pk": 7, - "model": "archaeological_files.saisinetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "information_query", - "delay": 30, - "label": "Demande d'INFO (CU compris)" - } - }, - { - "pk": 4, - "model": "archaeological_files.saisinetype", - "fields": { - "comment": " Si le pr\u00e9fet de r\u00e9gion a fait conna\u00eetre, en application de l'article R. 523-12, la n\u00e9cessit\u00e9 d'une op\u00e9ration arch\u00e9ologique, l'am\u00e9nageur peut le saisir d'une demande anticip\u00e9e de prescription.\r\n\r\nLe pr\u00e9fet de r\u00e9gion prescrit alors, dans les conditions pr\u00e9vues par le pr\u00e9sent chapitre, la r\u00e9alisation d'un diagnostic arch\u00e9ologique et, si des \u00e9l\u00e9ments du patrimoine arch\u00e9ologique pr\u00e9sents sur le site sont d\u00e9j\u00e0 connus, prend les autres mesures pr\u00e9vues \u00e0 l'article R. 523-15.\r\n\r\nLa redevance d'arch\u00e9ologie pr\u00e9ventive correspondante est due par le demandeur, conform\u00e9ment au dernier alin\u00e9a de l'article L. 524-4.", - "available": true, - "txt_idx": "Article_12", - "delay": 30, - "label": "Demande VOLONTAIRE (Article R523-14)" - } - }, - { - "pk": 9, - "model": "archaeological_files.saisinetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "impact_study", - "delay": 60, - "label": "\u00c9tude d'impact (EI)" - } - }, - { - "pk": 2, - "model": "archaeological_files.saisinetype", - "fields": { - "comment": "Dans les cas mentionn\u00e9s aux 1\u00b0 \u00e0 5\u00b0 de l'article R. 523-4, le pr\u00e9fet de r\u00e9gion est saisi :\r\n\r\n1\u00b0 Pour les permis de construire, les permis d'am\u00e9nager et les permis de d\u00e9molir, par le pr\u00e9fet de d\u00e9partement ; celui-ci adresse au pr\u00e9fet de r\u00e9gion, d\u00e8s qu'il a re\u00e7u les \u00e9l\u00e9ments transmis par le maire en application des articles R. 423-7 \u00e0 R. 423-9 du code de l'urbanisme, les pi\u00e8ces compl\u00e9mentaires pr\u00e9vues par les arr\u00eat\u00e9s mentionn\u00e9s au dernier alin\u00e9a de l'article R. 423-2 du m\u00eame code faisant notamment appara\u00eetre l'emplacement pr\u00e9vu des travaux sur le terrain d'assiette, leur superficie, leur impact sur le sous-sol ;\r\n\r\n2\u00b0 Pour les zones d'am\u00e9nagement concert\u00e9, par la personne publique ayant pris l'initiative de la cr\u00e9ation de la zone ; celle-ci adresse au pr\u00e9fet de r\u00e9gion le dossier de r\u00e9alisation approuv\u00e9, pr\u00e9vu \u00e0 l'article R. 311-7 du code de l'urbanisme ;\r\n3\u00b0 Pour les travaux \u00e9num\u00e9r\u00e9s \u00e0 l'article R. 523-5, par le propri\u00e9taire du terrain et, s'il n'assure pas lui-m\u00eame la r\u00e9alisation des travaux, par la personne charg\u00e9e de celle-ci. Le dossier de d\u00e9claration adress\u00e9 au pr\u00e9fet de r\u00e9gion comporte un plan parcellaire, les r\u00e9f\u00e9rences cadastrales, la ou les surfaces int\u00e9ress\u00e9es, le descriptif des travaux, leur destination et leur emplacement sur le terrain d'assiette de l'op\u00e9ration ainsi qu'une notice pr\u00e9cisant les modalit\u00e9s techniques envisag\u00e9es pour leur ex\u00e9cution et leur impact sur le sous-sol ;\r\n\r\n4\u00b0 Pour les am\u00e9nagements et ouvrages mentionn\u00e9s au 5\u00b0 de l'article R. 523-4 qui sont soumis \u00e0 une autorisation administrative autre qu'une autorisation d'urbanisme, par le service charg\u00e9 de recevoir la demande d'autorisation ; celui-ci adresse au pr\u00e9fet de r\u00e9gion une copie du dossier de cette demande ;\r\n\r\n5\u00b0 Pour les am\u00e9nagements et ouvrages mentionn\u00e9s au 5\u00b0 de l'article R. 523-4 qui ne sont pas soumis \u00e0 une autorisation administrative, par l'am\u00e9nageur ; celui-ci adresse au pr\u00e9fet de r\u00e9gion un dossier d\u00e9crivant les travaux projet\u00e9s, notamment leur emplacement pr\u00e9vu sur le terrain d'assiette, leur superficie, leur impact sur le sous-sol et indiquant la date \u00e0 laquelle ils ont \u00e9t\u00e9 arr\u00eat\u00e9s.", - "available": true, - "txt_idx": "Article_8", - "delay": 21, - "label": "SAISINE simple (Article R523-9)" - } - }, - { - "pk": 8, - "model": "archaeological_files.saisinetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "HM_works", - "delay": 21, - "label": "Travaux sur monuments historiques class\u00e9s (R. 523-10)" - } - }, - { - "pk": 1, - "model": "archaeological_files.filetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "preventive", - "label": "Arch\u00e9ologie pr\u00e9ventive" - } - }, - { - "pk": 2, - "model": "archaeological_files.filetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "prog", - "label": "Arch\u00e9ologie programm\u00e9e" - } - }, - { - "pk": 3, - "model": "archaeological_files.filetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "undefined", - "label": "Non pr\u00e9cis\u00e9" - } - }, - { - "pk": 13, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "AUT", - "label": "Autorisation" - } - }, - { - "pk": 18, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "AL", - "label": "Autorisation de lotir" - } - }, - { - "pk": 15, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "AT", - "label": "Autorisation de travaux" - } - }, - { - "pk": 11, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "O", - "label": "Autre" - } - }, - { - "pk": 9, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "CU", - "label": "Certificat d'urbanisme" - } - }, - { - "pk": 6, - "model": "archaeological_files.permittype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "DP", - "label": "D\u00e9claration pr\u00e9alable" - } - }, - { - "pk": 17, - "model": "archaeological_files.permittype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "DF", - "label": "D\u00e9couverte fortuite" - } - }, - { - "pk": 19, - "model": "archaeological_files.permittype", - "fields": { - "comment": "Saisine suite \u00e0 une demande de travaux MH :\r\nArticle R523-10 \r\n\r\nPour les travaux sur les monuments historiques class\u00e9s mentionn\u00e9s au 6\u00b0 de l'article R. 523-4, la saisine du pr\u00e9fet de r\u00e9gion au titre de l'autorisation exig\u00e9e par l'article L. 621-9 vaut saisine au titre du pr\u00e9sent chapitre", - "available": true, - "txt_idx": "MH", - "label": "Demande d'autorisation de travaux sur un immeuble class\u00e9 au titre des monuments historiques" - } - }, - { - "pk": 3, - "model": "archaeological_files.permittype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "zac", - "label": "Dossier de r\u00e9alisation de ZAC" - } - }, - { - "pk": 10, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "EI", - "label": "\u00c9tude d'impact" - } - }, - { - "pk": 16, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "EMH", - "label": "\u00c9tude pr\u00e9alable MH" - } - }, - { - "pk": 12, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "IC", - "label": "Installation class\u00e9e" - } - }, - { - "pk": 7, - "model": "archaeological_files.permittype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "NP", - "label": "Non pr\u00e9cis\u00e9" - } - }, - { - "pk": 2, - "model": "archaeological_files.permittype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "PA", - "label": "Permis d'am\u00e9nager" - } - }, - { - "pk": 14, - "model": "archaeological_files.permittype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "PC", - "label": "Permis de construire" - } - }, - { - "pk": 8, - "model": "archaeological_files.permittype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "PD", - "label": "Permis de d\u00e9molir" - } +{ + "model": "archaeological_files.saisinetype", + "fields": { + "label": "SAISINE simple (Article R523-9)", + "txt_idx": "Article_8", + "comment": "Dans les cas mentionn\u00e9s aux 1\u00b0 \u00e0 5\u00b0 de l'article R. 523-4, le pr\u00e9fet de r\u00e9gion est saisi :\r\n\r\n1\u00b0 Pour les permis de construire, les permis d'am\u00e9nager et les permis de d\u00e9molir, par le pr\u00e9fet de d\u00e9partement ; celui-ci adresse au pr\u00e9fet de r\u00e9gion, d\u00e8s qu'il a re\u00e7u les \u00e9l\u00e9ments transmis par le maire en application des articles R. 423-7 \u00e0 R. 423-9 du code de l'urbanisme, les pi\u00e8ces compl\u00e9mentaires pr\u00e9vues par les arr\u00eat\u00e9s mentionn\u00e9s au dernier alin\u00e9a de l'article R. 423-2 du m\u00eame code faisant notamment appara\u00eetre l'emplacement pr\u00e9vu des travaux sur le terrain d'assiette, leur superficie, leur impact sur le sous-sol ;\r\n\r\n2\u00b0 Pour les zones d'am\u00e9nagement concert\u00e9, par la personne publique ayant pris l'initiative de la cr\u00e9ation de la zone ; celle-ci adresse au pr\u00e9fet de r\u00e9gion le dossier de r\u00e9alisation approuv\u00e9, pr\u00e9vu \u00e0 l'article R. 311-7 du code de l'urbanisme ;\r\n3\u00b0 Pour les travaux \u00e9num\u00e9r\u00e9s \u00e0 l'article R. 523-5, par le propri\u00e9taire du terrain et, s'il n'assure pas lui-m\u00eame la r\u00e9alisation des travaux, par la personne charg\u00e9e de celle-ci. Le dossier de d\u00e9claration adress\u00e9 au pr\u00e9fet de r\u00e9gion comporte un plan parcellaire, les r\u00e9f\u00e9rences cadastrales, la ou les surfaces int\u00e9ress\u00e9es, le descriptif des travaux, leur destination et leur emplacement sur le terrain d'assiette de l'op\u00e9ration ainsi qu'une notice pr\u00e9cisant les modalit\u00e9s techniques envisag\u00e9es pour leur ex\u00e9cution et leur impact sur le sous-sol ;\r\n\r\n4\u00b0 Pour les am\u00e9nagements et ouvrages mentionn\u00e9s au 5\u00b0 de l'article R. 523-4 qui sont soumis \u00e0 une autorisation administrative autre qu'une autorisation d'urbanisme, par le service charg\u00e9 de recevoir la demande d'autorisation ; celui-ci adresse au pr\u00e9fet de r\u00e9gion une copie du dossier de cette demande ;\r\n\r\n5\u00b0 Pour les am\u00e9nagements et ouvrages mentionn\u00e9s au 5\u00b0 de l'article R. 523-4 qui ne sont pas soumis \u00e0 une autorisation administrative, par l'am\u00e9nageur ; celui-ci adresse au pr\u00e9fet de r\u00e9gion un dossier d\u00e9crivant les travaux projet\u00e9s, notamment leur emplacement pr\u00e9vu sur le terrain d'assiette, leur superficie, leur impact sur le sous-sol et indiquant la date \u00e0 laquelle ils ont \u00e9t\u00e9 arr\u00eat\u00e9s.", + "available": true, + "delay": 21 } -]
\ No newline at end of file +}, +{ + "model": "archaeological_files.saisinetype", + "fields": { + "label": "Demande d'AVIS (Art. R. 523-12 du code du patrimoine)", + "txt_idx": "Article_10", + "comment": "Les am\u00e9nageurs peuvent, avant de d\u00e9poser une demande pour obtenir les autorisations requises par les lois et r\u00e8glements ou avant d'engager toute autre proc\u00e9dure, saisir le pr\u00e9fet de r\u00e9gion afin qu'il examine si leur projet est susceptible de donner lieu \u00e0 des prescriptions arch\u00e9ologiques.\r\nA cette fin, ils produisent un dossier qui comporte un plan parcellaire et les r\u00e9f\u00e9rences cadastrales, le descriptif du projet et son emplacement sur le terrain d'assiette ainsi que, le cas \u00e9ch\u00e9ant, une notice pr\u00e9cisant les modalit\u00e9s techniques envisag\u00e9es pour l'ex\u00e9cution des travaux.\r\nSi le pr\u00e9fet de r\u00e9gion constate que le projet est susceptible d'affecter des \u00e9l\u00e9ments du patrimoine arch\u00e9ologique, il informe le demandeur, dans le d\u00e9lai de deux mois \u00e0 compter de la r\u00e9ception de la demande, que le projet qu'il lui a pr\u00e9sent\u00e9 donnera lieu \u00e0 des prescriptions arch\u00e9ologiques.", + "available": true, + "delay": 60 + } +}, +{ + "model": "archaeological_files.saisinetype", + "fields": { + "label": "Demande VOLONTAIRE (Article R523-14)", + "txt_idx": "Article_12", + "comment": " Si le pr\u00e9fet de r\u00e9gion a fait conna\u00eetre, en application de l'article R. 523-12, la n\u00e9cessit\u00e9 d'une op\u00e9ration arch\u00e9ologique, l'am\u00e9nageur peut le saisir d'une demande anticip\u00e9e de prescription.\r\n\r\nLe pr\u00e9fet de r\u00e9gion prescrit alors, dans les conditions pr\u00e9vues par le pr\u00e9sent chapitre, la r\u00e9alisation d'un diagnostic arch\u00e9ologique et, si des \u00e9l\u00e9ments du patrimoine arch\u00e9ologique pr\u00e9sents sur le site sont d\u00e9j\u00e0 connus, prend les autres mesures pr\u00e9vues \u00e0 l'article R. 523-15.\r\n\r\nLa redevance d'arch\u00e9ologie pr\u00e9ventive correspondante est due par le demandeur, conform\u00e9ment au dernier alin\u00e9a de l'article L. 524-4.", + "available": true, + "delay": 30 + } +}, +{ + "model": "archaeological_files.saisinetype", + "fields": { + "label": "Auto-saisine (n'existe plus, pour archives donc)", + "txt_idx": "Article_6", + "comment": "Article 6\r\n\r\n Lorsqu'il dispose d'informations lui indiquant qu'un projet qui ne lui est pas transmis en application de l'arr\u00eat\u00e9 mentionn\u00e9 \u00e0 l'article 5 est n\u00e9anmoins susceptible d'affecter des \u00e9l\u00e9ments du patrimoine arch\u00e9ologique, le pr\u00e9fet de r\u00e9gion peut demander au maire de lui communiquer au cours de l'instruction, selon le cas, le dossier de demande de permis de construire, de permis d'am\u00e9nager, de permis de d\u00e9molir ou le dossier de r\u00e9alisation de zone d'am\u00e9nagement concert\u00e9 qui correspond \u00e0 ce projet.\r\n\r\nIl peut, pour le m\u00eame motif, demander au maire de lui communiquer le dossier d'une d\u00e9claration pr\u00e9alable d\u00e9pos\u00e9e en application de l'article L. 421-4 du code de l'urbanisme.", + "available": true, + "delay": 30 + } +}, +{ + "model": "archaeological_files.saisinetype", + "fields": { + "label": "Demande de r\u00e9alisation d'une TRANCHE (suite \u00e0 un arr\u00eat\u00e9 initial, Article R523-21)", + "txt_idx": "partial_demand", + "comment": "Lorsque des op\u00e9rations sont r\u00e9alis\u00e9es par tranches successives, le calendrier pr\u00e9visionnel de leur r\u00e9alisation est communiqu\u00e9 au pr\u00e9fet de r\u00e9gion qui peut d\u00e9cider de prescrire les mesures pr\u00e9vues \u00e0 l'article R. 523-15 soit pour la totalit\u00e9 du projet, soit lors de l'ex\u00e9cution de chaque tranche. Dans ce dernier cas, il d\u00e9finit par arr\u00eat\u00e9 les d\u00e9lais de sa saisine et la nature des documents \u00e0 fournir.\r\nLes op\u00e9rations de diagnostic sont toutefois conduites pour l'ensemble du projet si la personne qui r\u00e9alise ce projet en fait la demande.", + "available": true, + "delay": 30 + } +}, +{ + "model": "archaeological_files.saisinetype", + "fields": { + "label": "Demande d'INFO (CU compris)", + "txt_idx": "information_query", + "comment": "", + "available": true, + "delay": 30 + } +}, +{ + "model": "archaeological_files.saisinetype", + "fields": { + "label": "Travaux sur monuments historiques class\u00e9s (R. 523-10)", + "txt_idx": "HM_works", + "comment": "", + "available": true, + "delay": 21 + } +}, +{ + "model": "archaeological_files.saisinetype", + "fields": { + "label": "\u00c9tude d'impact (EI)", + "txt_idx": "impact_study", + "comment": "", + "available": true, + "delay": 60 + } +}, +{ + "model": "archaeological_files.filetype", + "fields": { + "label": "Arch\u00e9ologie pr\u00e9ventive", + "txt_idx": "preventive", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.filetype", + "fields": { + "label": "Arch\u00e9ologie programm\u00e9e", + "txt_idx": "prog", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.filetype", + "fields": { + "label": "Non pr\u00e9cis\u00e9", + "txt_idx": "undefined", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Permis d'am\u00e9nager", + "txt_idx": "PA", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Dossier de r\u00e9alisation de ZAC", + "txt_idx": "zac", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "D\u00e9claration pr\u00e9alable", + "txt_idx": "DP", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Non pr\u00e9cis\u00e9", + "txt_idx": "NP", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Permis de d\u00e9molir", + "txt_idx": "PD", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Certificat d'urbanisme", + "txt_idx": "CU", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "\u00c9tude d'impact", + "txt_idx": "EI", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Autre", + "txt_idx": "O", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Installation class\u00e9e", + "txt_idx": "IC", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Autorisation", + "txt_idx": "AUT", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Permis de construire", + "txt_idx": "PC", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Autorisation de travaux", + "txt_idx": "AT", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "\u00c9tude pr\u00e9alable MH", + "txt_idx": "EMH", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "D\u00e9couverte fortuite", + "txt_idx": "DF", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Autorisation de lotir", + "txt_idx": "AL", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_files.permittype", + "fields": { + "label": "Demande d'autorisation de travaux sur un immeuble class\u00e9 au titre des monuments historiques", + "txt_idx": "MH", + "comment": "Saisine suite \u00e0 une demande de travaux MH :\r\nArticle R523-10 \r\n\r\nPour les travaux sur les monuments historiques class\u00e9s mentionn\u00e9s au 6\u00b0 de l'article R. 523-4, la saisine du pr\u00e9fet de r\u00e9gion au titre de l'autorisation exig\u00e9e par l'article L. 621-9 vaut saisine au titre du pr\u00e9sent chapitre", + "available": true + } +} +] diff --git a/archaeological_files/lookups.py b/archaeological_files/lookups.py new file mode 100644 index 000000000..90b904945 --- /dev/null +++ b/archaeological_files/lookups.py @@ -0,0 +1,21 @@ +from ajax_select import register, LookupChannel + +from django.db.models import Q +from archaeological_files.models import File + + +@register('file') +class FileLookup(LookupChannel): + model = File + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(cached_label__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by('cached_label')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.cached_label diff --git a/archaeological_files/migrations/0001_initial.py b/archaeological_files/migrations/0001_initial.py index b69998442..878be3902 100644 --- a/archaeological_files/migrations/0001_initial.py +++ b/archaeological_files/migrations/0001_initial.py @@ -1,348 +1,159 @@ # -*- 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 'FileType' - db.create_table('archaeological_files_filetype', ( - ('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('archaeological_files', ['FileType']) - - # Adding model 'PermitType' - db.create_table('archaeological_files_permittype', ( - ('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('archaeological_files', ['PermitType']) - - # Adding model 'SaisineType' - db.create_table('archaeological_files_saisinetype', ( - ('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)), - ('delay', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('archaeological_files', ['SaisineType']) - - # Adding model 'HistoricalFile' - db.create_table('archaeological_files_historicalfile', ( - ('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)), - ('year', self.gf('django.db.models.fields.IntegerField')(default=2012)), - ('numeric_reference', self.gf('django.db.models.fields.IntegerField')()), - ('internal_reference', self.gf('django.db.models.fields.CharField')(max_length=60, db_index=True)), - ('file_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('in_charge_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('general_contractor_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('town_planning_service_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('permit_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('permit_reference', self.gf('django.db.models.fields.CharField')(max_length=60, null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('creation_date', self.gf('django.db.models.fields.DateField')(default=datetime.date.today)), - ('reception_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('related_file_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('saisine_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('reference_number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('total_surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('total_developed_surface', self.gf('django.db.models.fields.IntegerField')(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)), - ('comment', self.gf('django.db.models.fields.TextField')(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('archaeological_files', ['HistoricalFile']) - - # Adding model 'File' - db.create_table('archaeological_files_file', ( - ('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'])), - ('year', self.gf('django.db.models.fields.IntegerField')(default=2012)), - ('numeric_reference', self.gf('django.db.models.fields.IntegerField')()), - ('internal_reference', self.gf('django.db.models.fields.CharField')(unique=True, max_length=60)), - ('file_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_files.FileType'])), - ('in_charge', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['ishtar_common.Person'])), - ('general_contractor', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), - ('town_planning_service', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Organization'])), - ('permit_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_files.PermitType'], null=True, blank=True)), - ('permit_reference', self.gf('django.db.models.fields.CharField')(max_length=60, null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('creation_date', self.gf('django.db.models.fields.DateField')(default=datetime.date.today)), - ('reception_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('related_file', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_files.File'], null=True, blank=True)), - ('saisine_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_files.SaisineType'], null=True, blank=True)), - ('reference_number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('total_surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('total_developed_surface', self.gf('django.db.models.fields.IntegerField')(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)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('archaeological_files', ['File']) - - # Adding M2M table for field towns on 'File' - db.create_table('archaeological_files_file_towns', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('file', models.ForeignKey(orm['archaeological_files.file'], null=False)), - ('town', models.ForeignKey(orm['ishtar_common.town'], null=False)) - )) - db.create_unique('archaeological_files_file_towns', ['file_id', 'town_id']) - +from __future__ import unicode_literals - def backwards(self, orm): - # Deleting model 'FileType' - db.delete_table('archaeological_files_filetype') - - # Deleting model 'PermitType' - db.delete_table('archaeological_files_permittype') - - # Deleting model 'SaisineType' - db.delete_table('archaeological_files_saisinetype') - - # Deleting model 'HistoricalFile' - db.delete_table('archaeological_files_historicalfile') - - # Deleting model 'File' - db.delete_table('archaeological_files_file') - - # Removing M2M table for field towns on 'File' - db.delete_table('archaeological_files_file_towns') - - - models = { - 'archaeological_files.file': { - 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), - 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) - }, - 'archaeological_files.filebydepartment': { - 'Meta': {'object_name': 'FileByDepartment', 'db_table': "'file_department'", 'managed': 'False'}, - 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'object_name': 'FileType'}, - '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'}) - }, - 'archaeological_files.historicalfile': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalFile'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'file_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'general_contractor_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'}), - 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'db_index': 'True'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), - 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'permit_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'related_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'saisine_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'town_planning_service_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'object_name': 'PermitType'}, - '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'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {}), - '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'}) - }, - '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.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.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.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 = ['archaeological_files']
\ No newline at end of file +from django.db import models, migrations +import datetime +import archaeological_operations.models +import ishtar_common.utils +import ishtar_common.models +import re +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='FileByDepartment', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + 'db_table': 'file_department', + 'managed': False, + }, + ), + migrations.CreateModel( + name='File', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('year', models.IntegerField(default=ishtar_common.utils.get_current_year, verbose_name='Year')), + ('numeric_reference', models.IntegerField(null=True, verbose_name='Numeric reference', blank=True)), + ('internal_reference', models.CharField(max_length=60, null=True, verbose_name='Internal reference', blank=True)), + ('external_id', models.CharField(max_length=120, null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('name', models.TextField(null=True, verbose_name='Name', blank=True)), + ('raw_general_contractor', models.CharField(max_length=200, null=True, verbose_name='General contractor (raw)', blank=True)), + ('raw_town_planning_service', models.CharField(max_length=200, null=True, verbose_name='Planning service (raw)', blank=True)), + ('permit_reference', models.TextField(null=True, verbose_name='Permit reference', blank=True)), + ('end_date', models.DateField(null=True, verbose_name='Closing date', blank=True)), + ('creation_date', models.DateField(default=datetime.date.today, null=True, verbose_name='Creation date', blank=True)), + ('reception_date', models.DateField(null=True, verbose_name='Reception date', blank=True)), + ('instruction_deadline', models.DateField(null=True, verbose_name='Instruction deadline', blank=True)), + ('total_surface', models.FloatField(null=True, verbose_name='Total surface (m2)', blank=True)), + ('total_developed_surface', models.FloatField(null=True, verbose_name='Total developed surface (m2)', blank=True)), + ('locality', models.CharField(max_length=100, null=True, verbose_name='Locality', blank=True)), + ('address', models.TextField(null=True, verbose_name='Main address', blank=True)), + ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Main address - postal code', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('research_comment', models.TextField(null=True, verbose_name='Research archaeology comment', blank=True)), + ('classified_area', models.NullBooleanField(verbose_name='Classified area')), + ('protected_area', models.NullBooleanField(verbose_name='Protected area')), + ('cira_advised', models.NullBooleanField(verbose_name='Passage en CIRA')), + ('mh_register', models.NullBooleanField(verbose_name='Sur Monument Historique class\xe9')), + ('mh_listing', models.NullBooleanField(verbose_name='Sur Monument Historique inscrit')), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', blank=True)), + ('imported_line', models.TextField(null=True, verbose_name='Imported line', blank=True)), + ], + options={ + 'ordering': ('cached_label',), + 'verbose_name': 'Archaeological file', + 'verbose_name_plural': 'Archaeological files', + 'permissions': (('view_file', 'Peut voir tous les Dossiers'), ('view_own_file', 'Peut voir son propre Dossier'), ('add_own_file', 'Peut ajouter son propre Dossier'), ('change_own_file', 'Peut modifier son propre Dossier'), ('delete_own_file', 'Peut supprimer son propre Dossier'), ('close_file', 'Peut clore un Dossier')), + }, + bases=(archaeological_operations.models.ClosedItem, models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter, ishtar_common.models.ShortMenuItem, ishtar_common.models.DashboardFormItem), + ), + migrations.CreateModel( + name='FileType', + 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': 'Archaeological file type', + 'verbose_name_plural': 'Archaeological file types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='HistoricalFile', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('year', models.IntegerField(default=ishtar_common.utils.get_current_year, verbose_name='Year')), + ('numeric_reference', models.IntegerField(null=True, verbose_name='Numeric reference', blank=True)), + ('internal_reference', models.CharField(max_length=60, null=True, verbose_name='Internal reference', blank=True)), + ('external_id', models.CharField(max_length=120, null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('name', models.TextField(null=True, verbose_name='Name', blank=True)), + ('raw_general_contractor', models.CharField(max_length=200, null=True, verbose_name='General contractor (raw)', blank=True)), + ('raw_town_planning_service', models.CharField(max_length=200, null=True, verbose_name='Planning service (raw)', blank=True)), + ('permit_reference', models.TextField(null=True, verbose_name='Permit reference', blank=True)), + ('end_date', models.DateField(null=True, verbose_name='Closing date', blank=True)), + ('creation_date', models.DateField(default=datetime.date.today, null=True, verbose_name='Creation date', blank=True)), + ('reception_date', models.DateField(null=True, verbose_name='Reception date', blank=True)), + ('instruction_deadline', models.DateField(null=True, verbose_name='Instruction deadline', blank=True)), + ('total_surface', models.FloatField(null=True, verbose_name='Total surface (m2)', blank=True)), + ('total_developed_surface', models.FloatField(null=True, verbose_name='Total developed surface (m2)', blank=True)), + ('locality', models.CharField(max_length=100, null=True, verbose_name='Locality', blank=True)), + ('address', models.TextField(null=True, verbose_name='Main address', blank=True)), + ('postal_code', models.CharField(max_length=10, null=True, verbose_name='Main address - postal code', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('research_comment', models.TextField(null=True, verbose_name='Research archaeology comment', blank=True)), + ('classified_area', models.NullBooleanField(verbose_name='Classified area')), + ('protected_area', models.NullBooleanField(verbose_name='Protected area')), + ('cira_advised', models.NullBooleanField(verbose_name='Passage en CIRA')), + ('mh_register', models.NullBooleanField(verbose_name='Sur Monument Historique class\xe9')), + ('mh_listing', models.NullBooleanField(verbose_name='Sur Monument Historique inscrit')), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', blank=True)), + ('imported_line', models.TextField(null=True, verbose_name='Imported line', 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 Archaeological file', + }, + ), + migrations.CreateModel( + name='PermitType', + 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': 'Permit type', + 'verbose_name_plural': 'Permit types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='SaisineType', + 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')), + ('delay', models.IntegerField(default=30, verbose_name='Delay (in days)')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Type de saisine', + 'verbose_name_plural': 'Types de saisine', + }, + bases=(ishtar_common.models.Cached, models.Model, ishtar_common.models.ValueGetter), + ), + ] diff --git a/archaeological_files/migrations/0002_auto_20170414_2123.py b/archaeological_files/migrations/0002_auto_20170414_2123.py new file mode 100644 index 000000000..a8c8d7075 --- /dev/null +++ b/archaeological_files/migrations/0002_auto_20170414_2123.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_files', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('ishtar_common', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='historicalfile', + name='corporation_general_contractor', + 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='historicalfile', + name='file_type', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_files.FileType', null=True), + ), + migrations.AddField( + model_name='historicalfile', + name='general_contractor', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicalfile', + 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='historicalfile', + 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='historicalfile', + 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='historicalfile', + name='in_charge', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicalfile', + name='main_town', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Town', null=True), + ), + migrations.AddField( + model_name='historicalfile', + name='organization', + 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='historicalfile', + name='permit_type', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_files.PermitType', null=True), + ), + migrations.AddField( + model_name='historicalfile', + name='planning_service', + 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='historicalfile', + name='related_file', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_files.File', null=True), + ), + migrations.AddField( + model_name='historicalfile', + name='requested_operation_type', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.OperationType', null=True), + ), + migrations.AddField( + model_name='historicalfile', + name='responsible_town_planning_service', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicalfile', + name='saisine_type', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_files.SaisineType', null=True), + ), + migrations.AddField( + model_name='historicalfile', + name='scientist', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='file', + name='corporation_general_contractor', + field=models.ForeignKey(related_name='general_contractor_files', on_delete=django.db.models.deletion.SET_NULL, verbose_name='General contractor organization', blank=True, to='ishtar_common.Organization', null=True), + ), + migrations.AddField( + model_name='file', + name='departments', + field=models.ManyToManyField(to='ishtar_common.Department', verbose_name='Departments', blank=True), + ), + migrations.AddField( + model_name='file', + name='file_type', + field=models.ForeignKey(verbose_name='File type', to='archaeological_files.FileType'), + ), + migrations.AddField( + model_name='file', + name='general_contractor', + field=models.ForeignKey(related_name='general_contractor_files', on_delete=django.db.models.deletion.SET_NULL, verbose_name='General contractor', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='file', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='file', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='file', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_files_file', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='file', + name='in_charge', + field=models.ForeignKey(related_name='file_responsability', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Person in charge', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='file', + name='main_town', + field=models.ForeignKey(related_name='file_main', verbose_name='Town', blank=True, to='ishtar_common.Town', null=True), + ), + migrations.AddField( + model_name='file', + name='organization', + field=models.ForeignKey(related_name='files', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Organization', blank=True, to='ishtar_common.Organization', null=True), + ), + migrations.AddField( + model_name='file', + name='permit_type', + field=models.ForeignKey(verbose_name='Permit type', blank=True, to='archaeological_files.PermitType', null=True), + ), + migrations.AddField( + model_name='file', + name='planning_service', + field=models.ForeignKey(related_name='planning_service_files', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Planning service organization', blank=True, to='ishtar_common.Organization', null=True), + ), + migrations.AddField( + model_name='file', + name='related_file', + field=models.ForeignKey(verbose_name='Related file', blank=True, to='archaeological_files.File', null=True), + ), + migrations.AddField( + model_name='file', + name='requested_operation_type', + field=models.ForeignKey(related_name='+', verbose_name='Requested operation type', blank=True, to='ishtar_common.OperationType', null=True), + ), + migrations.AddField( + model_name='file', + name='responsible_town_planning_service', + field=models.ForeignKey(related_name='responsible_town_planning_service_files', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Responsible for planning service', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='file', + name='saisine_type', + field=models.ForeignKey(verbose_name='Type de saisine', blank=True, to='archaeological_files.SaisineType', null=True), + ), + migrations.AddField( + model_name='file', + name='scientist', + field=models.ForeignKey(related_name='scientist', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Scientist in charge', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='file', + name='towns', + field=models.ManyToManyField(related_name='file', verbose_name='Towns', to='ishtar_common.Town'), + ), + ] diff --git a/archaeological_files/migrations/0003_views.py b/archaeological_files/migrations/0003_views.py new file mode 100644 index 000000000..5e3d891ad --- /dev/null +++ b/archaeological_files/migrations/0003_views.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from archaeological_files.models import FileByDepartment + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_files', '0002_auto_20170414_2123'), + ] + + operations = [ + migrations.RunSQL(FileByDepartment.CREATE_SQL) + ] diff --git a/archaeological_files/migrations/0004_auto_20170802_1557.py b/archaeological_files/migrations/0004_auto_20170802_1557.py new file mode 100644 index 000000000..bffd44099 --- /dev/null +++ b/archaeological_files/migrations/0004_auto_20170802_1557.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_files', '0003_views'), + ] + + operations = [ + migrations.AlterModelOptions( + name='file', + options={'ordering': ('cached_label',), 'verbose_name': 'Archaeological file', 'verbose_name_plural': 'Archaeological files', 'permissions': (('view_file', 'Can view all Archaeological files'), ('view_own_file', 'Can view own Archaeological file'), ('add_own_file', 'Can add own Archaeological file'), ('change_own_file', 'Can change own Archaeological file'), ('delete_own_file', 'Can delete own Archaeological file'), ('close_file', 'Can close File'))}, + ), + ] diff --git a/archaeological_files/migrations/0005_auto_20170804_1741.py b/archaeological_files/migrations/0005_auto_20170804_1741.py new file mode 100644 index 000000000..223528cc1 --- /dev/null +++ b/archaeological_files/migrations/0005_auto_20170804_1741.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_files', '0004_auto_20170802_1557'), + ] + + operations = [ + migrations.AlterField( + model_name='file', + name='main_town', + field=models.ForeignKey(related_name='file_main', verbose_name='Main town', blank=True, to='ishtar_common.Town', null=True), + ), + migrations.AlterField( + model_name='file', + name='towns', + field=models.ManyToManyField(related_name='file', verbose_name='Towns', to='ishtar_common.Town', blank=True), + ), + ] diff --git a/archaeological_files/migrations/0006_auto_20170804_2024.py b/archaeological_files/migrations/0006_auto_20170804_2024.py new file mode 100644 index 000000000..a74700d3c --- /dev/null +++ b/archaeological_files/migrations/0006_auto_20170804_2024.py @@ -0,0 +1,31 @@ +# -*- 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 = [ + ('archaeological_files', '0005_auto_20170804_1741'), + ] + + operations = [ + migrations.AlterField( + model_name='filetype', + 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='permittype', + 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='saisinetype', + 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/archaeological_files/migrations/0007_auto_20170826_1152.py b/archaeological_files/migrations/0007_auto_20170826_1152.py new file mode 100644 index 000000000..be06c16e5 --- /dev/null +++ b/archaeological_files/migrations/0007_auto_20170826_1152.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-26 11:52 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_files', '0006_auto_20170804_2024'), + ] + + operations = [ + migrations.AlterField( + model_name='filetype', + 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='permittype', + 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='saisinetype', + 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/archaeological_files/models.py b/archaeological_files/models.py index 195418bc8..0d5b4b3e8 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -26,7 +26,8 @@ from django.db.models import Q, Count, Sum from django.db.models.signals import post_save, m2m_changed, post_delete from django.utils.translation import ugettext_lazy as _, ugettext -from ishtar_common.utils import cached_label_changed, get_cache +from ishtar_common.utils import cached_label_changed, get_cache, \ + get_current_year from ishtar_common.models import GeneralType, BaseHistorizedItem, \ HistoricalRecords, OwnPerms, Person, Organization, Department, Town, \ @@ -105,8 +106,7 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, } # fields - year = models.IntegerField(_(u"Year"), - default=lambda: datetime.datetime.now().year) + year = models.IntegerField(_(u"Year"), default=get_current_year) numeric_reference = models.IntegerField( _(u"Numeric reference"), blank=True, null=True) internal_reference = models.CharField(_(u"Internal reference"), blank=True, @@ -151,10 +151,10 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, permit_reference = models.TextField(_(u"Permit reference"), blank=True, null=True) end_date = models.DateField(_(u"Closing date"), null=True, blank=True) - main_town = models.ForeignKey(Town, verbose_name=_(u"Town"), null=True, + main_town = models.ForeignKey(Town, verbose_name=_(u"Main town"), null=True, blank=True, related_name='file_main') towns = models.ManyToManyField(Town, verbose_name=_(u"Towns"), - related_name='file') + related_name='file', blank=True) creation_date = models.DateField( _(u"Creation date"), default=datetime.date.today, blank=True, null=True) @@ -180,7 +180,7 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, comment = models.TextField(_(u"Comment"), null=True, blank=True) # research archaeology --> departments = models.ManyToManyField( - Department, verbose_name=_(u"Departments"), null=True, blank=True) + Department, verbose_name=_(u"Departments"), blank=True) requested_operation_type = models.ForeignKey( OperationType, related_name='+', null=True, blank=True, verbose_name=_(u"Requested operation type")) @@ -220,14 +220,12 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, verbose_name = _(u"Archaeological file") verbose_name_plural = _(u"Archaeological files") permissions = ( - ("view_file", ugettext(u"Can view all Archaeological files")), - ("view_own_file", ugettext(u"Can view own Archaeological file")), - ("add_own_file", ugettext(u"Can add own Archaeological file")), - ("change_own_file", - ugettext(u"Can change own Archaeological file")), - ("delete_own_file", - ugettext(u"Can delete own Archaeological file")), - ("close_file", ugettext(u"Can close File")), + ("view_file", u"Can view all Archaeological files"), + ("view_own_file", u"Can view own Archaeological file"), + ("add_own_file", u"Can add own Archaeological file"), + ("change_own_file", u"Can change own Archaeological file"), + ("delete_own_file", u"Can delete own Archaeological file"), + ("close_file", u"Can close File"), ) ordering = ('cached_label',) @@ -430,9 +428,9 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, return self.towns.all()[0].numero_insee[:2] @classmethod - def get_query_owns(cls, user): - return (Q(history_creator=user) | - Q(in_charge__ishtaruser=user.ishtaruser)) \ + def get_query_owns(cls, ishtaruser): + return (Q(history_creator=ishtaruser.user_ptr) | + Q(in_charge__ishtaruser=ishtaruser)) \ & Q(end_date__isnull=True) def is_active(self): @@ -554,6 +552,19 @@ class FileByDepartment(models.Model): """ Database view for dashboard """ + CREATE_SQL = """ + CREATE VIEW file_department (id, department_id, file_id) as + select town."id", town."departement_id", file_towns."file_id" + from ishtar_common_town town + inner join archaeological_files_file_towns file_towns + on file_towns."town_id"=town."id" + order by town."departement_id"; + CREATE RULE file_department_delete + AS ON DELETE TO file_department DO INSTEAD(); + """ + DELETE_SQL = """ + DROP VIEW file_department; + """ file = models.ForeignKey(File, verbose_name=_(u"File")) department = models.ForeignKey(Department, verbose_name=_(u"Department"), blank=True, null=True) diff --git a/archaeological_files/old_migrations/0001_initial.py b/archaeological_files/old_migrations/0001_initial.py new file mode 100644 index 000000000..b69998442 --- /dev/null +++ b/archaeological_files/old_migrations/0001_initial.py @@ -0,0 +1,348 @@ +# -*- 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 'FileType' + db.create_table('archaeological_files_filetype', ( + ('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('archaeological_files', ['FileType']) + + # Adding model 'PermitType' + db.create_table('archaeological_files_permittype', ( + ('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('archaeological_files', ['PermitType']) + + # Adding model 'SaisineType' + db.create_table('archaeological_files_saisinetype', ( + ('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)), + ('delay', self.gf('django.db.models.fields.IntegerField')()), + )) + db.send_create_signal('archaeological_files', ['SaisineType']) + + # Adding model 'HistoricalFile' + db.create_table('archaeological_files_historicalfile', ( + ('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)), + ('year', self.gf('django.db.models.fields.IntegerField')(default=2012)), + ('numeric_reference', self.gf('django.db.models.fields.IntegerField')()), + ('internal_reference', self.gf('django.db.models.fields.CharField')(max_length=60, db_index=True)), + ('file_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('in_charge_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('general_contractor_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('town_planning_service_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('permit_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('permit_reference', self.gf('django.db.models.fields.CharField')(max_length=60, null=True, blank=True)), + ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('creation_date', self.gf('django.db.models.fields.DateField')(default=datetime.date.today)), + ('reception_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('related_file_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('saisine_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('reference_number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('total_surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('total_developed_surface', self.gf('django.db.models.fields.IntegerField')(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)), + ('comment', self.gf('django.db.models.fields.TextField')(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('archaeological_files', ['HistoricalFile']) + + # Adding model 'File' + db.create_table('archaeological_files_file', ( + ('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'])), + ('year', self.gf('django.db.models.fields.IntegerField')(default=2012)), + ('numeric_reference', self.gf('django.db.models.fields.IntegerField')()), + ('internal_reference', self.gf('django.db.models.fields.CharField')(unique=True, max_length=60)), + ('file_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_files.FileType'])), + ('in_charge', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['ishtar_common.Person'])), + ('general_contractor', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), + ('town_planning_service', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Organization'])), + ('permit_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_files.PermitType'], null=True, blank=True)), + ('permit_reference', self.gf('django.db.models.fields.CharField')(max_length=60, null=True, blank=True)), + ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('creation_date', self.gf('django.db.models.fields.DateField')(default=datetime.date.today)), + ('reception_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('related_file', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_files.File'], null=True, blank=True)), + ('saisine_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_files.SaisineType'], null=True, blank=True)), + ('reference_number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('total_surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('total_developed_surface', self.gf('django.db.models.fields.IntegerField')(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)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + )) + db.send_create_signal('archaeological_files', ['File']) + + # Adding M2M table for field towns on 'File' + db.create_table('archaeological_files_file_towns', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('file', models.ForeignKey(orm['archaeological_files.file'], null=False)), + ('town', models.ForeignKey(orm['ishtar_common.town'], null=False)) + )) + db.create_unique('archaeological_files_file_towns', ['file_id', 'town_id']) + + + def backwards(self, orm): + # Deleting model 'FileType' + db.delete_table('archaeological_files_filetype') + + # Deleting model 'PermitType' + db.delete_table('archaeological_files_permittype') + + # Deleting model 'SaisineType' + db.delete_table('archaeological_files_saisinetype') + + # Deleting model 'HistoricalFile' + db.delete_table('archaeological_files_historicalfile') + + # Deleting model 'File' + db.delete_table('archaeological_files_file') + + # Removing M2M table for field towns on 'File' + db.delete_table('archaeological_files_file_towns') + + + models = { + 'archaeological_files.file': { + 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), + 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), + 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), + 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), + 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), + 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), + 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) + }, + 'archaeological_files.filebydepartment': { + 'Meta': {'object_name': 'FileByDepartment', 'db_table': "'file_department'", 'managed': 'False'}, + 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), + 'file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + 'archaeological_files.filetype': { + 'Meta': {'object_name': 'FileType'}, + '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'}) + }, + 'archaeological_files.historicalfile': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalFile'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'file_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'general_contractor_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'}), + 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'db_index': 'True'}), + 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), + 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), + 'permit_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'related_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'saisine_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'town_planning_service_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) + }, + 'archaeological_files.permittype': { + 'Meta': {'object_name': 'PermitType'}, + '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'}) + }, + 'archaeological_files.saisinetype': { + 'Meta': {'object_name': 'SaisineType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'delay': ('django.db.models.fields.IntegerField', [], {}), + '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'}) + }, + '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.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.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.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 = ['archaeological_files']
\ No newline at end of file diff --git a/archaeological_files/migrations/0002_views.py b/archaeological_files/old_migrations/0002_views.py index dfbb466ec..dfbb466ec 100644 --- a/archaeological_files/migrations/0002_views.py +++ b/archaeological_files/old_migrations/0002_views.py diff --git a/archaeological_files/migrations/0003_auto__add_field_file_name__add_field_historicalfile_name.py b/archaeological_files/old_migrations/0003_auto__add_field_file_name__add_field_historicalfile_name.py index 9dd744073..9dd744073 100644 --- a/archaeological_files/migrations/0003_auto__add_field_file_name__add_field_historicalfile_name.py +++ b/archaeological_files/old_migrations/0003_auto__add_field_file_name__add_field_historicalfile_name.py diff --git a/archaeological_files/migrations/0004_auto__chg_field_file_numeric_reference__chg_field_historicalfile_numer.py b/archaeological_files/old_migrations/0004_auto__chg_field_file_numeric_reference__chg_field_historicalfile_numer.py index bcd4f7061..bcd4f7061 100644 --- a/archaeological_files/migrations/0004_auto__chg_field_file_numeric_reference__chg_field_historicalfile_numer.py +++ b/archaeological_files/old_migrations/0004_auto__chg_field_file_numeric_reference__chg_field_historicalfile_numer.py diff --git a/archaeological_files/migrations/0005_auto__chg_field_file_internal_reference__chg_field_historicalfile_inte.py b/archaeological_files/old_migrations/0005_auto__chg_field_file_internal_reference__chg_field_historicalfile_inte.py index 2a26cdc3e..2a26cdc3e 100644 --- a/archaeological_files/migrations/0005_auto__chg_field_file_internal_reference__chg_field_historicalfile_inte.py +++ b/archaeological_files/old_migrations/0005_auto__chg_field_file_internal_reference__chg_field_historicalfile_inte.py diff --git a/archaeological_files/migrations/0006_auto__chg_field_file_in_charge.py b/archaeological_files/old_migrations/0006_auto__chg_field_file_in_charge.py index 3c7ec0f50..3c7ec0f50 100644 --- a/archaeological_files/migrations/0006_auto__chg_field_file_in_charge.py +++ b/archaeological_files/old_migrations/0006_auto__chg_field_file_in_charge.py diff --git a/archaeological_files/migrations/0007_auto__add_field_file_cached_label__add_field_historicalfile_cached_lab.py b/archaeological_files/old_migrations/0007_auto__add_field_file_cached_label__add_field_historicalfile_cached_lab.py index 92e979bd4..92e979bd4 100644 --- a/archaeological_files/migrations/0007_auto__add_field_file_cached_label__add_field_historicalfile_cached_lab.py +++ b/archaeological_files/old_migrations/0007_auto__add_field_file_cached_label__add_field_historicalfile_cached_lab.py diff --git a/archaeological_files/migrations/0008_auto__chg_field_file_cached_label__chg_field_historicalfile_cached_lab.py b/archaeological_files/old_migrations/0008_auto__chg_field_file_cached_label__chg_field_historicalfile_cached_lab.py index 93fb7e01f..93fb7e01f 100644 --- a/archaeological_files/migrations/0008_auto__chg_field_file_cached_label__chg_field_historicalfile_cached_lab.py +++ b/archaeological_files/old_migrations/0008_auto__chg_field_file_cached_label__chg_field_historicalfile_cached_lab.py diff --git a/archaeological_files/migrations/0009_auto__add_field_file_responsible_town_planning_service__add_field_hist.py b/archaeological_files/old_migrations/0009_auto__add_field_file_responsible_town_planning_service__add_field_hist.py index 39d2b9267..39d2b9267 100644 --- a/archaeological_files/migrations/0009_auto__add_field_file_responsible_town_planning_service__add_field_hist.py +++ b/archaeological_files/old_migrations/0009_auto__add_field_file_responsible_town_planning_service__add_field_hist.py diff --git a/archaeological_files/migrations/0010_responsible_town_planning_service_transition.py b/archaeological_files/old_migrations/0010_responsible_town_planning_service_transition.py index 80771c562..80771c562 100644 --- a/archaeological_files/migrations/0010_responsible_town_planning_service_transition.py +++ b/archaeological_files/old_migrations/0010_responsible_town_planning_service_transition.py diff --git a/archaeological_files/migrations/0011_auto__del_field_file_town_planning_service__del_field_historicalfile_t.py b/archaeological_files/old_migrations/0011_auto__del_field_file_town_planning_service__del_field_historicalfile_t.py index fb2af402a..fb2af402a 100644 --- a/archaeological_files/migrations/0011_auto__del_field_file_town_planning_service__del_field_historicalfile_t.py +++ b/archaeological_files/old_migrations/0011_auto__del_field_file_town_planning_service__del_field_historicalfile_t.py diff --git a/archaeological_files/migrations/0012_auto__del_unique_file_internal_reference__add_unique_file_year_interna.py b/archaeological_files/old_migrations/0012_auto__del_unique_file_internal_reference__add_unique_file_year_interna.py index da1695457..da1695457 100644 --- a/archaeological_files/migrations/0012_auto__del_unique_file_internal_reference__add_unique_file_year_interna.py +++ b/archaeological_files/old_migrations/0012_auto__del_unique_file_internal_reference__add_unique_file_year_interna.py diff --git a/archaeological_files/migrations/0013_auto__del_unique_file_year_internal_reference.py b/archaeological_files/old_migrations/0013_auto__del_unique_file_year_internal_reference.py index 24df2cb2c..24df2cb2c 100644 --- a/archaeological_files/migrations/0013_auto__del_unique_file_year_internal_reference.py +++ b/archaeological_files/old_migrations/0013_auto__del_unique_file_year_internal_reference.py diff --git a/archaeological_files/migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py b/archaeological_files/old_migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py index aeb1faec1..aeb1faec1 100644 --- a/archaeological_files/migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py +++ b/archaeological_files/old_migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py diff --git a/archaeological_files/migrations/0015_auto__add_field_file_history_creator__add_field_historicalfile_history.py b/archaeological_files/old_migrations/0015_auto__add_field_file_history_creator__add_field_historicalfile_history.py index 3be3e48ac..3be3e48ac 100644 --- a/archaeological_files/migrations/0015_auto__add_field_file_history_creator__add_field_historicalfile_history.py +++ b/archaeological_files/old_migrations/0015_auto__add_field_file_history_creator__add_field_historicalfile_history.py diff --git a/archaeological_files/migrations/0016_init_history_creator.py b/archaeological_files/old_migrations/0016_init_history_creator.py index 32eef3c9c..32eef3c9c 100644 --- a/archaeological_files/migrations/0016_init_history_creator.py +++ b/archaeological_files/old_migrations/0016_init_history_creator.py diff --git a/archaeological_files/migrations/0017_reinit_history_creator.py b/archaeological_files/old_migrations/0017_reinit_history_creator.py index 003c6f25d..003c6f25d 100644 --- a/archaeological_files/migrations/0017_reinit_history_creator.py +++ b/archaeological_files/old_migrations/0017_reinit_history_creator.py diff --git a/archaeological_files/migrations/0018_auto__add_field_file_imported_line__chg_field_file_responsible_town_pl.py b/archaeological_files/old_migrations/0018_auto__add_field_file_imported_line__chg_field_file_responsible_town_pl.py index 4555145a3..4555145a3 100644 --- a/archaeological_files/migrations/0018_auto__add_field_file_imported_line__chg_field_file_responsible_town_pl.py +++ b/archaeological_files/old_migrations/0018_auto__add_field_file_imported_line__chg_field_file_responsible_town_pl.py diff --git a/archaeological_files/migrations/0019_auto__chg_field_file_history_creator__chg_field_file_history_modifier.py b/archaeological_files/old_migrations/0019_auto__chg_field_file_history_creator__chg_field_file_history_modifier.py index 74794228a..74794228a 100644 --- a/archaeological_files/migrations/0019_auto__chg_field_file_history_creator__chg_field_file_history_modifier.py +++ b/archaeological_files/old_migrations/0019_auto__chg_field_file_history_creator__chg_field_file_history_modifier.py diff --git a/archaeological_files/migrations/0020_auto.py b/archaeological_files/old_migrations/0020_auto.py index e6ecdfb3c..e6ecdfb3c 100644 --- a/archaeological_files/migrations/0020_auto.py +++ b/archaeological_files/old_migrations/0020_auto.py diff --git a/archaeological_files/migrations/0021_auto__chg_field_saisinetype_txt_idx__chg_field_filetype_txt_idx__del_f.py b/archaeological_files/old_migrations/0021_auto__chg_field_saisinetype_txt_idx__chg_field_filetype_txt_idx__del_f.py index de4898d89..de4898d89 100644 --- a/archaeological_files/migrations/0021_auto__chg_field_saisinetype_txt_idx__chg_field_filetype_txt_idx__del_f.py +++ b/archaeological_files/old_migrations/0021_auto__chg_field_saisinetype_txt_idx__chg_field_filetype_txt_idx__del_f.py diff --git a/archaeological_files/migrations/0022_auto__add_field_file_corporation_general_contractor__add_field_file_co.py b/archaeological_files/old_migrations/0022_auto__add_field_file_corporation_general_contractor__add_field_file_co.py index ddea52773..ddea52773 100644 --- a/archaeological_files/migrations/0022_auto__add_field_file_corporation_general_contractor__add_field_file_co.py +++ b/archaeological_files/old_migrations/0022_auto__add_field_file_corporation_general_contractor__add_field_file_co.py diff --git a/archaeological_files/migrations/0023_auto__del_field_file_corporation_responsible_town_planning_service__ad.py b/archaeological_files/old_migrations/0023_auto__del_field_file_corporation_responsible_town_planning_service__ad.py index b58229e78..b58229e78 100644 --- a/archaeological_files/migrations/0023_auto__del_field_file_corporation_responsible_town_planning_service__ad.py +++ b/archaeological_files/old_migrations/0023_auto__del_field_file_corporation_responsible_town_planning_service__ad.py diff --git a/archaeological_files/migrations/0024_auto__chg_field_file_reference_number__chg_field_historicalfile_refere.py b/archaeological_files/old_migrations/0024_auto__chg_field_file_reference_number__chg_field_historicalfile_refere.py index 7d297a328..7d297a328 100644 --- a/archaeological_files/migrations/0024_auto__chg_field_file_reference_number__chg_field_historicalfile_refere.py +++ b/archaeological_files/old_migrations/0024_auto__chg_field_file_reference_number__chg_field_historicalfile_refere.py diff --git a/archaeological_files/migrations/0025_auto__add_field_file_external_id__chg_field_file_name__add_field_histo.py b/archaeological_files/old_migrations/0025_auto__add_field_file_external_id__chg_field_file_name__add_field_histo.py index 37ea1dd46..37ea1dd46 100644 --- a/archaeological_files/migrations/0025_auto__add_field_file_external_id__chg_field_file_name__add_field_histo.py +++ b/archaeological_files/old_migrations/0025_auto__add_field_file_external_id__chg_field_file_name__add_field_histo.py diff --git a/archaeological_files/migrations/0026_auto__chg_field_file_cached_label__chg_field_historicalfile_cached_lab.py b/archaeological_files/old_migrations/0026_auto__chg_field_file_cached_label__chg_field_historicalfile_cached_lab.py index a90353c6c..a90353c6c 100644 --- a/archaeological_files/migrations/0026_auto__chg_field_file_cached_label__chg_field_historicalfile_cached_lab.py +++ b/archaeological_files/old_migrations/0026_auto__chg_field_file_cached_label__chg_field_historicalfile_cached_lab.py diff --git a/archaeological_files/migrations/0027_auto__chg_field_file_reference_number__chg_field_historicalfile_refere.py b/archaeological_files/old_migrations/0027_auto__chg_field_file_reference_number__chg_field_historicalfile_refere.py index 345660bb4..345660bb4 100644 --- a/archaeological_files/migrations/0027_auto__chg_field_file_reference_number__chg_field_historicalfile_refere.py +++ b/archaeological_files/old_migrations/0027_auto__chg_field_file_reference_number__chg_field_historicalfile_refere.py diff --git a/archaeological_files/migrations/0028_auto__chg_field_file_requested_operation_type.py b/archaeological_files/old_migrations/0028_auto__chg_field_file_requested_operation_type.py index 303e09b0f..303e09b0f 100644 --- a/archaeological_files/migrations/0028_auto__chg_field_file_requested_operation_type.py +++ b/archaeological_files/old_migrations/0028_auto__chg_field_file_requested_operation_type.py diff --git a/archaeological_files/migrations/0029_auto__chg_field_file_creation_date__chg_field_historicalfile_creation_.py b/archaeological_files/old_migrations/0029_auto__chg_field_file_creation_date__chg_field_historicalfile_creation_.py index 52a9f70e4..52a9f70e4 100644 --- a/archaeological_files/migrations/0029_auto__chg_field_file_creation_date__chg_field_historicalfile_creation_.py +++ b/archaeological_files/old_migrations/0029_auto__chg_field_file_creation_date__chg_field_historicalfile_creation_.py diff --git a/archaeological_files/migrations/0030_reference_number_to_permit_reference.py b/archaeological_files/old_migrations/0030_reference_number_to_permit_reference.py index 8a37b5085..8a37b5085 100644 --- a/archaeological_files/migrations/0030_reference_number_to_permit_reference.py +++ b/archaeological_files/old_migrations/0030_reference_number_to_permit_reference.py diff --git a/archaeological_files/migrations/0031_auto__del_field_file_reference_number__chg_field_file_permit_reference.py b/archaeological_files/old_migrations/0031_auto__del_field_file_reference_number__chg_field_file_permit_reference.py index 7178855a8..7178855a8 100644 --- a/archaeological_files/migrations/0031_auto__del_field_file_reference_number__chg_field_file_permit_reference.py +++ b/archaeological_files/old_migrations/0031_auto__del_field_file_reference_number__chg_field_file_permit_reference.py diff --git a/archaeological_files/migrations/0032_auto__add_field_file_auto_external_id__add_field_historicalfile_auto_e.py b/archaeological_files/old_migrations/0032_auto__add_field_file_auto_external_id__add_field_historicalfile_auto_e.py index 6dd172587..6dd172587 100644 --- a/archaeological_files/migrations/0032_auto__add_field_file_auto_external_id__add_field_historicalfile_auto_e.py +++ b/archaeological_files/old_migrations/0032_auto__add_field_file_auto_external_id__add_field_historicalfile_auto_e.py diff --git a/archaeological_files/migrations/0033_auto__chg_field_file_total_surface__chg_field_file_total_developed_sur.py b/archaeological_files/old_migrations/0033_auto__chg_field_file_total_surface__chg_field_file_total_developed_sur.py index d9097bd6d..d9097bd6d 100644 --- a/archaeological_files/migrations/0033_auto__chg_field_file_total_surface__chg_field_file_total_developed_sur.py +++ b/archaeological_files/old_migrations/0033_auto__chg_field_file_total_surface__chg_field_file_total_developed_sur.py diff --git a/archaeological_files/old_migrations/__init__.py b/archaeological_files/old_migrations/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archaeological_files/old_migrations/__init__.py diff --git a/archaeological_files/templates/ishtar/blocks/window_file_nav.html b/archaeological_files/templates/ishtar/blocks/window_file_nav.html index 149603af8..f8b6ddb8a 100644 --- a/archaeological_files/templates/ishtar/blocks/window_file_nav.html +++ b/archaeological_files/templates/ishtar/blocks/window_file_nav.html @@ -1,6 +1,5 @@ {% extends "ishtar/blocks/window_nav.html" %} {% load i18n %} -{% load url from future %} {% block extra_actions %} <a class='history-nav' href='{% url "operation_add" item.pk %}'> <span class="fa-stack fa-lg"> diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 9d0948660..6d64a975f 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -39,7 +39,7 @@ {% field_li "Type" item.file_type %} -{% if item.related_file %}<li><label>{%trans "Related file"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-file item.related_file.pk "" %}")'>{{ item.related_file }}</a></span></li>{% endif %} +{% if item.related_file %}<li><label>{%trans "Related file"%}</label> <span class='value'><a href='#' onclick='load_window("{% url "show-file" item.related_file.pk "" %}")'>{{ item.related_file }}</a></span></li>{% endif %} </ul> {% field "Comment" item.comment "<pre>" "</pre>" %} @@ -127,7 +127,8 @@ <td class='string'>{{operation.in_charge|default:""}}</td> <td>{{operation.start_date|default:""}}</td> <td>{{operation.excavation_end_date|default:""}}</td> - <td class='link'><a href="#" class='display_details' onclick='load_window("{%url show-operation operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td> + <td class='link'><a href="#" class='display_details' + onclick='load_window("{% url "show-operation" operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td> </tr> {% empty %} <tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaeological file" %}</td></tr> diff --git a/archaeological_files/tests.py b/archaeological_files/tests.py index b23c91a95..8a1069d51 100644 --- a/archaeological_files/tests.py +++ b/archaeological_files/tests.py @@ -25,48 +25,26 @@ from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test.client import Client -from ishtar_common.tests import TestCase, COMMON_FIXTURES +from ishtar_common.tests import TestCase, COMMON_FIXTURES, create_superuser -from ishtar_common.models import PersonType, Town, IshtarSiteProfile +from ishtar_common.models import Town, IshtarSiteProfile from archaeological_files import models -from archaeological_operations.models import Parcel, ParcelOwner -from archaeological_operations.tests import OperationInitTest, \ +from archaeological_operations.models import Parcel, ParcelOwner, ActType, \ + AdministrativeAct +from archaeological_operations.tests import OperationInitTest, FileInit, \ FILE_TOWNS_FIXTURES -class FileInit(object): - def login_as_superuser(self): - self.client.login(username='username', password='tralala') - - def create_file(self): - self.extra_models, self.model_list = {}, [] - self.user, created = User.objects.get_or_create(username='username', - is_superuser=True) - self.user.set_password('tralala') - self.user.save() - self.o_user, created = User.objects.get_or_create(username='ousername') - person_type, created = PersonType.objects.get_or_create( - label=u'Test ' u'person type', txt_idx='test_person', - available=True) - self.extra_models['person_type'] = person_type - self.model_list.append(person_type) - - person = models.Person(surname='Surname', name='Name', - history_modifier=self.o_user) - person.save() - self.extra_models['person'] = person - self.model_list.append(person) - - file_type, created = models.FileType.objects.get_or_create( - label=u'Test file type', txt_idx='test_file', available=True) - self.extra_models['file_type'] = file_type - self.model_list.append(file_type) - - dct = {'year': 2010, 'numeric_reference': 1000, 'file_type': file_type, - 'internal_reference': u'UNIT_testÉ ?', 'in_charge': person, - 'history_modifier': self.o_user, 'total_surface': 10000} - self.item = self.model(**dct) - self.item.save() +def create_administrativact(user, fle): + act_type, created = ActType.objects.get_or_create( + txt_idx='act_type_F', intented_to='F') + dct = {'history_modifier': user, + 'act_type': act_type, + 'associated_file': fle, + 'signature_date': datetime.date(2017, 07, 10), + 'index': 22} + adminact, created = AdministrativeAct.objects.get_or_create(**dct) + return [act_type], [adminact] class FileTest(TestCase, FileInit): @@ -293,3 +271,21 @@ class FileOperationTest(TestCase, OperationInitTest, FileInit): q = ParcelOwner.objects.filter(parcel__operation=self.operation, parcel__parcel_number='42') self.assertEqual(q.count(), 1) + + +class DashboardTest(TestCase, FileInit): + fixtures = FILE_TOWNS_FIXTURES + model = models.File + + def setUp(self): + self.username, self.password, self.user = create_superuser() + IshtarSiteProfile.objects.create() + self.create_file() + + def test_dashboard(self): + url = 'dashboard-file' + c = Client() + c.login(username=self.username, password=self.password) + + response = c.get(reverse(url)) + self.assertEqual(response.status_code, 200) diff --git a/archaeological_files/urls.py b/archaeological_files/urls.py index 110851f80..f00d618d6 100644 --- a/archaeological_files/urls.py +++ b/archaeological_files/urls.py @@ -17,16 +17,16 @@ # See the file COPYING for details. -from django.conf.urls.defaults import * +from django.conf.urls import url from ishtar_common.wizards import check_rights -import views +from archaeological_files import views +from archaeological_operations.views import administrativeactfile_document # be carreful: each check_rights must be relevant with ishtar_menu # forms: -urlpatterns = patterns( - '', +urlpatterns = [ url(r'file_administrativeactfil_search/(?P<step>.+)?$', check_rights(['change_administrativeact'])( views.file_administrativeactfile_search_wizard), @@ -65,33 +65,25 @@ urlpatterns = patterns( check_rights(['delete_file', 'delete_own_file'])( views.file_deletion_wizard), name='file_deletion'), -) - -urlpatterns += patterns( - 'archaeological_files.views', - url(r'autocomplete-file/$', 'autocomplete_file', + url(r'autocomplete-file/$', views.autocomplete_file, name='autocomplete-file'), - url(r'get-file/(?P<type>.+)?$', 'get_file', + url(r'get-file/(?P<type>.+)?$', views.get_file, name='get-file'), - url(r'get-file-full/(?P<type>.+)?$', 'get_file', + url(r'get-file-full/(?P<type>.+)?$', views.get_file, name='get-file-full', kwargs={'full': True}), url(r'get-file-shortcut/(?P<type>.+)?$', - 'get_file', name='get-file-shortcut', + views.get_file, name='get-file-shortcut', kwargs={'full': 'shortcut'}), url(r'get-administrativeactfile/(?P<type>.+)?$', - 'get_administrativeactfile', name='get-administrativeactfile'), - url(r'show-file(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_file', + views.get_administrativeactfile, name='get-administrativeactfile'), + url(r'show-file(?:/(?P<pk>.+))?/(?P<type>.+)?$', views.show_file, name='show-file'), url(r'show-historized-file/(?P<pk>.+)?/(?P<date>.+)?$', - 'show_file', name='show-historized-file'), + views.show_file, name='show-historized-file'), url(r'revert-file/(?P<pk>.+)/(?P<date>.+)$', - 'revert_file', name='revert-file'), - url(r'dashboard_file/$', 'dashboard_file', name='dashboard-file'), -) - -urlpatterns += patterns( - 'archaeological_operations.views', + views.revert_file, name='revert-file'), + url(r'dashboard_file/$', views.dashboard_file, name='dashboard-file'), url(r'file_administrativeact_document/$', - 'administrativeactfile_document', + administrativeactfile_document, name='file-administrativeact-document', kwargs={'file': True}), -) +] diff --git a/archaeological_files/views.py b/archaeological_files/views.py index 0b05ad37d..0c0dac3f3 100644 --- a/archaeological_files/views.py +++ b/archaeological_files/views.py @@ -23,7 +23,7 @@ import re from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponse -from django.shortcuts import render_to_response, redirect +from django.shortcuts import redirect, render from django.utils.translation import ugettext_lazy as _ from ishtar_common.views import get_item, show_item, revert_item @@ -51,9 +51,9 @@ def autocomplete_file(request): not request.user.has_perm('ishtar_common.view_own_file', models.File) \ and not request.user.ishtaruser.has_right('file_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(' '): @@ -74,7 +74,7 @@ def autocomplete_file(request): files = models.File.objects.filter(query)[:limit] data = json.dumps([{'id': file.pk, 'value': unicode(file)} for file in files]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') get_file = get_item(models.File, 'get_file', 'file') revert_file = revert_item(models.File) @@ -99,8 +99,7 @@ def dashboard_file(request, *args, **kwargs): Main dashboard """ dct = {'dashboard': models.FileDashboard()} - return render_to_response('ishtar/dashboards/dashboard_file.html', dct, - context_instance=RequestContext(request)) + return render(request, 'ishtar/dashboards/dashboard_file.html', dct) file_search_wizard = SearchWizard.as_view( [('general-file_search', FileFormSelection)], diff --git a/archaeological_files/wizards.py b/archaeological_files/wizards.py index 1558cd46e..e8d6ca9ae 100644 --- a/archaeological_files/wizards.py +++ b/archaeological_files/wizards.py @@ -20,8 +20,7 @@ from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db.models import Max -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render from django.utils.translation import ugettext_lazy as _ from ishtar_common.forms import reverse_lazy @@ -134,9 +133,7 @@ class FileDeletionWizard(FileClosingWizard): for operation in Operation.objects.filter(associated_file=obj).all(): operation.delete() obj.delete() - 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 FileAdministrativeActWizard(OperationAdministrativeActWizard): diff --git a/archaeological_files_pdl/templates/ishtar/wizard/file_confirm_wizard.html b/archaeological_files_pdl/templates/ishtar/wizard/file_confirm_wizard.html index f5268f582..914a5198b 100644 --- a/archaeological_files_pdl/templates/ishtar/wizard/file_confirm_wizard.html +++ b/archaeological_files_pdl/templates/ishtar/wizard/file_confirm_wizard.html @@ -1,5 +1,4 @@ {% extends "ishtar/wizard/confirm_wizard.html" %} -{% load url from future %} {% load i18n %} {% block "warning_informations" %} diff --git a/archaeological_files_pdl/urls.py b/archaeological_files_pdl/urls.py index 34646e8ad..6acb6129d 100644 --- a/archaeological_files_pdl/urls.py +++ b/archaeological_files_pdl/urls.py @@ -17,12 +17,11 @@ # See the file COPYING for details. -from django.conf.urls.defaults import * +from django.conf.urls import url from archaeological_files_pdl import views -urlpatterns = patterns( - '', +urlpatterns = [ url(r'file_creation/(?P<step>.+)?$', views.file_creation_wizard, name='file_creation'), url(r'file_modification/(?P<step>.+)?$', @@ -33,4 +32,4 @@ urlpatterns = patterns( url(r'townplanning-edit/(?P<pk>\d+)$', views.TownPlanningEdit.as_view(), name='townplanning_edit'), -) +] diff --git a/archaeological_finds/__init__.py b/archaeological_finds/__init__.py index e69de29bb..42c74e66d 100644 --- a/archaeological_finds/__init__.py +++ b/archaeological_finds/__init__.py @@ -0,0 +1 @@ +default_app_config = 'ishtar_common.apps.ArchaeologicalFindsConfig' diff --git a/archaeological_finds/admin.py b/archaeological_finds/admin.py index 8fd168316..a43793414 100644 --- a/archaeological_finds/admin.py +++ b/archaeological_finds/admin.py @@ -17,28 +17,62 @@ # See the file COPYING for details. +from ajax_select import make_ajax_form +from ajax_select.fields import AutoCompleteSelectField + +from django import forms from django.contrib import admin +from django.contrib.gis.forms import PointField, PolygonField, \ + LineStringField, OSMWidget +from django.utils.translation import ugettext_lazy as _ +from ishtar_common.apps import admin_site from ishtar_common.admin import HistorizedObjectAdmin, GeneralTypeAdmin import models +class AdminBaseFindForm(forms.ModelForm): + class Meta: + model = models.BaseFind + exclude = [] + point_2d = PointField(label=_(u"Point (2D)"), required=False, + widget=OSMWidget) + line = LineStringField(label=_(u"Line"), required=False, + widget=OSMWidget) + polygon = PolygonField(label=_(u"Polygon"), required=False, + widget=OSMWidget) + context_record = AutoCompleteSelectField('context_record') + + class BaseFindAdmin(HistorizedObjectAdmin): - list_display = ('label', 'context_record', 'batch') + list_display = ('label', 'context_record', 'index') search_fields = ('label', 'context_record__parcel__operation__name',) model = models.BaseFind + form = AdminBaseFindForm + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'cache_short_id', 'cache_complete_id', 'imports' + ] -admin.site.register(models.BaseFind, BaseFindAdmin) +admin_site.register(models.BaseFind, BaseFindAdmin) class FindAdmin(HistorizedObjectAdmin): - list_display = ('label', 'dating', 'volume', 'weight', - 'find_number',) - search_fields = ('label', "datings__period__label") + list_display = ('label', 'operations_lbl', 'context_records_lbl', 'index', + 'dating', 'materials') + list_filter = ('datings__period', 'material_types') + search_fields = ('label', "base_finds__cache_complete_id", + "base_finds__context_record__operation__cached_label") model = models.Find + form = make_ajax_form(model, { + 'base_finds': 'base_find', + 'container': 'container' + }) + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports', 'datings', 'cached_label' + ] -admin.site.register(models.Find, FindAdmin) +admin_site.register(models.Find, FindAdmin) class FindSourceAdmin(admin.ModelAdmin): @@ -46,60 +80,105 @@ class FindSourceAdmin(admin.ModelAdmin): list_filter = ('source_type',) search_fields = ('title', ) model = models.FindSource + form = make_ajax_form(model, { + 'authors': 'author', + 'find': 'find' + }) -admin.site.register(models.FindSource, FindSourceAdmin) +admin_site.register(models.FindSource, FindSourceAdmin) -class PropertyAdmin(admin.ModelAdmin): +class PropertyAdmin(HistorizedObjectAdmin): list_display = ['find', 'person', 'start_date', 'end_date'] search_fields = ('find__label', 'person__name') model = models.Property + form = make_ajax_form(model, { + 'find': 'find', + 'person': 'person', + }) + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'administrative_act', 'imports', ] -admin.site.register(models.Property, PropertyAdmin) + def has_add_permission(self, request): + return False + +admin_site.register(models.Property, PropertyAdmin) class TreatmentAdmin(HistorizedObjectAdmin): - list_display = ('location', 'treatment_types_lbl', 'container', 'person') + list_display = ('year', 'index', 'label','treatment_types_lbl', 'location', + 'downstream_lbl', 'upstream_lbl', 'container', 'person') + list_filter = ('treatment_types', 'treatment_state', 'year') model = models.Treatment + form = make_ajax_form(model, { + 'person': 'person', + 'organization': 'organization', + 'file': 'treatment_file', + 'location': 'warehouse', + 'container': 'container', + }) + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports', 'cached_label', 'downstream_lbl', 'upstream_lbl' + ] + + def has_add_permission(self, request): + return False -admin.site.register(models.Treatment, TreatmentAdmin) +admin_site.register(models.Treatment, TreatmentAdmin) class TreatmentFileAdmin(HistorizedObjectAdmin): - list_display = ('year', 'index', 'name', 'internal_reference') - search_fields = ('cached_label',) + list_display = ('type', 'year', 'index', 'name', + 'applicant', 'in_charge', 'internal_reference') + list_filter = ('type', 'year') + search_fields = ('name', 'applicant__name', 'applicant__surname', + 'applicant__raw_name', 'applicant_organisation__name', + 'cached_label') model = models.TreatmentFile + form = make_ajax_form(model,{ + 'in_charge': 'person', + 'applicant': 'person', + 'applicant_organisation': 'organization', + }) + exclude = ['imports'] + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'cached_label', + ] -admin.site.register(models.TreatmentFile, TreatmentFileAdmin) +admin_site.register(models.TreatmentFile, TreatmentFileAdmin) class TreatmentSourceAdmin(admin.ModelAdmin): - list_display = ('treatment', 'title', 'source_type',) + list_display = ('title', 'treatment', 'source_type',) list_filter = ('source_type',) - search_fields = ('title',) + search_fields = ('title', 'treatment__cached_label') model = models.TreatmentSource + form = make_ajax_form(model, { + 'treatment': 'treatment', + 'authors': 'author' + }) -admin.site.register(models.TreatmentSource, TreatmentSourceAdmin) +admin_site.register(models.TreatmentSource, TreatmentSourceAdmin) class HierarchicalTypeAdmin(GeneralTypeAdmin): list_display = ['label', 'txt_idx', 'parent', 'available', 'comment'] -admin.site.register(models.ObjectType, HierarchicalTypeAdmin) +admin_site.register(models.ObjectType, HierarchicalTypeAdmin) class MaterialTypeAdmin(HierarchicalTypeAdmin): list_display = HierarchicalTypeAdmin.list_display + ['recommendation'] search_fields = ('label', 'parent__label', 'comment',) -admin.site.register(models.MaterialType, MaterialTypeAdmin) +admin_site.register(models.MaterialType, MaterialTypeAdmin) class TreatmentTypeAdmin(admin.ModelAdmin): list_display = HierarchicalTypeAdmin.list_display + [ 'order', 'virtual', 'upstream_is_many', 'downstream_is_many'] model = models.TreatmentType -admin.site.register(models.TreatmentType, TreatmentTypeAdmin) +admin_site.register(models.TreatmentType, TreatmentTypeAdmin) general_models = [ models.ConservatoryState, models.RemarkabilityType, @@ -108,4 +187,4 @@ general_models = [ models.BatchType ] for model in general_models: - admin.site.register(model, GeneralTypeAdmin) + admin_site.register(model, GeneralTypeAdmin) diff --git a/archaeological_finds/fixtures/initial_data-fr.json b/archaeological_finds/fixtures/initial_data-fr.json index c7f0699b1..0c835841e 100644 --- a/archaeological_finds/fixtures/initial_data-fr.json +++ b/archaeological_finds/fixtures/initial_data-fr.json @@ -1,7652 +1,7052 @@ [ - { - "pk": 56, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.MT", - "parent": 27, - "label": "Alliage cuivreux", - "recommendation": "", - "txt_idx": "copper-alloy" - } - }, - { - "pk": 16, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout ce qui ne rentre pas dans les autres cases...", - "available": true, - "code": "M.AT", - "parent": null, - "label": "Autre", - "recommendation": "", - "txt_idx": "other" - } - }, - { - "pk": 51, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OG", - "parent": 23, - "label": "Bois non travaill\u00e9", - "recommendation": "", - "txt_idx": "wood" - } - }, - { - "pk": 52, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OG", - "parent": 22, - "label": "Bois travaill\u00e9", - "recommendation": "", - "txt_idx": "shaped_wood" - } - }, - { - "pk": 45, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "BRZ", - "parent": 56, - "label": "Bronze", - "recommendation": "", - "txt_idx": "brz" - } - }, - { - "pk": 24, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Toute la vaisselle c\u00e9ramique y compris les amphores", - "available": true, - "code": "M.TC", - "parent": 13, - "label": "C\u00e9ramique", - "recommendation": "", - "txt_idx": "ceramic" - } - }, - { - "pk": 47, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OG", - "parent": 23, - "label": "Charbon de bois", - "recommendation": "\u00c9viter l'\u00e9crasement", - "txt_idx": "charcoal" - } - }, - { - "pk": 46, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Fait de plusieurs mati\u00e8res", - "available": true, - "code": "CP", - "parent": null, - "label": "Composite", - "recommendation": "", - "txt_idx": "composite" - } - }, - { - "pk": 44, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OG", - "parent": 22, - "label": "Cuir", - "recommendation": "", - "txt_idx": "leather" - } - }, - { - "pk": 34, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.EP", - "parent": 32, - "label": "Enduit peint", - "recommendation": "", - "txt_idx": "painted_plaster" - } - }, - { - "pk": 54, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.TC", - "parent": 24, - "label": "Fa\u00efence", - "recommendation": "", - "txt_idx": "faience" - } - }, - { - "pk": 43, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OS", - "parent": 39, - "label": "Faune", - "recommendation": "", - "txt_idx": "animal_bone" - } - }, - { - "pk": 49, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.MT", - "parent": 28, - "label": "Fer", - "recommendation": "", - "txt_idx": "Iron" - } - }, - { - "pk": 50, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.MT", - "parent": 28, - "label": "Fonte", - "recommendation": "", - "txt_idx": "cast_iron" - } - }, - { - "pk": 48, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OG", - "parent": 23, - "label": "Graine", - "recommendation": "Hygrom\u00e9trie \u00e0 contr\u00f4ler, \u00e9viter l'\u00e9crasement", - "txt_idx": "seed" - } - }, - { - "pk": 55, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.TC", - "parent": 24, - "label": "Gr\u00e8s c\u00e9ramique", - "recommendation": "", - "txt_idx": "stoneware" - } - }, - { - "pk": 17, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout ce qui n'a pas pu \u00eatre identifi\u00e9, qui est ind\u00e9terminable \u00e0 ce jour (semble t-il)", - "available": true, - "code": "M.ID", - "parent": null, - "label": "Ind\u00e9termin\u00e9", - "recommendation": "", - "txt_idx": "unknown" - } - }, - { - "pk": 20, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout \u00e9l\u00e9ment en pierre intervenant dans la construction : pierre taill\u00e9e, moellon, pierre sculpt\u00e9e, statue \u2026", - "available": true, - "code": "M.LP", - "parent": 11, - "label": "Lapidaire", - "recommendation": "", - "txt_idx": "lapidary" - } - }, - { - "pk": 19, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout ce qui a rapport \u00e0 la pierre, \u00e0 la taille et \u00e0 l'industrie de la pierre durant la pr\u00e9histoire (ou plus r\u00e9cemment d'ailleurs)", - "available": true, - "code": "M.LT", - "parent": 11, - "label": "Lithique", - "recommendation": "", - "txt_idx": "lithic" - } - }, - { - "pk": 32, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout mat\u00e9riau de construction qui n'est ni de la pierre, ni de la TCA, ni du verre : terre crue, torchis, pl\u00e2tre, enduit peint, mosa\u00efque, bois ...", - "available": true, - "code": "M.AT", - "parent": 16, - "label": "Mat\u00e9riaux de construction autre", - "recommendation": "", - "txt_idx": "constr_material" - } - }, - { - "pk": 14, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.MT", - "parent": null, - "label": "M\u00e9tal", - "recommendation": "", - "txt_idx": "metal" - } - }, - { - "pk": 28, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout objet en m\u00e9tal ferreux", - "available": true, - "code": "M.MT", - "parent": 14, - "label": "M\u00e9tal ferreux", - "recommendation": "", - "txt_idx": "iron_metal" - } - }, - { - "pk": 27, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout objet en m\u00e9tal non ferreux", - "available": true, - "code": "M.MT", - "parent": 14, - "label": "M\u00e9tal non ferreux", - "recommendation": "", - "txt_idx": "not_iron_metal" - } - }, - { - "pk": 11, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.MI", - "parent": null, - "label": "Min\u00e9ral", - "recommendation": "", - "txt_idx": "mineral" - } - }, - { - "pk": 29, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Monnaies, jetons \u00e0 compter, poids mon\u00e9taires, coins", - "available": true, - "code": "M.MT", - "parent": 14, - "label": "Mon\u00e9taire", - "recommendation": "", - "txt_idx": "monetary" - } - }, - { - "pk": 18, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Type de mat\u00e9riau inconnu car non \u00e9tudi\u00e9", - "available": true, - "code": "M.?", - "parent": null, - "label": "Non \u00e9tudi\u00e9", - "recommendation": "", - "txt_idx": "not_studied" - } - }, - { - "pk": 12, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OG", - "parent": null, - "label": "Organique", - "recommendation": "", - "txt_idx": "organic" - } - }, - { - "pk": 23, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Mat\u00e9riaux naturels et de nature biologique (mnnb). Tout objet organique brut : os humain, reste de boucherie, graine, coquillage, corne \u2026", - "available": true, - "code": "M.OG", - "parent": 12, - "label": "Organique non travaill\u00e9", - "recommendation": "", - "txt_idx": "raw_organic" - } - }, - { - "pk": 22, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Cuir, tissu, tabletterie, vannerie, cordage, bois (hors construction), tout objet travaill\u00e9 (transform\u00e9) en mat\u00e9riau organique", - "available": true, - "code": "M.OG", - "parent": 12, - "label": "Organique travaill\u00e9", - "recommendation": "", - "txt_idx": "organicwork" - } - }, - { - "pk": 42, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OS", - "parent": 39, - "label": "Os humain", - "recommendation": "", - "txt_idx": "human_bone" - } - }, - { - "pk": 39, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OS", - "parent": 23, - "label": "Os non travaill\u00e9", - "recommendation": "", - "txt_idx": "unworked_bone" - } - }, - { - "pk": 40, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.OS", - "parent": 22, - "label": "Os travaill\u00e9", - "recommendation": "", - "txt_idx": "bonework" - } - }, - { - "pk": 21, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout ce qui n'est ni de l'industrie lithique, ni de la pierre de construction : meule, vaisselle, objet manufactur\u00e9 \u2026", - "available": true, - "code": "M.MI", - "parent": 11, - "label": "Pierre autre", - "recommendation": "", - "txt_idx": "other_stone" - } - }, - { - "pk": 53, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.TC", - "parent": 24, - "label": "Porcelaine", - "recommendation": "", - "txt_idx": "porcelain" - } - }, - { - "pk": 37, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "P.NT", - "parent": 16, - "label": "Pr\u00e9l\u00e8vement non trait\u00e9", - "recommendation": "", - "txt_idx": "sampling_not_processed" - } - }, - { - "pk": 35, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "P.TE", - "parent": 16, - "label": "Pr\u00e9l\u00e8vement trait\u00e9 et \u00e9tudi\u00e9", - "recommendation": "", - "txt_idx": "sampling_processed_studied" - } - }, - { - "pk": 36, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "P.NE", - "parent": 16, - "label": "Pr\u00e9l\u00e8vement trait\u00e9 non \u00e9tudi\u00e9", - "recommendation": "", - "txt_idx": "sampling_processed_not_studied" - } - }, - { - "pk": 33, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Plastique \u2026", - "available": true, - "code": "M.AT", - "parent": 16, - "label": "Synth\u00e9tique", - "recommendation": "", - "txt_idx": "synthetic" - } - }, - { - "pk": 13, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.TC", - "parent": null, - "label": "Terre cuite", - "recommendation": "", - "txt_idx": "earthenware" - } - }, - { - "pk": 25, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Mat\u00e9riaux de construction en terre cuite", - "available": true, - "code": "M.TC", - "parent": 13, - "label": "Terre cuite architecturale", - "recommendation": "", - "txt_idx": "architect_earthenwork" - } - }, - { - "pk": 26, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout ce qui n'est ni de la vaisselle c\u00e9ramique, ni de la TCA : peson, statuette, jouet \u2026", - "available": true, - "code": "M.TC", - "parent": 13, - "label": "Terre cuite autre", - "recommendation": "", - "txt_idx": "other_earthenwork" - } - }, - { - "pk": 15, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "", - "available": true, - "code": "M.VR", - "parent": null, - "label": "Verre", - "recommendation": "", - "txt_idx": "glass" - } - }, - { - "pk": 31, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout objet en verre autre que le verre li\u00e9 \u00e0 la construction : vaisselle \u2026", - "available": true, - "code": "M.VR", - "parent": 15, - "label": "Verre autre", - "recommendation": "", - "txt_idx": "glass_other" - } - }, - { - "pk": 30, - "model": "archaeological_finds.materialtype", - "fields": { - "comment": "Tout objet en verre li\u00e9 \u00e0 la construction : vitrage \u2026", - "available": true, - "code": "M.VR", - "parent": 15, - "label": "Verre construction", - "recommendation": "", - "txt_idx": "glass_constr" - } - }, - { - "pk": 1, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Le fait de mettre du mobilier dans un contenant. Que cela soit le conditionnement initial ou un re-conditionnement. ", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "Conditionnement", - "upstream_is_many": false, - "order": 10, - "txt_idx": "packaging" - } - }, - { - "pk": 16, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "Conservation-restauration", - "upstream_is_many": false, - "order": 10, - "txt_idx": "conservation" - } - }, - { - "pk": 14, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "Consultation sur place", - "upstream_is_many": false, - "order": 10, - "txt_idx": "local_consultation" - } - }, - { - "pk": 4, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "D\u00e9placement de mobilier, entre deux d\u00e9p\u00f4ts : le mobilier ne peut pas \u00eatre stock\u00e9 ailleurs que dans un lieu consid\u00e9r\u00e9 comme un d\u00e9p\u00f4t.", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "D\u00e9placement", - "upstream_is_many": false, - "order": 10, - "txt_idx": "moving" - } - }, - { - "pk": 10, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Processus qui permet d'\u00e9liminer le sel qui impr\u00e8gne un objet arch\u00e9ologique ou un lot d'objets.", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "D\u00e9salinisation", - "upstream_is_many": false, - "order": 10, - "txt_idx": "desalinisation" - } - }, - { - "pk": 7, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Division d'un lot de mobilier en plusieurs lots.", - "available": true, - "downstream_is_many": true, - "parent": null, - "virtual": false, - "label": "Division", - "upstream_is_many": false, - "order": 10, - "txt_idx": "split" - } - }, - { - "pk": 11, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "R\u00e9duction des oxydes d\u00e9velopp\u00e9s sur/dans un objet arch\u00e9ologique par l'usage de courant \u00e9lectrique.", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "\u00c9lectrolyse", - "upstream_is_many": false, - "order": 10, - "txt_idx": "electrolysis" - } - }, - { - "pk": 6, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "R\u00e9union de plusieurs objets ou lots mobiliers en un seul. Ce type de traitement peut impliquer ou non un reconditionnement.\r\n\r\nExemple : Remontage d'une c\u00e9ramique \u00e0 partir de tessons d\u00e9j\u00e0 pr\u00e9sents dans un contenant (pas de reconditionnement), regroupement d'une partie de la faune (os) d'une op\u00e9ration et cr\u00e9ation d'une nouvelle caisse dans ce but (reconditionnement \u00e0 faire).", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "Groupement", - "upstream_is_many": true, - "order": 10, - "txt_idx": "physical_grouping" - } - }, - { - "pk": 5, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Regroupement d'un ensemble de mobilier. Exemple : ensemble des outils provenant d'une fouille, mobilier datant d'un site, tessonier virtuel, etc.", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": true, - "label": "Groupement virtuel", - "upstream_is_many": true, - "order": 10, - "txt_idx": "virtual_group" - } - }, - { - "pk": 13, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Action de nettoyer le mobilier, d'ordinaire \u00e0 l'eau", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "Lavage", - "upstream_is_many": false, - "order": 10, - "txt_idx": "washing" - } - }, - { - "pk": 15, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "Marquage", - "upstream_is_many": false, - "order": 10, - "txt_idx": "marking" - } - }, - { - "pk": 18, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "", - "available": true, - "downstream_is_many": false, - "parent": 17, - "virtual": false, - "label": "Photographie", - "upstream_is_many": false, - "order": 10, - "txt_idx": "photo" - } - }, - { - "pk": 9, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Photographie produisant un film (positif ou n\u00e9gatif).", - "available": true, - "downstream_is_many": false, - "parent": 18, - "virtual": false, - "label": "Photographie argentique", - "upstream_is_many": false, - "order": 10, - "txt_idx": "regular_photography" - } - }, - { - "pk": 8, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Prise de vue \u00e0 l'aide d'un appareil photo num\u00e9rique.", - "available": true, - "downstream_is_many": false, - "parent": 18, - "virtual": false, - "label": "Photographie num\u00e9rique", - "upstream_is_many": false, - "order": 10, - "txt_idx": "digital_photography" - } - }, - { - "pk": 17, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "Prises de vue", - "upstream_is_many": false, - "order": 10, - "txt_idx": "shooting" - } - }, - { - "pk": 19, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "", - "available": true, - "downstream_is_many": false, - "parent": 17, - "virtual": false, - "label": "Radiographie", - "upstream_is_many": false, - "order": 10, - "txt_idx": "radioX" - } - }, - { - "pk": 2, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Radiographie (rayon X) qui produit un ou des films radio.", - "available": true, - "downstream_is_many": false, - "parent": 19, - "virtual": false, - "label": "Radiographie argentique", - "upstream_is_many": false, - "order": 10, - "txt_idx": "regular_x_ray" - } - }, - { - "pk": 3, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Radiographie (rayon X) qui produit un ou des fichiers num\u00e9riques.", - "available": true, - "downstream_is_many": false, - "parent": 19, - "virtual": false, - "label": "Radiographie num\u00e9rique", - "upstream_is_many": false, - "order": 10, - "txt_idx": "digital_x_ray" - } - }, - { - "pk": 12, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Regroupement d\u2019\u00e9l\u00e9ments afin d'en remonter un. Ceci traduit le remontage physique des \u00e9l\u00e9ments. Ils constituent dor\u00e9navant un seul objet issu du remontage de plusieurs.", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": false, - "label": "Remontage", - "upstream_is_many": true, - "order": 10, - "txt_idx": "reassembly" - } - }, - { - "pk": 20, - "model": "archaeological_finds.treatmenttype", - "fields": { - "comment": "Remontage virtuel : on sait que les \u00e9l\u00e9ments remontent ensemble, mais il n'y a pas eu de remontage physique p\u00e9renne.", - "available": true, - "downstream_is_many": false, - "parent": null, - "virtual": true, - "label": "Remontage virtuel", - "upstream_is_many": true, - "order": 10, - "txt_idx": "virtual-reassembly" - } - }, - { - "pk": 6, - "model": "archaeological_finds.treatmentstate", - "fields": { - "comment": "", - "available": true, - "txt_idx": "cancelled", - "label": "Abandonn\u00e9" - } - }, - { - "pk": 3, - "model": "archaeological_finds.treatmentstate", - "fields": { - "comment": "", - "available": true, - "txt_idx": "completed", - "label": "Achev\u00e9" - } - }, - { - "pk": 5, - "model": "archaeological_finds.treatmentstate", - "fields": { - "comment": "", - "available": true, - "txt_idx": "to_be_confirmed", - "label": "\u00c0 confirmer" - } - }, - { - "pk": 2, - "model": "archaeological_finds.treatmentstate", - "fields": { - "comment": "", - "available": true, - "txt_idx": "in_progress", - "label": "En cours" - } - }, - { - "pk": 4, - "model": "archaeological_finds.treatmentstate", - "fields": { - "comment": "", - "available": true, - "txt_idx": "unknown", - "label": "Inconnu" - } - }, - { - "pk": 1, - "model": "archaeological_finds.treatmentstate", - "fields": { - "comment": "", - "available": true, - "txt_idx": "planned", - "label": "Pr\u00e9vu" - } - }, - { - "pk": 4, - "model": "archaeological_finds.conservatorystate", - "fields": { - "comment": "L\u2019\u00e9tat de l\u2019objet n\u00e9cessite un traitement pr\u00e9ventif et/ou curatif.", - "available": true, - "txt_idx": "critical", - "parent": null, - "label": "Critique" - } - }, - { - "pk": 1, - "model": "archaeological_finds.conservatorystate", - "fields": { - "comment": "L\u2019\u00e9tat de l\u2019objet est \u00e0 d\u00e9terminer.", - "available": true, - "txt_idx": "unknown", - "parent": null, - "label": "Inconnu" - } - }, - { - "pk": 3, - "model": "archaeological_finds.conservatorystate", - "fields": { - "comment": "L\u2019\u00e9tat de l\u2019objet n\u00e9cessite un traitement pr\u00e9ventif.", - "available": true, - "txt_idx": "unstable", - "parent": null, - "label": "Instable" - } - }, - { - "pk": 2, - "model": "archaeological_finds.conservatorystate", - "fields": { - "comment": "L\u2019\u00e9tat de l\u2019objet est stable.", - "available": true, - "txt_idx": "stable", - "parent": null, - "label": "Stable" - } - }, - { - "pk": 1, - "model": "archaeological_finds.remarkabilitytype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "museable", - "label": "Mus\u00e9able" - } - }, - { - "pk": 5, - "model": "archaeological_finds.preservationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "to_wash", - "label": "\u00c0 laver" - } - }, - { - "pk": 2, - "model": "archaeological_finds.preservationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "recond", - "label": "\u00c0 reconditionner" - } - }, - { - "pk": 4, - "model": "archaeological_finds.preservationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "to_restaur", - "label": "\u00c0 restaurer" - } - }, - { - "pk": 3, - "model": "archaeological_finds.preservationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "to_stab", - "label": "\u00c0 stabiliser" - } - }, - { - "pk": 1, - "model": "archaeological_finds.preservationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "unknown", - "label": "Ind\u00e9termin\u00e9" - } - }, - { - "pk": 8, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "abreuvoir", - "parent": null, - "label": "abreuvoir" - } - }, - { - "pk": 9, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "accessoire-de-toilette", - "parent": null, - "label": "accessoire de toilette" - } - }, - { - "pk": 10, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "affutoir", - "parent": null, - "label": "aff\u00fbtoir" - } - }, - { - "pk": 11, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "agrafe", - "parent": null, - "label": "agrafe" - } - }, - { - "pk": 12, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "aiguille", - "parent": null, - "label": "aiguille" - } - }, - { - "pk": 13, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "aiguille-a-chas", - "parent": null, - "label": "aiguille \u00e0 chas" - } - }, - { - "pk": 14, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "aiguisoir", - "parent": null, - "label": "aiguisoir" - } - }, - { - "pk": 15, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "albarel", - "parent": null, - "label": "albarel" - } - }, - { - "pk": 16, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "alene", - "parent": null, - "label": "al\u00eane" - } - }, - { - "pk": 17, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "amphore", - "parent": null, - "label": "amphore" - } - }, - { - "pk": 18, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "amphorette", - "parent": null, - "label": "amphorette" - } - }, - { - "pk": 7, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ancre", - "parent": null, - "label": "ancre" - } - }, - { - "pk": 19, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "andouillet", - "parent": null, - "label": "andouillet" - } - }, - { - "pk": 20, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "angon", - "parent": null, - "label": "angon" - } - }, - { - "pk": 21, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "anneau", - "parent": null, - "label": "anneau" - } - }, - { - "pk": 22, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "anse", - "parent": null, - "label": "anse" - } - }, - { - "pk": 23, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "applique", - "parent": null, - "label": "applique" - } - }, - { - "pk": 24, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "appui-de-fenetre", - "parent": null, - "label": "appui de fen\u00eatre" - } - }, - { - "pk": 25, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ardillon", - "parent": null, - "label": "ardillon" - } - }, - { - "pk": 26, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ardoise", - "parent": null, - "label": "ardoise" - } - }, - { - "pk": 27, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ardoise-de-couverture", - "parent": null, - "label": "ardoise de couverture" - } - }, - { - "pk": 28, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "argile", - "parent": null, - "label": "argile" - } - }, - { - "pk": 29, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "argile-brule", - "parent": null, - "label": "argile br\u00fbl\u00e9" - } - }, - { - "pk": 30, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "armille", - "parent": null, - "label": "armille" - } - }, - { - "pk": 31, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "arrache-clous", - "parent": null, - "label": "arrache-clous " - } - }, - { - "pk": 32, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "assiette", - "parent": null, - "label": "assiette" - } - }, - { - "pk": 33, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "attache", - "parent": null, - "label": "attache" - } - }, - { - "pk": 34, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "aumoniere", - "parent": null, - "label": "aum\u00f4ni\u00e8re " - } - }, - { - "pk": 35, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "avifaune-oiseau", - "parent": null, - "label": "avifaune (oiseau)" - } - }, - { - "pk": 36, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "axe-dune-meule-et-licotin", - "parent": null, - "label": "axe d'une meule et licotin" - } - }, - { - "pk": 37, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bague", - "parent": null, - "label": "bague" - } - }, - { - "pk": 38, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "balance", - "parent": null, - "label": "balance" - } - }, - { - "pk": 39, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "balle", - "parent": null, - "label": "balle" - } - }, - { - "pk": 40, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "balsamaire", - "parent": null, - "label": "balsamaire" - } - }, - { - "pk": 41, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "balustrade", - "parent": null, - "label": "balustrade" - } - }, - { - "pk": 42, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bandage-de-roue", - "parent": null, - "label": "bandage de roue" - } - }, - { - "pk": 43, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "barbacane", - "parent": null, - "label": "barbacane" - } - }, - { - "pk": 44, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "barre", - "parent": null, - "label": "barre" - } - }, - { - "pk": 45, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "barrette", - "parent": null, - "label": "barrette" - } - }, - { - "pk": 46, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "barrette-de-fourreau", - "parent": null, - "label": "barrette de fourreau" - } - }, - { - "pk": 47, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "basalte", - "parent": null, - "label": "basalte" - } - }, - { - "pk": 48, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "base", - "parent": null, - "label": "base" - } - }, - { - "pk": 49, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "base-de-colonne", - "parent": null, - "label": "base de colonne" - } - }, - { - "pk": 50, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bassin", - "parent": null, - "label": "bassin" - } - }, - { - "pk": 51, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "baton-docre", - "parent": null, - "label": "b\u00e2ton d'ocre" - } - }, - { - "pk": 52, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "battitures", - "parent": null, - "label": "battitures" - } - }, - { - "pk": 54, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "beche", - "parent": null, - "label": "b\u00eache" - } - }, - { - "pk": 53, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bec-verseur", - "parent": null, - "label": "bec verseur" - } - }, - { - "pk": 55, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "beliere", - "parent": null, - "label": "b\u00e9li\u00e8re" - } - }, - { - "pk": 56, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "biface", - "parent": null, - "label": "biface" - } - }, - { - "pk": 57, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bille", - "parent": null, - "label": "bille" - } - }, - { - "pk": 58, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bloc", - "parent": null, - "label": "bloc" - } - }, - { - "pk": 59, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bloc-sculpte", - "parent": null, - "label": "bloc sculpt\u00e9" - } - }, - { - "pk": 60, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bloc-taille", - "parent": null, - "label": "bloc taill\u00e9" - } - }, - { - "pk": 61, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bobine-a-fil", - "parent": null, - "label": "bobine \u00e0 fil" - } - }, - { - "pk": 62, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bocal", - "parent": null, - "label": "bocal" - } - }, - { - "pk": 63, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bocal-a-pharmacie", - "parent": null, - "label": "bocal \u00e0 pharmacie" - } - }, - { - "pk": 64, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bois", - "parent": null, - "label": "bois" - } - }, - { - "pk": 65, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bois-de-cerf", - "parent": null, - "label": "bois de cerf" - } - }, - { - "pk": 66, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bois-de-construction", - "parent": null, - "label": "bois de construction" - } - }, - { - "pk": 67, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boite", - "parent": null, - "label": "bo\u00eete" - } - }, - { - "pk": 68, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bol", - "parent": null, - "label": "bol" - } - }, - { - "pk": 69, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bonnet", - "parent": null, - "label": "bonnet" - } - }, - { - "pk": 70, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bord", - "parent": null, - "label": "bord " - } - }, - { - "pk": 71, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bordure", - "parent": null, - "label": "bordure" - } - }, - { - "pk": 72, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boucharde-ou-eclat", - "parent": null, - "label": "boucharde ou \u00e9clat" - } - }, - { - "pk": 73, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bouchon", - "parent": null, - "label": "bouchon" - } - }, - { - "pk": 74, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boucle", - "parent": null, - "label": "boucle" - } - }, - { - "pk": 77, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boucle-de-ceinture", - "parent": null, - "label": "boucle de ceinture" - } - }, - { - "pk": 78, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boucle-de-chaussure", - "parent": null, - "label": "boucle de chaussure" - } - }, - { - "pk": 76, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boucle-dharnachement", - "parent": null, - "label": "boucle d'harnachement" - } - }, - { - "pk": 75, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boucle-doreille", - "parent": null, - "label": "boucle d'oreille" - } - }, - { - "pk": 79, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boucle-en-8", - "parent": null, - "label": "boucle en 8" - } - }, - { - "pk": 80, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boudins", - "parent": null, - "label": "boudins" - } - }, - { - "pk": 81, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bougeoir", - "parent": null, - "label": "bougeoir" - } - }, - { - "pk": 82, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boule", - "parent": null, - "label": "boule" - } - }, - { - "pk": 83, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boulet", - "parent": null, - "label": "boulet" - } - }, - { - "pk": 84, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boulet-de-canon", - "parent": null, - "label": "boulet de canon" - } - }, - { - "pk": 85, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boulette", - "parent": null, - "label": "boulette" - } - }, - { - "pk": 86, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bouteille", - "parent": null, - "label": "bouteille" - } - }, - { - "pk": 87, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bouterolle", - "parent": null, - "label": "bouterolle" - } - }, - { - "pk": 88, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bouton", - "parent": null, - "label": "bouton" - } - }, - { - "pk": 89, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bovide", - "parent": null, - "label": "bovid\u00e9" - } - }, - { - "pk": 90, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bracelet", - "parent": null, - "label": "bracelet" - } - }, - { - "pk": 91, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "branche", - "parent": null, - "label": "branche" - } - }, - { - "pk": 92, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bride", - "parent": null, - "label": "bride" - } - }, - { - "pk": 93, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "brides-dattaches", - "parent": null, - "label": "brides d'attaches" - } - }, - { - "pk": 94, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "brique", - "parent": null, - "label": "brique" - } - }, - { - "pk": 95, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "briquet", - "parent": null, - "label": "briquet" - } - }, - { - "pk": 96, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "briquetage-element", - "parent": null, - "label": "briquetage (\u00e9l\u00e9ment)" - } - }, - { - "pk": 97, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "broche", - "parent": null, - "label": "broche" - } - }, - { - "pk": 98, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "broyon", - "parent": null, - "label": "broyon" - } - }, - { - "pk": 99, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bulle-pontificale", - "parent": null, - "label": "bulle pontificale" - } - }, - { - "pk": 100, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "burin", - "parent": null, - "label": "burin" - } - }, - { - "pk": 101, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "buste", - "parent": null, - "label": "buste" - } - }, - { - "pk": 102, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cabochon", - "parent": null, - "label": "cabochon" - } - }, - { - "pk": 103, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cadenas", - "parent": null, - "label": "cadenas" - } - }, - { - "pk": 104, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "calage", - "parent": null, - "label": "calage" - } - }, - { - "pk": 105, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "calcaire-moulure", - "parent": null, - "label": "calcaire moulur\u00e9" - } - }, - { - "pk": 106, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cale", - "parent": null, - "label": "cale" - } - }, - { - "pk": 107, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "calice", - "parent": null, - "label": "calice" - } - }, - { - "pk": 108, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "calotte-cranienne-et-fibula", - "parent": null, - "label": "calotte cr\u00e2nienne et fibula" - } - }, - { - "pk": 109, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "canalisation", - "parent": null, - "label": "canalisation" - } - }, - { - "pk": 110, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "canon", - "parent": null, - "label": "canon" - } - }, - { - "pk": 111, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "caquelon", - "parent": null, - "label": "caquelon" - } - }, - { - "pk": 112, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carafe", - "parent": null, - "label": "carafe" - } - }, - { - "pk": 113, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carene", - "parent": null, - "label": "car\u00e8ne" - } - }, - { - "pk": 114, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carreau", - "parent": null, - "label": "carreau" - } - }, - { - "pk": 120, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carreau-bol", - "parent": null, - "label": "carreau-bol" - } - }, - { - "pk": 116, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carreau-dangle", - "parent": null, - "label": "carreau d'angle" - } - }, - { - "pk": 115, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carreau-darbalete", - "parent": null, - "label": "carreau d'arbal\u00e8te" - } - }, - { - "pk": 117, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carreau-de-pavement", - "parent": null, - "label": "carreau de pavement" - } - }, - { - "pk": 118, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carreau-de-poele", - "parent": null, - "label": "carreau de po\u00eale" - } - }, - { - "pk": 119, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carreau-double", - "parent": null, - "label": "carreau double" - } - }, - { - "pk": 121, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "carrelage", - "parent": null, - "label": "carrelage" - } - }, - { - "pk": 122, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cartouche", - "parent": null, - "label": "cartouche" - } - }, - { - "pk": 123, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "casque", - "parent": null, - "label": "casque" - } - }, - { - "pk": 124, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "casson", - "parent": null, - "label": "casson" - } - }, - { - "pk": 125, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cavalier", - "parent": null, - "label": "cavalier" - } - }, - { - "pk": 126, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ceinture", - "parent": null, - "label": "ceinture" - } - }, - { - "pk": 127, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cerclage", - "parent": null, - "label": "cerclage" - } - }, - { - "pk": 128, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cercle", - "parent": null, - "label": "cercle" - } - }, - { - "pk": 129, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cereales", - "parent": null, - "label": "c\u00e9r\u00e9ales" - } - }, - { - "pk": 130, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cervide", - "parent": null, - "label": "cervid\u00e9" - } - }, - { - "pk": 131, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chaine", - "parent": null, - "label": "cha\u00eene" - } - }, - { - "pk": 132, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chainette", - "parent": null, - "label": "cha\u00eenette" - } - }, - { - "pk": 133, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chandelier", - "parent": null, - "label": "chandelier" - } - }, - { - "pk": 134, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chape", - "parent": null, - "label": "chape" - } - }, - { - "pk": 135, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chapelet", - "parent": null, - "label": "chapelet" - } - }, - { - "pk": 136, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chapiteau", - "parent": null, - "label": "chapiteau" - } - }, - { - "pk": 137, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "charbon", - "parent": null, - "label": "charbon" - } - }, - { - "pk": 138, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "charniere", - "parent": null, - "label": "charni\u00e8re" - } - }, - { - "pk": 140, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chatelaine", - "parent": null, - "label": "ch\u00e2telaine" - } - }, - { - "pk": 141, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chaton", - "parent": null, - "label": "chaton" - } - }, - { - "pk": 139, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chat-tete", - "parent": null, - "label": "chat (t\u00eate)" - } - }, - { - "pk": 142, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chaudron", - "parent": null, - "label": "chaudron" - } - }, - { - "pk": 143, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chaussure", - "parent": null, - "label": "chaussure" - } - }, - { - "pk": 144, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chenet", - "parent": null, - "label": "chenet" - } - }, - { - "pk": 145, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cheveux", - "parent": null, - "label": "cheveux" - } - }, - { - "pk": 146, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cheville", - "parent": null, - "label": "cheville" - } - }, - { - "pk": 147, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "chien", - "parent": null, - "label": "chien" - } - }, - { - "pk": 148, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "christ-en-croix", - "parent": null, - "label": "christ en croix" - } - }, - { - "pk": 149, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ciboire", - "parent": null, - "label": "ciboire" - } - }, - { - "pk": 150, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ciseau", - "parent": null, - "label": "ciseau" - } - }, - { - "pk": 151, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ciseaux-plat", - "parent": null, - "label": "ciseaux plat" - } - }, - { - "pk": 152, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ciste", - "parent": null, - "label": "ciste" - } - }, - { - "pk": 153, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "clarine", - "parent": null, - "label": "clarine " - } - }, - { - "pk": 154, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "claveau", - "parent": null, - "label": "claveau" - } - }, - { - "pk": 155, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "clavette", - "parent": null, - "label": "clavette" - } - }, - { - "pk": 156, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "clavicule", - "parent": null, - "label": "clavicule" - } - }, - { - "pk": 157, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cle", - "parent": null, - "label": "cl\u00e9" - } - }, - { - "pk": 158, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cle-bague", - "parent": null, - "label": "cl\u00e9 bague" - } - }, - { - "pk": 159, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cle-de-voute", - "parent": null, - "label": "cl\u00e9 de vo\u00fbte" - } - }, - { - "pk": 160, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cloche", - "parent": null, - "label": "cloche" - } - }, - { - "pk": 161, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "clochette", - "parent": null, - "label": "clochette" - } - }, - { - "pk": 162, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "clou", - "parent": null, - "label": "clou" - } - }, - { - "pk": 163, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coffret", - "parent": null, - "label": "coffret" - } - }, - { - "pk": 164, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coin", - "parent": null, - "label": "coin" - } - }, - { - "pk": 165, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "col", - "parent": null, - "label": "col" - } - }, - { - "pk": 166, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "collier", - "parent": null, - "label": "collier" - } - }, - { - "pk": 167, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "colonne", - "parent": null, - "label": "colonne" - } - }, - { - "pk": 168, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "colonnette", - "parent": null, - "label": "colonnette" - } - }, - { - "pk": 169, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cone", - "parent": null, - "label": "c\u00f4ne" - } - }, - { - "pk": 170, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "contre-plaque", - "parent": null, - "label": "contre plaque" - } - }, - { - "pk": 171, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "copeau", - "parent": null, - "label": "copeau" - } - }, - { - "pk": 172, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coprolithes", - "parent": null, - "label": "coprolithes" - } - }, - { - "pk": 173, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coquemar-tripode", - "parent": null, - "label": "coquemar tripode" - } - }, - { - "pk": 174, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coquillage-conchyliologie", - "parent": null, - "label": "coquillage (conchyliologie)" - } - }, - { - "pk": 175, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "corne", - "parent": null, - "label": "corne" - } - }, - { - "pk": 176, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "corne-dappel", - "parent": null, - "label": "corne d'appel" - } - }, - { - "pk": 177, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cornet", - "parent": null, - "label": "cornet" - } - }, - { - "pk": 178, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "corniere", - "parent": null, - "label": "corni\u00e8re" - } - }, - { - "pk": 179, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cote", - "parent": null, - "label": "c\u00f4te" - } - }, - { - "pk": 180, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coulure", - "parent": null, - "label": "coulure" - } - }, - { - "pk": 181, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coupe", - "parent": null, - "label": "coupe" - } - }, - { - "pk": 182, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coupelle", - "parent": null, - "label": "coupelle" - } - }, - { - "pk": 183, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "couteau", - "parent": null, - "label": "couteau" - } - }, - { - "pk": 184, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "couvercle", - "parent": null, - "label": "couvercle" - } - }, - { - "pk": 185, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "couvre-feu", - "parent": null, - "label": "couvre feu" - } - }, - { - "pk": 186, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "couvre-joint", - "parent": null, - "label": "couvre joint" - } - }, - { - "pk": 187, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coxal", - "parent": null, - "label": "coxal" - } - }, - { - "pk": 188, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "crampon", - "parent": null, - "label": "crampon" - } - }, - { - "pk": 189, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "crane", - "parent": null, - "label": "cr\u00e2ne" - } - }, - { - "pk": 190, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "crapaudine", - "parent": null, - "label": "crapaudine" - } - }, - { - "pk": 191, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cremaillere-element-de", - "parent": null, - "label": "cr\u00e9maill\u00e8re ( \u00e9l\u00e9ment de )" - } - }, - { - "pk": 192, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "creuset", - "parent": null, - "label": "creuset" - } - }, - { - "pk": 193, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "crochet", - "parent": null, - "label": "crochet" - } - }, - { - "pk": 194, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "croix", - "parent": null, - "label": "croix" - } - }, - { - "pk": 195, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "croix-de-lorraine", - "parent": null, - "label": "croix de lorraine" - } - }, - { - "pk": 196, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cruche", - "parent": null, - "label": "cruche" - } - }, - { - "pk": 197, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "crucifix", - "parent": null, - "label": "crucifix" - } - }, - { - "pk": 198, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cuillere", - "parent": null, - "label": "cuill\u00e8re" - } - }, - { - "pk": 199, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cuirasse", - "parent": null, - "label": "cuirasse" - } - }, - { - "pk": 200, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "culot", - "parent": null, - "label": "culot" - } - }, - { - "pk": 201, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "culot-de-forge", - "parent": null, - "label": "culot de forge" - } - }, - { - "pk": 202, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "curette", - "parent": null, - "label": "curette" - } - }, - { - "pk": 203, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cuve", - "parent": null, - "label": "cuve" - } - }, - { - "pk": 204, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cylindre", - "parent": null, - "label": "cylindre" - } - }, - { - "pk": 205, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dallage", - "parent": null, - "label": "dallage" - } - }, - { - "pk": 206, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dalle", - "parent": null, - "label": "dalle" - } - }, - { - "pk": 207, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "de-a-coudre", - "parent": null, - "label": "d\u00e9 \u00e0 coudre" - } - }, - { - "pk": 208, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "de-a-jouer", - "parent": null, - "label": "d\u00e9 \u00e0 jouer" - } - }, - { - "pk": 209, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dechet-chute-de-sciage", - "parent": null, - "label": "d\u00e9chet chute de sciage" - } - }, - { - "pk": 210, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dechet-de-coule", - "parent": null, - "label": "d\u00e9chet de coul\u00e9" - } - }, - { - "pk": 211, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dechets-de-forge", - "parent": null, - "label": "d\u00e9chets de forge" - } - }, - { - "pk": 212, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "decor-sculpte", - "parent": null, - "label": "d\u00e9cor sculpt\u00e9" - } - }, - { - "pk": 213, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "degorgeoir", - "parent": null, - "label": "d\u00e9gorgeoir" - } - }, - { - "pk": 214, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dent", - "parent": null, - "label": "dent" - } - }, - { - "pk": 215, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "disque", - "parent": null, - "label": "disque" - } - }, - { - "pk": 216, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "divers", - "parent": null, - "label": "divers" - } - }, - { - "pk": 217, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "divinite", - "parent": null, - "label": "divinit\u00e9" - } - }, - { - "pk": 218, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dogger", - "parent": null, - "label": "dogger" - } - }, - { - "pk": 219, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dolia", - "parent": null, - "label": "dolia" - } - }, - { - "pk": 220, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dolium", - "parent": null, - "label": "dolium" - } - }, - { - "pk": 221, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "douelle", - "parent": null, - "label": "douelle" - } - }, - { - "pk": 222, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "douille", - "parent": null, - "label": "douille" - } - }, - { - "pk": 223, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ebauche", - "parent": null, - "label": "\u00e9bauche" - } - }, - { - "pk": 224, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "echantillon", - "parent": null, - "label": "\u00e9chantillon" - } - }, - { - "pk": 225, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "eclat", - "parent": null, - "label": "\u00e9clat" - } - }, - { - "pk": 226, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ecuelle", - "parent": null, - "label": "\u00e9cuelle" - } - }, - { - "pk": 227, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ecusson", - "parent": null, - "label": "\u00e9cusson" - } - }, - { - "pk": 228, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "element-architectural", - "parent": null, - "label": "\u00e9l\u00e9ment architectural" - } - }, - { - "pk": 230, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "element-de-char", - "parent": null, - "label": "\u00e9l\u00e9ment de char" - } - }, - { - "pk": 229, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "element-dharnachement", - "parent": null, - "label": "\u00e9l\u00e9ment d'harnachement" - } - }, - { - "pk": 231, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "embarcation", - "parent": null, - "label": "embarcation" - } - }, - { - "pk": 232, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "empreinte-de-pas", - "parent": null, - "label": "empreinte de pas" - } - }, - { - "pk": 233, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "enclume", - "parent": null, - "label": "enclume" - } - }, - { - "pk": 234, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "enduit", - "parent": null, - "label": "enduit" - } - }, - { - "pk": 235, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "enseigne-de-pelerinage", - "parent": null, - "label": "enseigne de p\u00e8lerinage" - } - }, - { - "pk": 236, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "epaule", - "parent": null, - "label": "\u00e9paule" - } - }, - { - "pk": 237, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "epee", - "parent": null, - "label": "\u00e9p\u00e9e" - } - }, - { - "pk": 238, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "eperon", - "parent": null, - "label": "\u00e9peron" - } - }, - { - "pk": 239, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "epingle", - "parent": null, - "label": "\u00e9pingle" - } - }, - { - "pk": 240, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "equide", - "parent": null, - "label": "\u00e9quid\u00e9" - } - }, - { - "pk": 241, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "escargot", - "parent": null, - "label": "escargot" - } - }, - { - "pk": 242, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "esquille", - "parent": null, - "label": "esquille" - } - }, - { - "pk": 243, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "esse", - "parent": null, - "label": "esse" - } - }, - { - "pk": 244, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "estampille", - "parent": null, - "label": "estampille" - } - }, - { - "pk": 245, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "etrier", - "parent": null, - "label": "\u00e9trier" - } - }, - { - "pk": 246, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ex-voto", - "parent": null, - "label": "ex voto" - } - }, - { - "pk": 247, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fabricat", - "parent": null, - "label": "fabricat" - } - }, - { - "pk": 248, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "faisselle", - "parent": null, - "label": "faisselle" - } - }, - { - "pk": 249, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fascine", - "parent": null, - "label": "fascine" - } - }, - { - "pk": 250, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fauchard", - "parent": null, - "label": "fauchard" - } - }, - { - "pk": 251, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "faucille", - "parent": null, - "label": "faucille" - } - }, - { - "pk": 252, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "faune", - "parent": null, - "label": "faune" - } - }, - { - "pk": 253, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "femur", - "parent": null, - "label": "f\u00e9mur" - } - }, - { - "pk": 254, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fer-a-cheval", - "parent": null, - "label": "fer \u00e0 cheval" - } - }, - { - "pk": 256, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fer-de-lance", - "parent": null, - "label": "fer de lance" - } - }, - { - "pk": 255, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fer-dequide", - "parent": null, - "label": "fer d'\u00e9quid\u00e9" - } - }, - { - "pk": 257, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ferret", - "parent": null, - "label": "ferret" - } - }, - { - "pk": 258, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ferrure-element", - "parent": null, - "label": "ferrure (\u00e9l\u00e9ment)" - } - }, - { - "pk": 259, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "feuillard", - "parent": null, - "label": "feuillard" - } - }, - { - "pk": 260, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "feuille", - "parent": null, - "label": "feuille" - } - }, - { - "pk": 261, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fiasque", - "parent": null, - "label": "fiasque" - } - }, - { - "pk": 262, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fibulas", - "parent": null, - "label": "fibulas" - } - }, - { - "pk": 263, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fibule", - "parent": null, - "label": "fibule" - } - }, - { - "pk": 264, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fiche", - "parent": null, - "label": "fiche" - } - }, - { - "pk": 265, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fiche-a-beliere", - "parent": null, - "label": "fiche \u00e0 b\u00e9li\u00e8re" - } - }, - { - "pk": 266, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "figurine", - "parent": null, - "label": "figurine" - } - }, - { - "pk": 267, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fil", - "parent": null, - "label": "fil" - } - }, - { - "pk": 268, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fiole", - "parent": null, - "label": "fiole" - } - }, - { - "pk": 269, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "flacon", - "parent": null, - "label": "flacon" - } - }, - { - "pk": 270, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fleau-de-balance", - "parent": null, - "label": "fl\u00e9au de balance" - } - }, - { - "pk": 271, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fleche", - "parent": null, - "label": "fl\u00e8che" - } - }, - { - "pk": 272, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "flute", - "parent": null, - "label": "fl\u00fbte" - } - }, - { - "pk": 273, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fond", - "parent": null, - "label": "fond" - } - }, - { - "pk": 274, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "force", - "parent": null, - "label": "force" - } - }, - { - "pk": 275, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "four", - "parent": null, - "label": "four" - } - }, - { - "pk": 276, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fourche", - "parent": null, - "label": "fourche" - } - }, - { - "pk": 277, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fourreau", - "parent": null, - "label": "fourreau" - } - }, - { - "pk": 278, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "foyer", - "parent": null, - "label": "foyer" - } - }, - { - "pk": 279, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "francisque", - "parent": null, - "label": "francisque" - } - }, - { - "pk": 280, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "frette", - "parent": null, - "label": "frette" - } - }, - { - "pk": 281, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "frise-darchitrave", - "parent": null, - "label": "frise d'architrave" - } - }, - { - "pk": 282, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "furgeoire", - "parent": null, - "label": "furgeoire" - } - }, - { - "pk": 283, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fusaiole", - "parent": null, - "label": "fusa\u00efole" - } - }, - { - "pk": 284, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fusee-dobus", - "parent": null, - "label": "fus\u00e9e d'obus" - } - }, - { - "pk": 285, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fut-de-colonne", - "parent": null, - "label": "f\u00fbt de colonne" - } - }, - { - "pk": 286, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "galet", - "parent": null, - "label": "galet" - } - }, - { - "pk": 287, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "garniture", - "parent": null, - "label": "garniture" - } - }, - { - "pk": 288, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "garniture-de-bouton", - "parent": null, - "label": "garniture de bouton" - } - }, - { - "pk": 289, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "garniture-de-ceinture", - "parent": null, - "label": "garniture de ceinture" - } - }, - { - "pk": 290, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gasteropode-escargot", - "parent": null, - "label": "gast\u00e9ropode (escargot)" - } - }, - { - "pk": 291, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gland", - "parent": null, - "label": "gland" - } - }, - { - "pk": 292, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gobelet", - "parent": null, - "label": "gobelet" - } - }, - { - "pk": 293, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gobelet-de-poele", - "parent": null, - "label": "gobelet de po\u00eale" - } - }, - { - "pk": 294, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gond", - "parent": null, - "label": "gond" - } - }, - { - "pk": 295, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gouge", - "parent": null, - "label": "gouge" - } - }, - { - "pk": 296, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "goulot", - "parent": null, - "label": "goulot" - } - }, - { - "pk": 297, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "goutte-de-verre", - "parent": null, - "label": "goutte de verre" - } - }, - { - "pk": 298, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gouttiere", - "parent": null, - "label": "goutti\u00e8re" - } - }, - { - "pk": 299, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "grain-de-chapelet", - "parent": null, - "label": "grain de chapelet" - } - }, - { - "pk": 300, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "graine", - "parent": null, - "label": "graine" - } - }, - { - "pk": 301, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "grattoir", - "parent": null, - "label": "grattoir" - } - }, - { - "pk": 302, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gravier", - "parent": null, - "label": "gravier " - } - }, - { - "pk": 303, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gravure", - "parent": null, - "label": "gravure" - } - }, - { - "pk": 304, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "grelot", - "parent": null, - "label": "grelot" - } - }, - { - "pk": 305, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "grille", - "parent": null, - "label": "grille" - } - }, - { - "pk": 306, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gros-lithique", - "parent": null, - "label": "gros lithique" - } - }, - { - "pk": 307, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gryphees", - "parent": null, - "label": "gryph\u00e9es" - } - }, - { - "pk": 308, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "guimbarde", - "parent": null, - "label": "guimbarde" - } - }, - { - "pk": 309, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "hache", - "parent": null, - "label": "hache" - } - }, - { - "pk": 310, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "hamecon", - "parent": null, - "label": "hame\u00e7on" - } - }, - { - "pk": 311, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "herminette", - "parent": null, - "label": "herminette" - } - }, - { - "pk": 312, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "herse", - "parent": null, - "label": "herse" - } - }, - { - "pk": 313, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "hipposandale", - "parent": null, - "label": "hipposandale" - } - }, - { - "pk": 314, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "huitre", - "parent": null, - "label": "hu\u00eetre" - } - }, - { - "pk": 315, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "humerus", - "parent": null, - "label": "hum\u00e9rus" - } - }, - { - "pk": 316, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ichtyofaune-poisson", - "parent": null, - "label": "ichtyofaune (poisson)" - } - }, - { - "pk": 317, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "imbrex", - "parent": null, - "label": "imbrex" - } - }, - { - "pk": 318, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "incineration-prelevement", - "parent": null, - "label": "incin\u00e9ration (pr\u00e9l\u00e8vement)" - } - }, - { - "pk": 319, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "indetermine", - "parent": null, - "label": "ind\u00e9termin\u00e9" - } - }, - { - "pk": 320, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "inhumation", - "parent": null, - "label": "inhumation" - } - }, - { - "pk": 321, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "inscription", - "parent": null, - "label": "inscription" - } - }, - { - "pk": 322, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "intaille", - "parent": null, - "label": "intaille" - } - }, - { - "pk": 323, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "jambage", - "parent": null, - "label": "jambage" - } - }, - { - "pk": 324, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "jambiere", - "parent": null, - "label": "jambi\u00e8re" - } - }, - { - "pk": 325, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "jante", - "parent": null, - "label": "jante" - } - }, - { - "pk": 326, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "jarre", - "parent": null, - "label": "jarre" - } - }, - { - "pk": 327, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "jatte", - "parent": null, - "label": "jatte" - } - }, - { - "pk": 328, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "jeton", - "parent": null, - "label": "jeton" - } - }, - { - "pk": 329, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "joug", - "parent": null, - "label": "joug" - } - }, - { - "pk": 330, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "kugeltopf", - "parent": null, - "label": "kugeltopf" - } - }, - { - "pk": 331, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lacrymaire", - "parent": null, - "label": "lacrymaire" - } - }, - { - "pk": 332, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lame", - "parent": null, - "label": "lame" - } - }, - { - "pk": 333, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lamelle", - "parent": null, - "label": "lamelle" - } - }, - { - "pk": 334, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lampe", - "parent": null, - "label": "lampe" - } - }, - { - "pk": 335, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lampe-a-huile", - "parent": null, - "label": "lampe \u00e0 huile" - } - }, - { - "pk": 336, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lance", - "parent": null, - "label": "lance" - } - }, - { - "pk": 337, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "languette", - "parent": null, - "label": "languette" - } - }, - { - "pk": 338, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lapidaire", - "parent": null, - "label": "lapidaire" - } - }, - { - "pk": 339, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lapidaire-element", - "parent": null, - "label": "lapidaire (\u00e9l\u00e9ment)" - } - }, - { - "pk": 340, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lechefrite", - "parent": null, - "label": "l\u00e8chefrite" - } - }, - { - "pk": 341, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "levre", - "parent": null, - "label": "l\u00e8vre " - } - }, - { - "pk": 342, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lime", - "parent": null, - "label": "lime" - } - }, - { - "pk": 343, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "linceul", - "parent": null, - "label": "linceul" - } - }, - { - "pk": 344, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lingot", - "parent": null, - "label": "lingot" - } - }, - { - "pk": 345, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lissoir", - "parent": null, - "label": "lissoir" - } - }, - { - "pk": 346, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lithique", - "parent": null, - "label": "lithique" - } - }, - { - "pk": 347, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lithique-brute", - "parent": null, - "label": "lithique brute" - } - }, - { - "pk": 348, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lithique-chauffe", - "parent": null, - "label": "lithique chauff\u00e9" - } - }, - { - "pk": 349, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lithique-debitage", - "parent": null, - "label": "lithique d\u00e9bitage" - } - }, - { - "pk": 350, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lithique-divers", - "parent": null, - "label": "lithique divers" - } - }, - { - "pk": 351, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lithique-outil", - "parent": null, - "label": "lithique outil" - } - }, - { - "pk": 352, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lithique-remontage", - "parent": null, - "label": "lithique remontage" - } - }, - { - "pk": 353, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "louche", - "parent": null, - "label": "louche" - } - }, - { - "pk": 354, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "loup", - "parent": null, - "label": "loup" - } - }, - { - "pk": 355, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "macro-reste", - "parent": null, - "label": "macro-reste" - } - }, - { - "pk": 356, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "maillon", - "parent": null, - "label": "maillon" - } - }, - { - "pk": 357, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "main-droite", - "parent": null, - "label": "main droite" - } - }, - { - "pk": 358, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "main-gauche", - "parent": null, - "label": "main gauche" - } - }, - { - "pk": 359, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mammifere", - "parent": null, - "label": "mammif\u00e8re" - } - }, - { - "pk": 360, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "manche", - "parent": null, - "label": "manche" - } - }, - { - "pk": 361, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mandibule", - "parent": null, - "label": "mandibule" - } - }, - { - "pk": 362, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "manuscrit-a-lencre", - "parent": null, - "label": "manuscrit \u00e0 l'encre" - } - }, - { - "pk": 363, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "margelle-de-puits", - "parent": null, - "label": "margelle de puits" - } - }, - { - "pk": 364, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "marmite", - "parent": null, - "label": "marmite" - } - }, - { - "pk": 365, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "marteau", - "parent": null, - "label": "marteau" - } - }, - { - "pk": 366, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "massacre-de-cerf", - "parent": null, - "label": "massacre de cerf" - } - }, - { - "pk": 367, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "materiaux-de-construction", - "parent": null, - "label": "mat\u00e9riaux de construction" - } - }, - { - "pk": 368, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "maxillaire", - "parent": null, - "label": "maxillaire" - } - }, - { - "pk": 369, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "medaille", - "parent": null, - "label": "m\u00e9daille" - } - }, - { - "pk": 370, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membre-inferieur", - "parent": null, - "label": "membre inf\u00e9rieur" - } - }, - { - "pk": 371, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membre-inferieur-droit", - "parent": null, - "label": "membre inf\u00e9rieur droit" - } - }, - { - "pk": 372, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membre-inferieur-gauche", - "parent": null, - "label": "membre inf\u00e9rieur gauche" - } - }, - { - "pk": 373, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membre-posterieur-droit", - "parent": null, - "label": "membre post\u00e9rieur droit" - } - }, - { - "pk": 374, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membre-posterieur-gauche", - "parent": null, - "label": "membre post\u00e9rieur gauche" - } - }, - { - "pk": 375, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membre-superieur", - "parent": null, - "label": "membre sup\u00e9rieur" - } - }, - { - "pk": 376, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membre-superieur-droit", - "parent": null, - "label": "membre sup\u00e9rieur droit" - } - }, - { - "pk": 377, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membre-superieur-gauche", - "parent": null, - "label": "membre sup\u00e9rieur gauche" - } - }, - { - "pk": 378, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "menhir", - "parent": null, - "label": "menhir" - } - }, - { - "pk": 379, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mereau", - "parent": null, - "label": "m\u00e9reau" - } - }, - { - "pk": 380, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "metacarpe", - "parent": null, - "label": "m\u00e9tacarpe" - } - }, - { - "pk": 381, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "meule", - "parent": null, - "label": "meule" - } - }, - { - "pk": 383, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "micro-faune", - "parent": null, - "label": "micro-faune" - } - }, - { - "pk": 382, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "micro-vase", - "parent": null, - "label": "micro vase" - } - }, - { - "pk": 384, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "milfiori", - "parent": null, - "label": "milfiori" - } - }, - { - "pk": 385, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "minerai", - "parent": null, - "label": "minerai " - } - }, - { - "pk": 386, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "miroir", - "parent": null, - "label": "miroir" - } - }, - { - "pk": 387, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "moellon", - "parent": null, - "label": "moellon" - } - }, - { - "pk": 388, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "molette", - "parent": null, - "label": "molette " - } - }, - { - "pk": 389, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mollusque", - "parent": null, - "label": "mollusque" - } - }, - { - "pk": 390, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "monnaie", - "parent": null, - "label": "monnaie" - } - }, - { - "pk": 391, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mordant-de-ceinture", - "parent": null, - "label": "mordant de ceinture" - } - }, - { - "pk": 392, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mors-de-cheval", - "parent": null, - "label": "mors de cheval" - } - }, - { - "pk": 393, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mortier", - "parent": null, - "label": "mortier" - } - }, - { - "pk": 394, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mosaique", - "parent": null, - "label": "mosa\u00efque" - } - }, - { - "pk": 395, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "moulage", - "parent": null, - "label": "moulage" - } - }, - { - "pk": 397, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "moule-a-kugeltopf", - "parent": null, - "label": "moule \u00e0 kugeltopf" - } - }, - { - "pk": 396, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "moule-objet", - "parent": null, - "label": "moule (objet)" - } - }, - { - "pk": 398, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "moulure", - "parent": null, - "label": "moulure" - } - }, - { - "pk": 399, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mouture", - "parent": null, - "label": "mouture" - } - }, - { - "pk": 400, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "navette", - "parent": null, - "label": "navette" - } - }, - { - "pk": 401, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "nodule", - "parent": null, - "label": "nodule" - } - }, - { - "pk": 402, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "nodule-brule", - "parent": null, - "label": "nodule br\u00fble" - } - }, - { - "pk": 403, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "nucleus", - "parent": null, - "label": "nucl\u00e9us" - } - }, - { - "pk": 404, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ocre", - "parent": null, - "label": "ocre" - } - }, - { - "pk": 405, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "oeuf", - "parent": null, - "label": "oeuf" - } - }, - { - "pk": 406, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "oiseau", - "parent": null, - "label": "oiseau" - } - }, - { - "pk": 407, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "omoplate", - "parent": null, - "label": "omoplate" - } - }, - { - "pk": 408, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "orle", - "parent": null, - "label": "orle" - } - }, - { - "pk": 409, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "os-debite", - "parent": null, - "label": "os d\u00e9bit\u00e9" - } - }, - { - "pk": 410, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "oule", - "parent": null, - "label": "oule" - } - }, - { - "pk": 411, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "outil-indetermine", - "parent": null, - "label": "outil ind\u00e9termin\u00e9" - } - }, - { - "pk": 412, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "paillette", - "parent": null, - "label": "paillette " - } - }, - { - "pk": 413, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "panse", - "parent": null, - "label": "panse" - } - }, - { - "pk": 414, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "papier", - "parent": null, - "label": "papier" - } - }, - { - "pk": 416, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "paroi-de-four", - "parent": null, - "label": "paroi de four" - } - }, - { - "pk": 415, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "paroi-element", - "parent": null, - "label": "paroi (\u00e9l\u00e9ment)" - } - }, - { - "pk": 417, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pas", - "parent": null, - "label": "pas" - } - }, - { - "pk": 418, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "passant", - "parent": null, - "label": "passant" - } - }, - { - "pk": 419, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "passant-de-ceinture", - "parent": null, - "label": "passant de ceinture" - } - }, - { - "pk": 421, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "passe-courroi", - "parent": null, - "label": "passe-courroi" - } - }, - { - "pk": 422, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "passe-guide", - "parent": null, - "label": "passe-guide" - } - }, - { - "pk": 420, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "passe-lacet", - "parent": null, - "label": "passe lacet" - } - }, - { - "pk": 423, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "passoire", - "parent": null, - "label": "passoire" - } - }, - { - "pk": 424, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "patellas", - "parent": null, - "label": "patellas" - } - }, - { - "pk": 425, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "patere", - "parent": null, - "label": "pat\u00e8re" - } - }, - { - "pk": 426, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "patte", - "parent": null, - "label": "patte" - } - }, - { - "pk": 427, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pavage", - "parent": null, - "label": "pavage" - } - }, - { - "pk": 428, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pave", - "parent": null, - "label": "pav\u00e9" - } - }, - { - "pk": 429, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pavement", - "parent": null, - "label": "pavement" - } - }, - { - "pk": 430, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "peigne", - "parent": null, - "label": "peigne" - } - }, - { - "pk": 431, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "peinture-murale", - "parent": null, - "label": "peinture murale" - } - }, - { - "pk": 432, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pelle", - "parent": null, - "label": "pelle" - } - }, - { - "pk": 433, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pelle-a-feu", - "parent": null, - "label": "pelle \u00e0 feu" - } - }, - { - "pk": 434, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pendant-de-ceinture", - "parent": null, - "label": "pendant de ceinture" - } - }, - { - "pk": 435, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pendeloque", - "parent": null, - "label": "pendeloque" - } - }, - { - "pk": 436, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pendentif", - "parent": null, - "label": "pendentif" - } - }, - { - "pk": 437, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "penture", - "parent": null, - "label": "penture" - } - }, - { - "pk": 438, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "percoir", - "parent": null, - "label": "per\u00e7oir" - } - }, - { - "pk": 439, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "percuteur", - "parent": null, - "label": "percuteur" - } - }, - { - "pk": 440, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "perle", - "parent": null, - "label": "perle" - } - }, - { - "pk": 441, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "peson", - "parent": null, - "label": "peson" - } - }, - { - "pk": 442, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "phalange", - "parent": null, - "label": "phalange" - } - }, - { - "pk": 443, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "phosphate", - "parent": null, - "label": "phosphate" - } - }, - { - "pk": 444, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pic", - "parent": null, - "label": "pic" - } - }, - { - "pk": 445, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pichet", - "parent": null, - "label": "pichet" - } - }, - { - "pk": 446, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "piece-de-renfort", - "parent": null, - "label": "pi\u00e8ce de renfort" - } - }, - { - "pk": 447, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pied", - "parent": null, - "label": "pied" - } - }, - { - "pk": 448, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pierre-a-aiguiser", - "parent": null, - "label": "pierre \u00e0 aiguiser" - } - }, - { - "pk": 449, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pieu", - "parent": null, - "label": "pieu" - } - }, - { - "pk": 450, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pilette", - "parent": null, - "label": "pilette" - } - }, - { - "pk": 451, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pilette-dhypocauste", - "parent": null, - "label": "pilette d'hypocauste" - } - }, - { - "pk": 452, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pilier", - "parent": null, - "label": "pilier" - } - }, - { - "pk": 453, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pilum", - "parent": null, - "label": "pilum" - } - }, - { - "pk": 454, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pince-a-epiler", - "parent": null, - "label": "pince \u00e0 \u00e9piler" - } - }, - { - "pk": 455, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "piochon", - "parent": null, - "label": "piochon" - } - }, - { - "pk": 456, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pion", - "parent": null, - "label": "pion" - } - }, - { - "pk": 457, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pipe", - "parent": null, - "label": "pipe" - } - }, - { - "pk": 458, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "piquet", - "parent": null, - "label": "piquet" - } - }, - { - "pk": 459, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pirogue", - "parent": null, - "label": "pirogue" - } - }, - { - "pk": 460, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pise", - "parent": null, - "label": "pis\u00e9" - } - }, - { - "pk": 461, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "piton", - "parent": null, - "label": "piton" - } - }, - { - "pk": 462, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "planche", - "parent": null, - "label": "planche" - } - }, - { - "pk": 463, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plane", - "parent": null, - "label": "plane" - } - }, - { - "pk": 464, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaque", - "parent": null, - "label": "plaque" - } - }, - { - "pk": 472, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaque-boucle", - "parent": null, - "label": "plaque-boucle" - } - }, - { - "pk": 466, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaque-de-ceinture", - "parent": null, - "label": "plaque de ceinture" - } - }, - { - "pk": 470, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "plaque-decorative-de-harnachement", - "parent": null, - "label": "plaque d\u00e9corative de harnachement" - } - }, - { - "pk": 465, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaque-dentree-de-serrure", - "parent": null, - "label": "plaque d'entr\u00e9e de serrure" - } - }, - { - "pk": 467, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaque-de-porte", - "parent": null, - "label": "plaque de porte" - } - }, - { - "pk": 468, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaque-de-renfort", - "parent": null, - "label": "plaque de renfort" - } - }, - { - "pk": 469, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaque-de-tole", - "parent": null, - "label": "plaque de t\u00f4le " - } - }, - { - "pk": 471, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaque-dorsale", - "parent": null, - "label": "plaque dorsale" - } - }, - { - "pk": 473, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plaquette", - "parent": null, - "label": "plaquette" - } - }, - { - "pk": 474, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plat", - "parent": null, - "label": "plat" - } - }, - { - "pk": 475, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plat-a-barbe", - "parent": null, - "label": "plat \u00e0 barbe" - } - }, - { - "pk": 476, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plomb-de-vitrail", - "parent": null, - "label": "plomb de vitrail" - } - }, - { - "pk": 477, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "poelon", - "parent": null, - "label": "po\u00ealon" - } - }, - { - "pk": 478, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "poids", - "parent": null, - "label": "poids" - } - }, - { - "pk": 479, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "poignard", - "parent": null, - "label": "poignard" - } - }, - { - "pk": 480, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "poignee", - "parent": null, - "label": "poign\u00e9e" - } - }, - { - "pk": 481, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "poincon", - "parent": null, - "label": "poin\u00e7on" - } - }, - { - "pk": 482, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pointe", - "parent": null, - "label": "pointe" - } - }, - { - "pk": 483, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pointe-de-fleche", - "parent": null, - "label": "pointe de fl\u00e8che" - } - }, - { - "pk": 484, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pointe-de-lance", - "parent": null, - "label": "pointe de lance" - } - }, - { - "pk": 485, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pointerolle", - "parent": null, - "label": "pointerolle" - } - }, - { - "pk": 486, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "polissoir", - "parent": null, - "label": "polissoir" - } - }, - { - "pk": 487, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pommeau", - "parent": null, - "label": "pommeau" - } - }, - { - "pk": 488, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "porte-ardillon", - "parent": null, - "label": "porte ardillon" - } - }, - { - "pk": 489, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot", - "parent": null, - "label": "pot" - } - }, - { - "pk": 490, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-a-carene", - "parent": null, - "label": "pot \u00e0 car\u00e8ne" - } - }, - { - "pk": 491, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-a-cuire", - "parent": null, - "label": "pot \u00e0 cuire" - } - }, - { - "pk": 492, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-a-digitations", - "parent": null, - "label": "pot \u00e0 digitations" - } - }, - { - "pk": 493, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-anse", - "parent": null, - "label": "pot ans\u00e9" - } - }, - { - "pk": 494, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-de-chambre", - "parent": null, - "label": "pot de chambre" - } - }, - { - "pk": 497, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-decore", - "parent": null, - "label": "pot d\u00e9cor\u00e9" - } - }, - { - "pk": 495, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-de-fleur", - "parent": null, - "label": "pot de fleur" - } - }, - { - "pk": 496, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-de-poele", - "parent": null, - "label": "pot de po\u00eale" - } - }, - { - "pk": 500, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "poteau", - "parent": null, - "label": "poteau" - } - }, - { - "pk": 501, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "potin", - "parent": null, - "label": "potin" - } - }, - { - "pk": 498, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-tripode", - "parent": null, - "label": "pot tripode" - } - }, - { - "pk": 499, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pot-verseur", - "parent": null, - "label": "pot verseur" - } - }, - { - "pk": 502, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "poutre", - "parent": null, - "label": "poutre" - } - }, - { - "pk": 503, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "prelevement", - "parent": null, - "label": "pr\u00e9l\u00e8vement" - } - }, - { - "pk": 504, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "puits", - "parent": null, - "label": "puits" - } - }, - { - "pk": 505, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "radius", - "parent": null, - "label": "radius" - } - }, - { - "pk": 506, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "rasoir", - "parent": null, - "label": "rasoir" - } - }, - { - "pk": 507, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "rebut-de-fabrication", - "parent": null, - "label": "rebut de fabrication" - } - }, - { - "pk": 508, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "recipient", - "parent": null, - "label": "r\u00e9cipient" - } - }, - { - "pk": 509, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "reduction", - "parent": null, - "label": "r\u00e9duction" - } - }, - { - "pk": 510, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "refus-de-tamis", - "parent": null, - "label": "refus de tamis" - } - }, - { - "pk": 511, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "rivet", - "parent": null, - "label": "rivet" - } - }, - { - "pk": 512, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "rondelle", - "parent": null, - "label": "rondelle" - } - }, - { - "pk": 513, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "rongeur", - "parent": null, - "label": "rongeur" - } - }, - { - "pk": 514, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "rouelle", - "parent": null, - "label": "rouelle" - } - }, - { - "pk": 515, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ruban", - "parent": null, - "label": "ruban" - } - }, - { - "pk": 516, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sabot-animal", - "parent": null, - "label": "sabot (animal)" - } - }, - { - "pk": 517, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sacrum", - "parent": null, - "label": "sacrum" - } - }, - { - "pk": 518, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sarcophage", - "parent": null, - "label": "sarcophage" - } - }, - { - "pk": 519, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "scie", - "parent": null, - "label": "scie" - } - }, - { - "pk": 520, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "scorie", - "parent": null, - "label": "scorie" - } - }, - { - "pk": 521, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "scramasaxe", - "parent": null, - "label": "scramasaxe" - } - }, - { - "pk": 522, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sculpture", - "parent": null, - "label": "sculpture" - } - }, - { - "pk": 523, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "seau", - "parent": null, - "label": "seau" - } - }, - { - "pk": 524, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sediment", - "parent": null, - "label": "s\u00e9diment" - } - }, - { - "pk": 525, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "semelle-de-chaussure", - "parent": null, - "label": "semelle de chaussure" - } - }, - { - "pk": 526, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "serfouette", - "parent": null, - "label": "serfouette *" - } - }, - { - "pk": 527, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "serpette", - "parent": null, - "label": "serpette" - } - }, - { - "pk": 528, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "serrure", - "parent": null, - "label": "serrure" - } - }, - { - "pk": 529, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sifflet", - "parent": null, - "label": "sifflet" - } - }, - { - "pk": 530, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "soc", - "parent": null, - "label": "soc" - } - }, - { - "pk": 531, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "soie", - "parent": null, - "label": "soie" - } - }, - { - "pk": 532, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sol-de-four", - "parent": null, - "label": "sol de four" - } - }, - { - "pk": 533, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sonde", - "parent": null, - "label": "sonde" - } - }, - { - "pk": 534, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "soucoupe", - "parent": null, - "label": "soucoupe" - } - }, - { - "pk": 535, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "spatule", - "parent": null, - "label": "spatule" - } - }, - { - "pk": 536, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "squelette", - "parent": null, - "label": "squelette" - } - }, - { - "pk": 537, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "statuaire-anthropomorphe", - "parent": null, - "label": "statuaire anthropomorphe" - } - }, - { - "pk": 538, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "statuaire-zoomorphe", - "parent": null, - "label": "statuaire zoomorphe" - } - }, - { - "pk": 539, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "statue", - "parent": null, - "label": "statue" - } - }, - { - "pk": 540, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "statuette", - "parent": null, - "label": "statuette" - } - }, - { - "pk": 541, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "stele", - "parent": null, - "label": "st\u00e8le" - } - }, - { - "pk": 542, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sternum", - "parent": null, - "label": "sternum" - } - }, - { - "pk": 543, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "strigile", - "parent": null, - "label": "strigile" - } - }, - { - "pk": 544, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "stylet", - "parent": null, - "label": "stylet" - } - }, - { - "pk": 545, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tabletterie", - "parent": null, - "label": "tabletterie" - } - }, - { - "pk": 546, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "talon", - "parent": null, - "label": "talon" - } - }, - { - "pk": 547, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tariere", - "parent": null, - "label": "tari\u00e8re" - } - }, - { - "pk": 548, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tasse", - "parent": null, - "label": "tasse" - } - }, - { - "pk": 549, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tegulae", - "parent": null, - "label": "tegulae" - } - }, - { - "pk": 550, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "temporaux", - "parent": null, - "label": "temporaux" - } - }, - { - "pk": 551, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "terrazzo", - "parent": null, - "label": "terrazzo" - } - }, - { - "pk": 552, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "terre-cuite-architecturale", - "parent": null, - "label": "terre cuite architecturale" - } - }, - { - "pk": 553, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "terre-rubefiee", - "parent": null, - "label": "terre rub\u00e9fi\u00e9e" - } - }, - { - "pk": 554, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "terrine", - "parent": null, - "label": "terrine " - } - }, - { - "pk": 555, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tesselle", - "parent": null, - "label": "tesselle" - } - }, - { - "pk": 556, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tesson", - "parent": null, - "label": "tesson" - } - }, - { - "pk": 557, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tete", - "parent": null, - "label": "t\u00eate" - } - }, - { - "pk": 558, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "thermometre", - "parent": null, - "label": "thermom\u00e8tre" - } - }, - { - "pk": 559, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "thorax", - "parent": null, - "label": "thorax" - } - }, - { - "pk": 560, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tibia", - "parent": null, - "label": "tibia" - } - }, - { - "pk": 561, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tige", - "parent": null, - "label": "tige" - } - }, - { - "pk": 562, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tissu", - "parent": null, - "label": "tissu" - } - }, - { - "pk": 563, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tole", - "parent": null, - "label": "t\u00f4le" - } - }, - { - "pk": 564, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tombe", - "parent": null, - "label": "tombe" - } - }, - { - "pk": 565, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "torchis", - "parent": null, - "label": "torchis" - } - }, - { - "pk": 566, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "torque", - "parent": null, - "label": "torque" - } - }, - { - "pk": 567, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tranchet", - "parent": null, - "label": "tranchet" - } - }, - { - "pk": 568, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tripode", - "parent": null, - "label": "tripode" - } - }, - { - "pk": 569, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tronc-echantillon", - "parent": null, - "label": "tronc (\u00e9chantillon)" - } - }, - { - "pk": 570, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "truelle", - "parent": null, - "label": "truelle" - } - }, - { - "pk": 571, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tube", - "parent": null, - "label": "tube" - } - }, - { - "pk": 572, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tubulure", - "parent": null, - "label": "tubulure" - } - }, - { - "pk": 573, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tuile", - "parent": null, - "label": "tuile" - } - }, - { - "pk": 574, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tuile-a-crochet", - "parent": null, - "label": "tuile \u00e0 crochet" - } - }, - { - "pk": 575, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tuile-canal", - "parent": null, - "label": "tuile canal" - } - }, - { - "pk": 576, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tuile-mecanique", - "parent": null, - "label": "tuile m\u00e9canique" - } - }, - { - "pk": 577, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tuile-plate", - "parent": null, - "label": "tuile plate" - } - }, - { - "pk": 578, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tuile-ronde", - "parent": null, - "label": "tuile ronde" - } - }, - { - "pk": 579, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tuyau", - "parent": null, - "label": "tuyau" - } - }, - { - "pk": 580, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tuyau-de-pipe", - "parent": null, - "label": "tuyau de pipe" - } - }, - { - "pk": 581, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ulnas", - "parent": null, - "label": "ulnas" - } - }, - { - "pk": 582, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "urne", - "parent": null, - "label": "urne" - } - }, - { - "pk": 583, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "urne-cineraire", - "parent": null, - "label": "urne cin\u00e9raire" - } - }, - { - "pk": 584, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "vaisselle", - "parent": null, - "label": "vaisselle" - } - }, - { - "pk": 585, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "vase", - "parent": null, - "label": "vase" - } - }, - { - "pk": 586, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "vase-silo", - "parent": null, - "label": "vase silo" - } - }, - { - "pk": 587, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "verre-a-boire", - "parent": null, - "label": "verre (\u00e0 boire)" - } - }, - { - "pk": 588, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "verre-a-jambe", - "parent": null, - "label": "verre \u00e0 jambe" - } - }, - { - "pk": 589, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "verre-a-pied", - "parent": null, - "label": "verre \u00e0 pied" - } - }, - { - "pk": 591, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "verre-apode", - "parent": null, - "label": "verre apode" - } - }, - { - "pk": 590, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "verre-a-vitre", - "parent": null, - "label": "verre \u00e0 vitre" - } - }, - { - "pk": 592, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "verre-fondu", - "parent": null, - "label": "verre fondu" - } - }, - { - "pk": 593, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "verre-plat", - "parent": null, - "label": "verre plat" - } - }, - { - "pk": 594, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "vertebre", - "parent": null, - "label": "vert\u00e8bre" - } - }, - { - "pk": 595, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "virole", - "parent": null, - "label": "virole" - } - }, - { - "pk": 596, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "vitrail", - "parent": null, - "label": "vitrail" - } - }, - { - "pk": 597, - "model": "archaeological_finds.objecttype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "vitre", - "parent": null, - "label": "vitre" - } - }, - { - "pk": 5, - "model": "archaeological_finds.integritytype", - "fields": { - "comment": "N'est plus pr\u00e9sent : perdu ?", - "available": true, - "txt_idx": "not_there", - "label": "Absent" - } - }, - { - "pk": 2, - "model": "archaeological_finds.integritytype", - "fields": { - "comment": "Il est possible d'en reconstituer la forme compl\u00e8te avec une approximation acceptable (et ma\u00eetris\u00e9e)", - "available": true, - "txt_idx": "archaeo_complete", - "label": "Arch\u00e9ologiquement complet" - } - }, - { - "pk": 1, - "model": "archaeological_finds.integritytype", - "fields": { - "comment": "Int\u00e9grit\u00e9 totale", - "available": true, - "txt_idx": "complete", - "label": "Complet" - } - }, - { - "pk": 4, - "model": "archaeological_finds.integritytype", - "fields": { - "comment": "Rien \u00e0 tirer de cela : m\u00eame pas pour l'\u00e9tude de la mati\u00e8re", - "available": true, - "txt_idx": "lost_for_science", - "label": "\"Perdu pour la science\"" - } - }, - { - "pk": 3, - "model": "archaeological_finds.integritytype", - "fields": { - "comment": "La forme de l'objet est perdue", - "available": true, - "txt_idx": "integrity_lost", - "label": "Perte d'int\u00e9grit\u00e9 totale" - } - }, - { - "pk": 1, - "model": "archaeological_finds.batchtype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "inconnu", - "order": 0, - "label": "Inconnu" - } - }, - { - "pk": 2, - "model": "archaeological_finds.batchtype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "objet", - "order": 1, - "label": "Objet" - } - }, - { - "pk": 3, - "model": "archaeological_finds.batchtype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lot", - "order": 2, - "label": "Lot" - } - }, - { - "pk": 1, - "model": "archaeological_finds.treatmentfiletype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "loan_demand_study", - "label": "Demande de pr\u00eat pour \u00e9tude" - } - }, - { - "pk": 2, - "model": "archaeological_finds.treatmentfiletype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "loan_demand_exposure", - "label": "Demande de pr\u00eat pour exposition" - } - }, - { - "pk": 3, - "model": "archaeological_finds.treatmentfiletype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "gift_wish", - "label": "Intention de donation" - } - } -]
\ No newline at end of file +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Min\u00e9ral", + "txt_idx": "mineral", + "comment": "", + "available": true, + "code": "M.MI", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Organique", + "txt_idx": "organic", + "comment": "", + "available": true, + "code": "M.OG", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Terre cuite", + "txt_idx": "earthenware", + "comment": "", + "available": true, + "code": "M.TC", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "M\u00e9tal", + "txt_idx": "metal", + "comment": "", + "available": true, + "code": "M.MT", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Verre", + "txt_idx": "glass", + "comment": "", + "available": true, + "code": "M.VR", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Autre", + "txt_idx": "other", + "comment": "Tout ce qui ne rentre pas dans les autres cases...", + "available": true, + "code": "M.AT", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Ind\u00e9termin\u00e9", + "txt_idx": "unknown", + "comment": "Tout ce qui n'a pas pu \u00eatre identifi\u00e9, qui est ind\u00e9terminable \u00e0 ce jour (semble t-il)", + "available": true, + "code": "M.ID", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Non \u00e9tudi\u00e9", + "txt_idx": "not_studied", + "comment": "Type de mat\u00e9riau inconnu car non \u00e9tudi\u00e9", + "available": true, + "code": "M.?", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Lithique", + "txt_idx": "lithic", + "comment": "Tout ce qui a rapport \u00e0 la pierre, \u00e0 la taille et \u00e0 l'industrie de la pierre durant la pr\u00e9histoire (ou plus r\u00e9cemment d'ailleurs)", + "available": true, + "code": "M.LT", + "recommendation": "", + "parent": [ + "mineral" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Lapidaire", + "txt_idx": "lapidary", + "comment": "Tout \u00e9l\u00e9ment en pierre intervenant dans la construction : pierre taill\u00e9e, moellon, pierre sculpt\u00e9e, statue \u2026", + "available": true, + "code": "M.LP", + "recommendation": "", + "parent": [ + "mineral" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Pierre autre", + "txt_idx": "other_stone", + "comment": "Tout ce qui n'est ni de l'industrie lithique, ni de la pierre de construction : meule, vaisselle, objet manufactur\u00e9 \u2026", + "available": true, + "code": "M.MI", + "recommendation": "", + "parent": [ + "mineral" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Organique travaill\u00e9", + "txt_idx": "organicwork", + "comment": "Cuir, tissu, tabletterie, vannerie, cordage, bois (hors construction), tout objet travaill\u00e9 (transform\u00e9) en mat\u00e9riau organique", + "available": true, + "code": "M.OG", + "recommendation": "", + "parent": [ + "organic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Organique non travaill\u00e9", + "txt_idx": "raw_organic", + "comment": "Mat\u00e9riaux naturels et de nature biologique (mnnb). Tout objet organique brut : os humain, reste de boucherie, graine, coquillage, corne \u2026", + "available": true, + "code": "M.OG", + "recommendation": "", + "parent": [ + "organic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "C\u00e9ramique", + "txt_idx": "ceramic", + "comment": "Toute la vaisselle c\u00e9ramique y compris les amphores", + "available": true, + "code": "M.TC", + "recommendation": "", + "parent": [ + "earthenware" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Terre cuite architecturale", + "txt_idx": "architect_earthenwork", + "comment": "Mat\u00e9riaux de construction en terre cuite", + "available": true, + "code": "M.TC", + "recommendation": "", + "parent": [ + "earthenware" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Terre cuite autre", + "txt_idx": "other_earthenwork", + "comment": "Tout ce qui n'est ni de la vaisselle c\u00e9ramique, ni de la TCA : peson, statuette, jouet \u2026", + "available": true, + "code": "M.TC", + "recommendation": "", + "parent": [ + "earthenware" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "M\u00e9tal non ferreux", + "txt_idx": "not_iron_metal", + "comment": "Tout objet en m\u00e9tal non ferreux", + "available": true, + "code": "M.MT", + "recommendation": "", + "parent": [ + "metal" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "M\u00e9tal ferreux", + "txt_idx": "iron_metal", + "comment": "Tout objet en m\u00e9tal ferreux", + "available": true, + "code": "M.MT", + "recommendation": "", + "parent": [ + "metal" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Mon\u00e9taire", + "txt_idx": "monetary", + "comment": "Monnaies, jetons \u00e0 compter, poids mon\u00e9taires, coins", + "available": true, + "code": "M.MT", + "recommendation": "", + "parent": [ + "metal" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Verre construction", + "txt_idx": "glass_constr", + "comment": "Tout objet en verre li\u00e9 \u00e0 la construction : vitrage \u2026", + "available": true, + "code": "M.VR", + "recommendation": "", + "parent": [ + "glass" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Verre autre", + "txt_idx": "glass_other", + "comment": "Tout objet en verre autre que le verre li\u00e9 \u00e0 la construction : vaisselle \u2026", + "available": true, + "code": "M.VR", + "recommendation": "", + "parent": [ + "glass" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Mat\u00e9riaux de construction autre", + "txt_idx": "constr_material", + "comment": "Tout mat\u00e9riau de construction qui n'est ni de la pierre, ni de la TCA, ni du verre : terre crue, torchis, pl\u00e2tre, enduit peint, mosa\u00efque, bois ...", + "available": true, + "code": "M.AT", + "recommendation": "", + "parent": [ + "other" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Synth\u00e9tique", + "txt_idx": "synthetic", + "comment": "Plastique \u2026", + "available": true, + "code": "M.AT", + "recommendation": "", + "parent": [ + "other" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Enduit peint", + "txt_idx": "painted_plaster", + "comment": "", + "available": true, + "code": "M.EP", + "recommendation": "", + "parent": [ + "constr_material" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Pr\u00e9l\u00e8vement trait\u00e9 et \u00e9tudi\u00e9", + "txt_idx": "sampling_processed_studied", + "comment": "", + "available": true, + "code": "P.TE", + "recommendation": "", + "parent": [ + "other" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Pr\u00e9l\u00e8vement trait\u00e9 non \u00e9tudi\u00e9", + "txt_idx": "sampling_processed_not_studied", + "comment": "", + "available": true, + "code": "P.NE", + "recommendation": "", + "parent": [ + "other" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Pr\u00e9l\u00e8vement non trait\u00e9", + "txt_idx": "sampling_not_processed", + "comment": "", + "available": true, + "code": "P.NT", + "recommendation": "", + "parent": [ + "other" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Os non travaill\u00e9", + "txt_idx": "unworked_bone", + "comment": "", + "available": true, + "code": "M.OS", + "recommendation": "", + "parent": [ + "raw_organic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Os travaill\u00e9", + "txt_idx": "bonework", + "comment": "", + "available": true, + "code": "M.OS", + "recommendation": "", + "parent": [ + "organicwork" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Os humain", + "txt_idx": "human_bone", + "comment": "", + "available": true, + "code": "M.OS", + "recommendation": "", + "parent": [ + "unworked_bone" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Faune", + "txt_idx": "animal_bone", + "comment": "", + "available": true, + "code": "M.OS", + "recommendation": "", + "parent": [ + "unworked_bone" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Cuir", + "txt_idx": "leather", + "comment": "", + "available": true, + "code": "M.OG", + "recommendation": "", + "parent": [ + "organicwork" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Alliage cuivreux", + "txt_idx": "copper-alloy", + "comment": "", + "available": true, + "code": "M.MT", + "recommendation": "", + "parent": [ + "not_iron_metal" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Composite", + "txt_idx": "composite", + "comment": "Fait de plusieurs mati\u00e8res", + "available": true, + "code": "CP", + "recommendation": "", + "parent": null + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Charbon de bois", + "txt_idx": "charcoal", + "comment": "", + "available": true, + "code": "M.OG", + "recommendation": "\u00c9viter l'\u00e9crasement", + "parent": [ + "raw_organic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Graine", + "txt_idx": "seed", + "comment": "", + "available": true, + "code": "M.OG", + "recommendation": "Hygrom\u00e9trie \u00e0 contr\u00f4ler, \u00e9viter l'\u00e9crasement", + "parent": [ + "raw_organic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Fer", + "txt_idx": "Iron", + "comment": "", + "available": true, + "code": "M.MT", + "recommendation": "", + "parent": [ + "iron_metal" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Fonte", + "txt_idx": "cast_iron", + "comment": "", + "available": true, + "code": "M.MT", + "recommendation": "", + "parent": [ + "iron_metal" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Bois non travaill\u00e9", + "txt_idx": "wood", + "comment": "", + "available": true, + "code": "M.OG", + "recommendation": "", + "parent": [ + "raw_organic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Bois travaill\u00e9", + "txt_idx": "shaped_wood", + "comment": "", + "available": true, + "code": "M.OG", + "recommendation": "", + "parent": [ + "organicwork" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Porcelaine", + "txt_idx": "porcelain", + "comment": "", + "available": true, + "code": "M.TC", + "recommendation": "", + "parent": [ + "ceramic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Fa\u00efence", + "txt_idx": "faience", + "comment": "", + "available": true, + "code": "M.TC", + "recommendation": "", + "parent": [ + "ceramic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Gr\u00e8s c\u00e9ramique", + "txt_idx": "stoneware", + "comment": "", + "available": true, + "code": "M.TC", + "recommendation": "", + "parent": [ + "ceramic" + ] + } +}, +{ + "model": "archaeological_finds.materialtype", + "fields": { + "label": "Bronze", + "txt_idx": "brz", + "comment": "", + "available": true, + "code": "BRZ", + "recommendation": "", + "parent": [ + "copper-alloy" + ] + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Conditionnement", + "txt_idx": "packaging", + "comment": "Le fait de mettre du mobilier dans un contenant. Que cela soit le conditionnement initial ou un re-conditionnement. ", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Prises de vue", + "txt_idx": "shooting", + "comment": "", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Radiographie", + "txt_idx": "radioX", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "shooting" + ], + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "D\u00e9placement", + "txt_idx": "moving", + "comment": "D\u00e9placement de mobilier, entre deux d\u00e9p\u00f4ts : le mobilier ne peut pas \u00eatre stock\u00e9 ailleurs que dans un lieu consid\u00e9r\u00e9 comme un d\u00e9p\u00f4t.", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Groupement virtuel", + "txt_idx": "virtual_group", + "comment": "Regroupement d'un ensemble de mobilier. Exemple : ensemble des outils provenant d'une fouille, mobilier datant d'un site, tessonier virtuel, etc.", + "available": true, + "order": 10, + "parent": null, + "virtual": true, + "upstream_is_many": true, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Groupement", + "txt_idx": "physical_grouping", + "comment": "R\u00e9union de plusieurs objets ou lots mobiliers en un seul. Ce type de traitement peut impliquer ou non un reconditionnement.\r\n\r\nExemple : Remontage d'une c\u00e9ramique \u00e0 partir de tessons d\u00e9j\u00e0 pr\u00e9sents dans un contenant (pas de reconditionnement), regroupement d'une partie de la faune (os) d'une op\u00e9ration et cr\u00e9ation d'une nouvelle caisse dans ce but (reconditionnement \u00e0 faire).", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": true, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Division", + "txt_idx": "split", + "comment": "Division d'un lot de mobilier en plusieurs lots.", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": true + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "D\u00e9salinisation", + "txt_idx": "desalinisation", + "comment": "Processus qui permet d'\u00e9liminer le sel qui impr\u00e8gne un objet arch\u00e9ologique ou un lot d'objets.", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "\u00c9lectrolyse", + "txt_idx": "electrolysis", + "comment": "R\u00e9duction des oxydes d\u00e9velopp\u00e9s sur/dans un objet arch\u00e9ologique par l'usage de courant \u00e9lectrique.", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Remontage", + "txt_idx": "reassembly", + "comment": "Regroupement d\u2019\u00e9l\u00e9ments afin d'en remonter un. Ceci traduit le remontage physique des \u00e9l\u00e9ments. Ils constituent dor\u00e9navant un seul objet issu du remontage de plusieurs.", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": true, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Lavage", + "txt_idx": "washing", + "comment": "Action de nettoyer le mobilier, d'ordinaire \u00e0 l'eau", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Consultation sur place", + "txt_idx": "local_consultation", + "comment": "", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Marquage", + "txt_idx": "marking", + "comment": "", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Conservation-restauration", + "txt_idx": "conservation", + "comment": "", + "available": true, + "order": 10, + "parent": null, + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Radiographie argentique", + "txt_idx": "regular_x_ray", + "comment": "Radiographie (rayon X) qui produit un ou des films radio.", + "available": true, + "order": 10, + "parent": [ + "radioX" + ], + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Photographie", + "txt_idx": "photo", + "comment": "", + "available": true, + "order": 10, + "parent": [ + "shooting" + ], + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Radiographie num\u00e9rique", + "txt_idx": "digital_x_ray", + "comment": "Radiographie (rayon X) qui produit un ou des fichiers num\u00e9riques.", + "available": true, + "order": 10, + "parent": [ + "radioX" + ], + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Remontage virtuel", + "txt_idx": "virtual-reassembly", + "comment": "Remontage virtuel : on sait que les \u00e9l\u00e9ments remontent ensemble, mais il n'y a pas eu de remontage physique p\u00e9renne.", + "available": true, + "order": 10, + "parent": null, + "virtual": true, + "upstream_is_many": true, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Photographie argentique", + "txt_idx": "regular_photography", + "comment": "Photographie produisant un film (positif ou n\u00e9gatif).", + "available": true, + "order": 10, + "parent": [ + "photo" + ], + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmenttype", + "fields": { + "label": "Photographie num\u00e9rique", + "txt_idx": "digital_photography", + "comment": "Prise de vue \u00e0 l'aide d'un appareil photo num\u00e9rique.", + "available": true, + "order": 10, + "parent": [ + "photo" + ], + "virtual": false, + "upstream_is_many": false, + "downstream_is_many": false + } +}, +{ + "model": "archaeological_finds.treatmentstate", + "fields": { + "label": "Pr\u00e9vu", + "txt_idx": "planned", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.treatmentstate", + "fields": { + "label": "En cours", + "txt_idx": "in_progress", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.treatmentstate", + "fields": { + "label": "Achev\u00e9", + "txt_idx": "completed", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.treatmentstate", + "fields": { + "label": "Inconnu", + "txt_idx": "unknown", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.treatmentstate", + "fields": { + "label": "\u00c0 confirmer", + "txt_idx": "to_be_confirmed", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.treatmentstate", + "fields": { + "label": "Abandonn\u00e9", + "txt_idx": "cancelled", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.conservatorystate", + "fields": { + "label": "Inconnu", + "txt_idx": "unknown", + "comment": "L\u2019\u00e9tat de l\u2019objet est \u00e0 d\u00e9terminer.", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.conservatorystate", + "fields": { + "label": "Stable", + "txt_idx": "stable", + "comment": "L\u2019\u00e9tat de l\u2019objet est stable.", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.conservatorystate", + "fields": { + "label": "Instable", + "txt_idx": "unstable", + "comment": "L\u2019\u00e9tat de l\u2019objet n\u00e9cessite un traitement pr\u00e9ventif.", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.conservatorystate", + "fields": { + "label": "Critique", + "txt_idx": "critical", + "comment": "L\u2019\u00e9tat de l\u2019objet n\u00e9cessite un traitement pr\u00e9ventif et/ou curatif.", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.remarkabilitytype", + "fields": { + "label": "Mus\u00e9able", + "txt_idx": "museable", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.preservationtype", + "fields": { + "label": "Ind\u00e9termin\u00e9", + "txt_idx": "unknown", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.preservationtype", + "fields": { + "label": "\u00c0 reconditionner", + "txt_idx": "recond", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.preservationtype", + "fields": { + "label": "\u00c0 stabiliser", + "txt_idx": "to_stab", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.preservationtype", + "fields": { + "label": "\u00c0 restaurer", + "txt_idx": "to_restaur", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.preservationtype", + "fields": { + "label": "\u00c0 laver", + "txt_idx": "to_wash", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ancre", + "txt_idx": "ancre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "abreuvoir", + "txt_idx": "abreuvoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "accessoire de toilette", + "txt_idx": "accessoire-de-toilette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "aff\u00fbtoir", + "txt_idx": "affutoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "agrafe", + "txt_idx": "agrafe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "aiguille", + "txt_idx": "aiguille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "aiguille \u00e0 chas", + "txt_idx": "aiguille-a-chas", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "aiguisoir", + "txt_idx": "aiguisoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "albarel", + "txt_idx": "albarel", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "al\u00eane", + "txt_idx": "alene", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "amphore", + "txt_idx": "amphore", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "amphorette", + "txt_idx": "amphorette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "andouillet", + "txt_idx": "andouillet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "angon", + "txt_idx": "angon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "anneau", + "txt_idx": "anneau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "anse", + "txt_idx": "anse", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "applique", + "txt_idx": "applique", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "appui de fen\u00eatre", + "txt_idx": "appui-de-fenetre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ardillon", + "txt_idx": "ardillon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ardoise", + "txt_idx": "ardoise", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ardoise de couverture", + "txt_idx": "ardoise-de-couverture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "argile", + "txt_idx": "argile", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "argile br\u00fbl\u00e9", + "txt_idx": "argile-brule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "armille", + "txt_idx": "armille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "arrache-clous ", + "txt_idx": "arrache-clous", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "assiette", + "txt_idx": "assiette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "attache", + "txt_idx": "attache", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "aum\u00f4ni\u00e8re ", + "txt_idx": "aumoniere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "avifaune (oiseau)", + "txt_idx": "avifaune-oiseau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "axe d'une meule et licotin", + "txt_idx": "axe-dune-meule-et-licotin", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bague", + "txt_idx": "bague", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "balance", + "txt_idx": "balance", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "balle", + "txt_idx": "balle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "balsamaire", + "txt_idx": "balsamaire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "balustrade", + "txt_idx": "balustrade", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bandage de roue", + "txt_idx": "bandage-de-roue", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "barbacane", + "txt_idx": "barbacane", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "barre", + "txt_idx": "barre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "barrette", + "txt_idx": "barrette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "barrette de fourreau", + "txt_idx": "barrette-de-fourreau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "basalte", + "txt_idx": "basalte", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "base", + "txt_idx": "base", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "base de colonne", + "txt_idx": "base-de-colonne", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bassin", + "txt_idx": "bassin", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "b\u00e2ton d'ocre", + "txt_idx": "baton-docre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "battitures", + "txt_idx": "battitures", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bec verseur", + "txt_idx": "bec-verseur", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "b\u00eache", + "txt_idx": "beche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "b\u00e9li\u00e8re", + "txt_idx": "beliere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "biface", + "txt_idx": "biface", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bille", + "txt_idx": "bille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bloc", + "txt_idx": "bloc", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bloc sculpt\u00e9", + "txt_idx": "bloc-sculpte", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bloc taill\u00e9", + "txt_idx": "bloc-taille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bobine \u00e0 fil", + "txt_idx": "bobine-a-fil", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bocal", + "txt_idx": "bocal", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bocal \u00e0 pharmacie", + "txt_idx": "bocal-a-pharmacie", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bois", + "txt_idx": "bois", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bois de cerf", + "txt_idx": "bois-de-cerf", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bois de construction", + "txt_idx": "bois-de-construction", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bo\u00eete", + "txt_idx": "boite", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bol", + "txt_idx": "bol", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bonnet", + "txt_idx": "bonnet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bord ", + "txt_idx": "bord", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bordure", + "txt_idx": "bordure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boucharde ou \u00e9clat", + "txt_idx": "boucharde-ou-eclat", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bouchon", + "txt_idx": "bouchon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boucle", + "txt_idx": "boucle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boucle d'oreille", + "txt_idx": "boucle-doreille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boucle d'harnachement", + "txt_idx": "boucle-dharnachement", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boucle de ceinture", + "txt_idx": "boucle-de-ceinture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boucle de chaussure", + "txt_idx": "boucle-de-chaussure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boucle en 8", + "txt_idx": "boucle-en-8", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boudins", + "txt_idx": "boudins", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bougeoir", + "txt_idx": "bougeoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boule", + "txt_idx": "boule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boulet", + "txt_idx": "boulet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boulet de canon", + "txt_idx": "boulet-de-canon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "boulette", + "txt_idx": "boulette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bouteille", + "txt_idx": "bouteille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bouterolle", + "txt_idx": "bouterolle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bouton", + "txt_idx": "bouton", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bovid\u00e9", + "txt_idx": "bovide", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bracelet", + "txt_idx": "bracelet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "branche", + "txt_idx": "branche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bride", + "txt_idx": "bride", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "brides d'attaches", + "txt_idx": "brides-dattaches", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "brique", + "txt_idx": "brique", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "briquet", + "txt_idx": "briquet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "briquetage (\u00e9l\u00e9ment)", + "txt_idx": "briquetage-element", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "broche", + "txt_idx": "broche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "broyon", + "txt_idx": "broyon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "bulle pontificale", + "txt_idx": "bulle-pontificale", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "burin", + "txt_idx": "burin", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "buste", + "txt_idx": "buste", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cabochon", + "txt_idx": "cabochon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cadenas", + "txt_idx": "cadenas", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "calage", + "txt_idx": "calage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "calcaire moulur\u00e9", + "txt_idx": "calcaire-moulure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cale", + "txt_idx": "cale", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "calice", + "txt_idx": "calice", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "calotte cr\u00e2nienne et fibula", + "txt_idx": "calotte-cranienne-et-fibula", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "canalisation", + "txt_idx": "canalisation", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "canon", + "txt_idx": "canon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "caquelon", + "txt_idx": "caquelon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carafe", + "txt_idx": "carafe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "car\u00e8ne", + "txt_idx": "carene", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carreau", + "txt_idx": "carreau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carreau d'arbal\u00e8te", + "txt_idx": "carreau-darbalete", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carreau d'angle", + "txt_idx": "carreau-dangle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carreau de pavement", + "txt_idx": "carreau-de-pavement", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carreau de po\u00eale", + "txt_idx": "carreau-de-poele", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carreau double", + "txt_idx": "carreau-double", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carreau-bol", + "txt_idx": "carreau-bol", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "carrelage", + "txt_idx": "carrelage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cartouche", + "txt_idx": "cartouche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "casque", + "txt_idx": "casque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "casson", + "txt_idx": "casson", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cavalier", + "txt_idx": "cavalier", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ceinture", + "txt_idx": "ceinture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cerclage", + "txt_idx": "cerclage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cercle", + "txt_idx": "cercle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "c\u00e9r\u00e9ales", + "txt_idx": "cereales", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cervid\u00e9", + "txt_idx": "cervide", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cha\u00eene", + "txt_idx": "chaine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cha\u00eenette", + "txt_idx": "chainette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chandelier", + "txt_idx": "chandelier", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chape", + "txt_idx": "chape", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chapelet", + "txt_idx": "chapelet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chapiteau", + "txt_idx": "chapiteau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "charbon", + "txt_idx": "charbon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "charni\u00e8re", + "txt_idx": "charniere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chat (t\u00eate)", + "txt_idx": "chat-tete", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ch\u00e2telaine", + "txt_idx": "chatelaine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chaton", + "txt_idx": "chaton", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chaudron", + "txt_idx": "chaudron", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chaussure", + "txt_idx": "chaussure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chenet", + "txt_idx": "chenet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cheveux", + "txt_idx": "cheveux", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cheville", + "txt_idx": "cheville", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "chien", + "txt_idx": "chien", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "christ en croix", + "txt_idx": "christ-en-croix", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ciboire", + "txt_idx": "ciboire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ciseau", + "txt_idx": "ciseau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ciseaux plat", + "txt_idx": "ciseaux-plat", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ciste", + "txt_idx": "ciste", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "clarine ", + "txt_idx": "clarine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "claveau", + "txt_idx": "claveau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "clavette", + "txt_idx": "clavette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "clavicule", + "txt_idx": "clavicule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cl\u00e9", + "txt_idx": "cle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cl\u00e9 bague", + "txt_idx": "cle-bague", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cl\u00e9 de vo\u00fbte", + "txt_idx": "cle-de-voute", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cloche", + "txt_idx": "cloche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "clochette", + "txt_idx": "clochette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "clou", + "txt_idx": "clou", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coffret", + "txt_idx": "coffret", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coin", + "txt_idx": "coin", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "col", + "txt_idx": "col", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "collier", + "txt_idx": "collier", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "colonne", + "txt_idx": "colonne", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "colonnette", + "txt_idx": "colonnette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "c\u00f4ne", + "txt_idx": "cone", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "contre plaque", + "txt_idx": "contre-plaque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "copeau", + "txt_idx": "copeau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coprolithes", + "txt_idx": "coprolithes", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coquemar tripode", + "txt_idx": "coquemar-tripode", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coquillage (conchyliologie)", + "txt_idx": "coquillage-conchyliologie", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "corne", + "txt_idx": "corne", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "corne d'appel", + "txt_idx": "corne-dappel", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cornet", + "txt_idx": "cornet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "corni\u00e8re", + "txt_idx": "corniere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "c\u00f4te", + "txt_idx": "cote", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coulure", + "txt_idx": "coulure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coupe", + "txt_idx": "coupe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coupelle", + "txt_idx": "coupelle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "couteau", + "txt_idx": "couteau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "couvercle", + "txt_idx": "couvercle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "couvre feu", + "txt_idx": "couvre-feu", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "couvre joint", + "txt_idx": "couvre-joint", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "coxal", + "txt_idx": "coxal", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "crampon", + "txt_idx": "crampon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cr\u00e2ne", + "txt_idx": "crane", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "crapaudine", + "txt_idx": "crapaudine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cr\u00e9maill\u00e8re ( \u00e9l\u00e9ment de )", + "txt_idx": "cremaillere-element-de", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "creuset", + "txt_idx": "creuset", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "crochet", + "txt_idx": "crochet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "croix", + "txt_idx": "croix", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "croix de lorraine", + "txt_idx": "croix-de-lorraine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cruche", + "txt_idx": "cruche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "crucifix", + "txt_idx": "crucifix", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cuill\u00e8re", + "txt_idx": "cuillere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cuirasse", + "txt_idx": "cuirasse", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "culot", + "txt_idx": "culot", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "culot de forge", + "txt_idx": "culot-de-forge", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "curette", + "txt_idx": "curette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cuve", + "txt_idx": "cuve", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "cylindre", + "txt_idx": "cylindre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "dallage", + "txt_idx": "dallage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "dalle", + "txt_idx": "dalle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "d\u00e9 \u00e0 coudre", + "txt_idx": "de-a-coudre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "d\u00e9 \u00e0 jouer", + "txt_idx": "de-a-jouer", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "d\u00e9chet chute de sciage", + "txt_idx": "dechet-chute-de-sciage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "d\u00e9chet de coul\u00e9", + "txt_idx": "dechet-de-coule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "d\u00e9chets de forge", + "txt_idx": "dechets-de-forge", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "d\u00e9cor sculpt\u00e9", + "txt_idx": "decor-sculpte", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "d\u00e9gorgeoir", + "txt_idx": "degorgeoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "dent", + "txt_idx": "dent", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "disque", + "txt_idx": "disque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "divers", + "txt_idx": "divers", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "divinit\u00e9", + "txt_idx": "divinite", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "dogger", + "txt_idx": "dogger", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "dolia", + "txt_idx": "dolia", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "dolium", + "txt_idx": "dolium", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "douelle", + "txt_idx": "douelle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "douille", + "txt_idx": "douille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9bauche", + "txt_idx": "ebauche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9chantillon", + "txt_idx": "echantillon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9clat", + "txt_idx": "eclat", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9cuelle", + "txt_idx": "ecuelle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9cusson", + "txt_idx": "ecusson", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9l\u00e9ment architectural", + "txt_idx": "element-architectural", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9l\u00e9ment d'harnachement", + "txt_idx": "element-dharnachement", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9l\u00e9ment de char", + "txt_idx": "element-de-char", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "embarcation", + "txt_idx": "embarcation", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "empreinte de pas", + "txt_idx": "empreinte-de-pas", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "enclume", + "txt_idx": "enclume", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "enduit", + "txt_idx": "enduit", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "enseigne de p\u00e8lerinage", + "txt_idx": "enseigne-de-pelerinage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9paule", + "txt_idx": "epaule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9p\u00e9e", + "txt_idx": "epee", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9peron", + "txt_idx": "eperon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9pingle", + "txt_idx": "epingle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9quid\u00e9", + "txt_idx": "equide", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "escargot", + "txt_idx": "escargot", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "esquille", + "txt_idx": "esquille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "esse", + "txt_idx": "esse", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "estampille", + "txt_idx": "estampille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "\u00e9trier", + "txt_idx": "etrier", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ex voto", + "txt_idx": "ex-voto", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fabricat", + "txt_idx": "fabricat", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "faisselle", + "txt_idx": "faisselle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fascine", + "txt_idx": "fascine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fauchard", + "txt_idx": "fauchard", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "faucille", + "txt_idx": "faucille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "faune", + "txt_idx": "faune", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "f\u00e9mur", + "txt_idx": "femur", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fer \u00e0 cheval", + "txt_idx": "fer-a-cheval", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fer d'\u00e9quid\u00e9", + "txt_idx": "fer-dequide", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fer de lance", + "txt_idx": "fer-de-lance", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ferret", + "txt_idx": "ferret", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ferrure (\u00e9l\u00e9ment)", + "txt_idx": "ferrure-element", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "feuillard", + "txt_idx": "feuillard", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "feuille", + "txt_idx": "feuille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fiasque", + "txt_idx": "fiasque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fibulas", + "txt_idx": "fibulas", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fibule", + "txt_idx": "fibule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fiche", + "txt_idx": "fiche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fiche \u00e0 b\u00e9li\u00e8re", + "txt_idx": "fiche-a-beliere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "figurine", + "txt_idx": "figurine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fil", + "txt_idx": "fil", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fiole", + "txt_idx": "fiole", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "flacon", + "txt_idx": "flacon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fl\u00e9au de balance", + "txt_idx": "fleau-de-balance", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fl\u00e8che", + "txt_idx": "fleche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fl\u00fbte", + "txt_idx": "flute", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fond", + "txt_idx": "fond", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "force", + "txt_idx": "force", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "four", + "txt_idx": "four", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fourche", + "txt_idx": "fourche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fourreau", + "txt_idx": "fourreau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "foyer", + "txt_idx": "foyer", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "francisque", + "txt_idx": "francisque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "frette", + "txt_idx": "frette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "frise d'architrave", + "txt_idx": "frise-darchitrave", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "furgeoire", + "txt_idx": "furgeoire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fusa\u00efole", + "txt_idx": "fusaiole", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "fus\u00e9e d'obus", + "txt_idx": "fusee-dobus", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "f\u00fbt de colonne", + "txt_idx": "fut-de-colonne", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "galet", + "txt_idx": "galet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "garniture", + "txt_idx": "garniture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "garniture de bouton", + "txt_idx": "garniture-de-bouton", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "garniture de ceinture", + "txt_idx": "garniture-de-ceinture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gast\u00e9ropode (escargot)", + "txt_idx": "gasteropode-escargot", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gland", + "txt_idx": "gland", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gobelet", + "txt_idx": "gobelet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gobelet de po\u00eale", + "txt_idx": "gobelet-de-poele", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gond", + "txt_idx": "gond", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gouge", + "txt_idx": "gouge", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "goulot", + "txt_idx": "goulot", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "goutte de verre", + "txt_idx": "goutte-de-verre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "goutti\u00e8re", + "txt_idx": "gouttiere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "grain de chapelet", + "txt_idx": "grain-de-chapelet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "graine", + "txt_idx": "graine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "grattoir", + "txt_idx": "grattoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gravier ", + "txt_idx": "gravier", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gravure", + "txt_idx": "gravure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "grelot", + "txt_idx": "grelot", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "grille", + "txt_idx": "grille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gros lithique", + "txt_idx": "gros-lithique", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "gryph\u00e9es", + "txt_idx": "gryphees", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "guimbarde", + "txt_idx": "guimbarde", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "hache", + "txt_idx": "hache", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "hame\u00e7on", + "txt_idx": "hamecon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "herminette", + "txt_idx": "herminette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "herse", + "txt_idx": "herse", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "hipposandale", + "txt_idx": "hipposandale", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "hu\u00eetre", + "txt_idx": "huitre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "hum\u00e9rus", + "txt_idx": "humerus", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ichtyofaune (poisson)", + "txt_idx": "ichtyofaune-poisson", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "imbrex", + "txt_idx": "imbrex", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "incin\u00e9ration (pr\u00e9l\u00e8vement)", + "txt_idx": "incineration-prelevement", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ind\u00e9termin\u00e9", + "txt_idx": "indetermine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "inhumation", + "txt_idx": "inhumation", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "inscription", + "txt_idx": "inscription", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "intaille", + "txt_idx": "intaille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "jambage", + "txt_idx": "jambage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "jambi\u00e8re", + "txt_idx": "jambiere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "jante", + "txt_idx": "jante", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "jarre", + "txt_idx": "jarre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "jatte", + "txt_idx": "jatte", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "jeton", + "txt_idx": "jeton", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "joug", + "txt_idx": "joug", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "kugeltopf", + "txt_idx": "kugeltopf", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lacrymaire", + "txt_idx": "lacrymaire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lame", + "txt_idx": "lame", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lamelle", + "txt_idx": "lamelle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lampe", + "txt_idx": "lampe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lampe \u00e0 huile", + "txt_idx": "lampe-a-huile", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lance", + "txt_idx": "lance", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "languette", + "txt_idx": "languette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lapidaire", + "txt_idx": "lapidaire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lapidaire (\u00e9l\u00e9ment)", + "txt_idx": "lapidaire-element", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "l\u00e8chefrite", + "txt_idx": "lechefrite", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "l\u00e8vre ", + "txt_idx": "levre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lime", + "txt_idx": "lime", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "linceul", + "txt_idx": "linceul", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lingot", + "txt_idx": "lingot", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lissoir", + "txt_idx": "lissoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lithique", + "txt_idx": "lithique", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lithique brute", + "txt_idx": "lithique-brute", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lithique chauff\u00e9", + "txt_idx": "lithique-chauffe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lithique d\u00e9bitage", + "txt_idx": "lithique-debitage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lithique divers", + "txt_idx": "lithique-divers", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lithique outil", + "txt_idx": "lithique-outil", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "lithique remontage", + "txt_idx": "lithique-remontage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "louche", + "txt_idx": "louche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "loup", + "txt_idx": "loup", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "macro-reste", + "txt_idx": "macro-reste", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "maillon", + "txt_idx": "maillon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "main droite", + "txt_idx": "main-droite", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "main gauche", + "txt_idx": "main-gauche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mammif\u00e8re", + "txt_idx": "mammifere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "manche", + "txt_idx": "manche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mandibule", + "txt_idx": "mandibule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "manuscrit \u00e0 l'encre", + "txt_idx": "manuscrit-a-lencre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "margelle de puits", + "txt_idx": "margelle-de-puits", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "marmite", + "txt_idx": "marmite", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "marteau", + "txt_idx": "marteau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "massacre de cerf", + "txt_idx": "massacre-de-cerf", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mat\u00e9riaux de construction", + "txt_idx": "materiaux-de-construction", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "maxillaire", + "txt_idx": "maxillaire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "m\u00e9daille", + "txt_idx": "medaille", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "membre inf\u00e9rieur", + "txt_idx": "membre-inferieur", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "membre inf\u00e9rieur droit", + "txt_idx": "membre-inferieur-droit", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "membre inf\u00e9rieur gauche", + "txt_idx": "membre-inferieur-gauche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "membre post\u00e9rieur droit", + "txt_idx": "membre-posterieur-droit", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "membre post\u00e9rieur gauche", + "txt_idx": "membre-posterieur-gauche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "membre sup\u00e9rieur", + "txt_idx": "membre-superieur", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "membre sup\u00e9rieur droit", + "txt_idx": "membre-superieur-droit", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "membre sup\u00e9rieur gauche", + "txt_idx": "membre-superieur-gauche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "menhir", + "txt_idx": "menhir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "m\u00e9reau", + "txt_idx": "mereau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "m\u00e9tacarpe", + "txt_idx": "metacarpe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "meule", + "txt_idx": "meule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "micro vase", + "txt_idx": "micro-vase", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "micro-faune", + "txt_idx": "micro-faune", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "milfiori", + "txt_idx": "milfiori", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "minerai ", + "txt_idx": "minerai", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "miroir", + "txt_idx": "miroir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "moellon", + "txt_idx": "moellon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "molette ", + "txt_idx": "molette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mollusque", + "txt_idx": "mollusque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "monnaie", + "txt_idx": "monnaie", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mordant de ceinture", + "txt_idx": "mordant-de-ceinture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mors de cheval", + "txt_idx": "mors-de-cheval", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mortier", + "txt_idx": "mortier", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mosa\u00efque", + "txt_idx": "mosaique", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "moulage", + "txt_idx": "moulage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "moule (objet)", + "txt_idx": "moule-objet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "moule \u00e0 kugeltopf", + "txt_idx": "moule-a-kugeltopf", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "moulure", + "txt_idx": "moulure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "mouture", + "txt_idx": "mouture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "navette", + "txt_idx": "navette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "nodule", + "txt_idx": "nodule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "nodule br\u00fble", + "txt_idx": "nodule-brule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "nucl\u00e9us", + "txt_idx": "nucleus", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ocre", + "txt_idx": "ocre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "oeuf", + "txt_idx": "oeuf", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "oiseau", + "txt_idx": "oiseau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "omoplate", + "txt_idx": "omoplate", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "orle", + "txt_idx": "orle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "os d\u00e9bit\u00e9", + "txt_idx": "os-debite", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "oule", + "txt_idx": "oule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "outil ind\u00e9termin\u00e9", + "txt_idx": "outil-indetermine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "paillette ", + "txt_idx": "paillette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "panse", + "txt_idx": "panse", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "papier", + "txt_idx": "papier", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "paroi (\u00e9l\u00e9ment)", + "txt_idx": "paroi-element", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "paroi de four", + "txt_idx": "paroi-de-four", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pas", + "txt_idx": "pas", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "passant", + "txt_idx": "passant", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "passant de ceinture", + "txt_idx": "passant-de-ceinture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "passe lacet", + "txt_idx": "passe-lacet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "passe-courroi", + "txt_idx": "passe-courroi", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "passe-guide", + "txt_idx": "passe-guide", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "passoire", + "txt_idx": "passoire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "patellas", + "txt_idx": "patellas", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pat\u00e8re", + "txt_idx": "patere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "patte", + "txt_idx": "patte", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pavage", + "txt_idx": "pavage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pav\u00e9", + "txt_idx": "pave", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pavement", + "txt_idx": "pavement", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "peigne", + "txt_idx": "peigne", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "peinture murale", + "txt_idx": "peinture-murale", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pelle", + "txt_idx": "pelle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pelle \u00e0 feu", + "txt_idx": "pelle-a-feu", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pendant de ceinture", + "txt_idx": "pendant-de-ceinture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pendeloque", + "txt_idx": "pendeloque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pendentif", + "txt_idx": "pendentif", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "penture", + "txt_idx": "penture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "per\u00e7oir", + "txt_idx": "percoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "percuteur", + "txt_idx": "percuteur", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "perle", + "txt_idx": "perle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "peson", + "txt_idx": "peson", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "phalange", + "txt_idx": "phalange", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "phosphate", + "txt_idx": "phosphate", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pic", + "txt_idx": "pic", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pichet", + "txt_idx": "pichet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pi\u00e8ce de renfort", + "txt_idx": "piece-de-renfort", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pied", + "txt_idx": "pied", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pierre \u00e0 aiguiser", + "txt_idx": "pierre-a-aiguiser", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pieu", + "txt_idx": "pieu", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pilette", + "txt_idx": "pilette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pilette d'hypocauste", + "txt_idx": "pilette-dhypocauste", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pilier", + "txt_idx": "pilier", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pilum", + "txt_idx": "pilum", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pince \u00e0 \u00e9piler", + "txt_idx": "pince-a-epiler", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "piochon", + "txt_idx": "piochon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pion", + "txt_idx": "pion", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pipe", + "txt_idx": "pipe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "piquet", + "txt_idx": "piquet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pirogue", + "txt_idx": "pirogue", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pis\u00e9", + "txt_idx": "pise", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "piton", + "txt_idx": "piton", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "planche", + "txt_idx": "planche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plane", + "txt_idx": "plane", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque", + "txt_idx": "plaque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque d'entr\u00e9e de serrure", + "txt_idx": "plaque-dentree-de-serrure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque de ceinture", + "txt_idx": "plaque-de-ceinture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque de porte", + "txt_idx": "plaque-de-porte", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque de renfort", + "txt_idx": "plaque-de-renfort", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque de t\u00f4le ", + "txt_idx": "plaque-de-tole", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque d\u00e9corative de harnachement", + "txt_idx": "plaque-decorative-de-harnachement", + "comment": "", + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque dorsale", + "txt_idx": "plaque-dorsale", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaque-boucle", + "txt_idx": "plaque-boucle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plaquette", + "txt_idx": "plaquette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plat", + "txt_idx": "plat", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plat \u00e0 barbe", + "txt_idx": "plat-a-barbe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "plomb de vitrail", + "txt_idx": "plomb-de-vitrail", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "po\u00ealon", + "txt_idx": "poelon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "poids", + "txt_idx": "poids", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "poignard", + "txt_idx": "poignard", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "poign\u00e9e", + "txt_idx": "poignee", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "poin\u00e7on", + "txt_idx": "poincon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pointe", + "txt_idx": "pointe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pointe de fl\u00e8che", + "txt_idx": "pointe-de-fleche", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pointe de lance", + "txt_idx": "pointe-de-lance", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pointerolle", + "txt_idx": "pointerolle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "polissoir", + "txt_idx": "polissoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pommeau", + "txt_idx": "pommeau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "porte ardillon", + "txt_idx": "porte-ardillon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot", + "txt_idx": "pot", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot \u00e0 car\u00e8ne", + "txt_idx": "pot-a-carene", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot \u00e0 cuire", + "txt_idx": "pot-a-cuire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot \u00e0 digitations", + "txt_idx": "pot-a-digitations", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot ans\u00e9", + "txt_idx": "pot-anse", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot de chambre", + "txt_idx": "pot-de-chambre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot de fleur", + "txt_idx": "pot-de-fleur", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot de po\u00eale", + "txt_idx": "pot-de-poele", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot d\u00e9cor\u00e9", + "txt_idx": "pot-decore", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot tripode", + "txt_idx": "pot-tripode", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pot verseur", + "txt_idx": "pot-verseur", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "poteau", + "txt_idx": "poteau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "potin", + "txt_idx": "potin", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "poutre", + "txt_idx": "poutre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "pr\u00e9l\u00e8vement", + "txt_idx": "prelevement", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "puits", + "txt_idx": "puits", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "radius", + "txt_idx": "radius", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "rasoir", + "txt_idx": "rasoir", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "rebut de fabrication", + "txt_idx": "rebut-de-fabrication", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "r\u00e9cipient", + "txt_idx": "recipient", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "r\u00e9duction", + "txt_idx": "reduction", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "refus de tamis", + "txt_idx": "refus-de-tamis", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "rivet", + "txt_idx": "rivet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "rondelle", + "txt_idx": "rondelle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "rongeur", + "txt_idx": "rongeur", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "rouelle", + "txt_idx": "rouelle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ruban", + "txt_idx": "ruban", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "sabot (animal)", + "txt_idx": "sabot-animal", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "sacrum", + "txt_idx": "sacrum", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "sarcophage", + "txt_idx": "sarcophage", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "scie", + "txt_idx": "scie", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "scorie", + "txt_idx": "scorie", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "scramasaxe", + "txt_idx": "scramasaxe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "sculpture", + "txt_idx": "sculpture", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "seau", + "txt_idx": "seau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "s\u00e9diment", + "txt_idx": "sediment", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "semelle de chaussure", + "txt_idx": "semelle-de-chaussure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "serfouette *", + "txt_idx": "serfouette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "serpette", + "txt_idx": "serpette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "serrure", + "txt_idx": "serrure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "sifflet", + "txt_idx": "sifflet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "soc", + "txt_idx": "soc", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "soie", + "txt_idx": "soie", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "sol de four", + "txt_idx": "sol-de-four", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "sonde", + "txt_idx": "sonde", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "soucoupe", + "txt_idx": "soucoupe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "spatule", + "txt_idx": "spatule", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "squelette", + "txt_idx": "squelette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "statuaire anthropomorphe", + "txt_idx": "statuaire-anthropomorphe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "statuaire zoomorphe", + "txt_idx": "statuaire-zoomorphe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "statue", + "txt_idx": "statue", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "statuette", + "txt_idx": "statuette", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "st\u00e8le", + "txt_idx": "stele", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "sternum", + "txt_idx": "sternum", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "strigile", + "txt_idx": "strigile", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "stylet", + "txt_idx": "stylet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tabletterie", + "txt_idx": "tabletterie", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "talon", + "txt_idx": "talon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tari\u00e8re", + "txt_idx": "tariere", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tasse", + "txt_idx": "tasse", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tegulae", + "txt_idx": "tegulae", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "temporaux", + "txt_idx": "temporaux", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "terrazzo", + "txt_idx": "terrazzo", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "terre cuite architecturale", + "txt_idx": "terre-cuite-architecturale", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "terre rub\u00e9fi\u00e9e", + "txt_idx": "terre-rubefiee", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "terrine ", + "txt_idx": "terrine", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tesselle", + "txt_idx": "tesselle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tesson", + "txt_idx": "tesson", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "t\u00eate", + "txt_idx": "tete", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "thermom\u00e8tre", + "txt_idx": "thermometre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "thorax", + "txt_idx": "thorax", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tibia", + "txt_idx": "tibia", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tige", + "txt_idx": "tige", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tissu", + "txt_idx": "tissu", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "t\u00f4le", + "txt_idx": "tole", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tombe", + "txt_idx": "tombe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "torchis", + "txt_idx": "torchis", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "torque", + "txt_idx": "torque", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tranchet", + "txt_idx": "tranchet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tripode", + "txt_idx": "tripode", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tronc (\u00e9chantillon)", + "txt_idx": "tronc-echantillon", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "truelle", + "txt_idx": "truelle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tube", + "txt_idx": "tube", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tubulure", + "txt_idx": "tubulure", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tuile", + "txt_idx": "tuile", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tuile \u00e0 crochet", + "txt_idx": "tuile-a-crochet", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tuile canal", + "txt_idx": "tuile-canal", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tuile m\u00e9canique", + "txt_idx": "tuile-mecanique", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tuile plate", + "txt_idx": "tuile-plate", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tuile ronde", + "txt_idx": "tuile-ronde", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tuyau", + "txt_idx": "tuyau", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "tuyau de pipe", + "txt_idx": "tuyau-de-pipe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "ulnas", + "txt_idx": "ulnas", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "urne", + "txt_idx": "urne", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "urne cin\u00e9raire", + "txt_idx": "urne-cineraire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "vaisselle", + "txt_idx": "vaisselle", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "vase", + "txt_idx": "vase", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "vase silo", + "txt_idx": "vase-silo", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "verre (\u00e0 boire)", + "txt_idx": "verre-a-boire", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "verre \u00e0 jambe", + "txt_idx": "verre-a-jambe", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "verre \u00e0 pied", + "txt_idx": "verre-a-pied", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "verre \u00e0 vitre", + "txt_idx": "verre-a-vitre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "verre apode", + "txt_idx": "verre-apode", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "verre fondu", + "txt_idx": "verre-fondu", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "verre plat", + "txt_idx": "verre-plat", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "vert\u00e8bre", + "txt_idx": "vertebre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "virole", + "txt_idx": "virole", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "vitrail", + "txt_idx": "vitrail", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.objecttype", + "fields": { + "label": "vitre", + "txt_idx": "vitre", + "comment": null, + "available": true, + "parent": null + } +}, +{ + "model": "archaeological_finds.integritytype", + "fields": { + "label": "Complet", + "txt_idx": "complete", + "comment": "Int\u00e9grit\u00e9 totale", + "available": true + } +}, +{ + "model": "archaeological_finds.integritytype", + "fields": { + "label": "Arch\u00e9ologiquement complet", + "txt_idx": "archaeo_complete", + "comment": "Il est possible d'en reconstituer la forme compl\u00e8te avec une approximation acceptable (et ma\u00eetris\u00e9e)", + "available": true + } +}, +{ + "model": "archaeological_finds.integritytype", + "fields": { + "label": "Perte d'int\u00e9grit\u00e9 totale", + "txt_idx": "integrity_lost", + "comment": "La forme de l'objet est perdue", + "available": true + } +}, +{ + "model": "archaeological_finds.integritytype", + "fields": { + "label": "\"Perdu pour la science\"", + "txt_idx": "lost_for_science", + "comment": "Rien \u00e0 tirer de cela : m\u00eame pas pour l'\u00e9tude de la mati\u00e8re", + "available": true + } +}, +{ + "model": "archaeological_finds.integritytype", + "fields": { + "label": "Absent", + "txt_idx": "not_there", + "comment": "N'est plus pr\u00e9sent : perdu ?", + "available": true + } +}, +{ + "model": "archaeological_finds.batchtype", + "fields": { + "label": "Inconnu", + "txt_idx": "inconnu", + "comment": null, + "available": true, + "order": 0 + } +}, +{ + "model": "archaeological_finds.batchtype", + "fields": { + "label": "Objet", + "txt_idx": "objet", + "comment": null, + "available": true, + "order": 1 + } +}, +{ + "model": "archaeological_finds.batchtype", + "fields": { + "label": "Lot", + "txt_idx": "lot", + "comment": null, + "available": true, + "order": 2 + } +}, +{ + "model": "archaeological_finds.treatmentfiletype", + "fields": { + "label": "Demande de pr\u00eat pour \u00e9tude", + "txt_idx": "loan_demand_study", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.treatmentfiletype", + "fields": { + "label": "Demande de pr\u00eat pour exposition", + "txt_idx": "loan_demand_exposure", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_finds.treatmentfiletype", + "fields": { + "label": "Intention de donation", + "txt_idx": "gift_wish", + "comment": "", + "available": true + } +} +] diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py index 55e223b5d..99813ea31 100644 --- a/archaeological_finds/forms_treatments.py +++ b/archaeological_finds/forms_treatments.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2016-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 @@ -17,13 +17,13 @@ # See the file COPYING for details. +from collections import OrderedDict import datetime import logging from django import forms from django.conf import settings from django.core import validators -from django.db.models import Max from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ @@ -38,8 +38,7 @@ from archaeological_operations.forms import AdministrativeActOpeForm, \ from ishtar_common.forms import reverse_lazy, TableSelect, FinalForm, \ ManageOldType, get_form_selection -from ishtar_common.forms_common import SourceForm, SourceSelect, \ - SourceDeletionForm +from ishtar_common.forms_common import SourceSelect from ishtar_common import widgets @@ -184,7 +183,7 @@ class BaseTreatmentForm(ManageOldType, forms.Form): self.fields['treatment_state'].choices = \ models.TreatmentState.get_types( initial=self.init_data.get('treatment_state'), - ) + ) self.fields['treatment_state'].help_text = \ models.TreatmentState.get_help() # TODO @@ -192,9 +191,13 @@ class BaseTreatmentForm(ManageOldType, forms.Form): self.fields['basket'].required = False self.fields['basket'].help_text = \ _(u"Leave it blank if you want to select a single item") - self.fields.keyOrder.pop(self.fields.keyOrder.index('basket')) - self.fields.keyOrder.insert(self.fields.keyOrder.index('description'), - 'basket') + fields = OrderedDict() + basket = self.fields.pop('basket') + for key, value in self.fields.items(): + if key == 'description': + fields['index'] = basket + fields[key] = value + self.fields = fields """ def clean(self, *args, **kwargs): @@ -239,10 +242,14 @@ class TreatmentModifyForm(BaseTreatmentForm): def __init__(self, *args, **kwargs): super(TreatmentModifyForm, self).__init__(*args, **kwargs) - self.fields.pop('target_is_basket') - self.fields.keyOrder.pop(self.fields.keyOrder.index('index')) - self.fields.keyOrder.insert( - self.fields.keyOrder.index('year') + 1, 'index') + fields = OrderedDict() + idx = self.fields.pop('index') + for key, value in self.fields.items(): + fields[key] = value + if key == 'year': + fields['index'] = idx + fields.pop('target_is_basket') + self.fields = fields def clean(self, *args, **kwargs): super(TreatmentModifyForm, self).clean(*args, **kwargs) @@ -481,9 +488,9 @@ class TreatmentFileForm(ManageOldType, forms.Form): creation_date = forms.DateField(label=_(u"Start date"), required=False, widget=widgets.JQueryDate, initial=lambda: datetime.datetime.now()) - reception_date = forms.DateField(label=_(u"Reception date"), required=False, - widget=widgets.JQueryDate, - initial=lambda: datetime.datetime.now()) + reception_date = forms.DateField( + label=_(u"Reception date"), required=False, widget=widgets.JQueryDate, + initial=lambda: datetime.datetime.now()) end_date = forms.DateField(label=_(u"Closing date"), required=False, widget=widgets.JQueryDate) @@ -506,9 +513,13 @@ class TreatmentFileModifyForm(TreatmentFileForm): def __init__(self, *args, **kwargs): super(TreatmentFileModifyForm, self).__init__(*args, **kwargs) - self.fields.keyOrder.pop(self.fields.keyOrder.index('index')) - self.fields.keyOrder.insert( - self.fields.keyOrder.index('year') + 1, 'index') + fields = OrderedDict() + idx = self.fields.pop('index') + for key, value in self.fields.items(): + fields[key] = value + if key == 'year': + fields['index'] = idx + self.fields = fields def clean(self, *args, **kwargs): super(TreatmentFileModifyForm, self).clean(*args, **kwargs) @@ -595,8 +606,8 @@ class AdministrativeActTreatmentFileSelect(TableSelect): label=_(u"Treatment request index")) treatment_file__internal_reference = forms.CharField( max_length=200, label=_(u"Treatment request internal reference")) - treatment_file__type = forms.ChoiceField(label=_(u"Treatment request type"), - choices=[]) + treatment_file__type = forms.ChoiceField( + label=_(u"Treatment request type"), choices=[]) history_modifier = forms.IntegerField( label=_(u"Modified by"), widget=widgets.JQueryAutoComplete( @@ -691,8 +702,8 @@ class TreatmentFileSourceSelect(SourceSelect): label=_(u"Treatment request index")) treatment_file__internal_reference = forms.CharField( max_length=200, label=_(u"Treatment request internal reference")) - treatment_file__type = forms.ChoiceField(label=_(u"Treatment request type"), - choices=[]) + treatment_file__type = forms.ChoiceField( + label=_(u"Treatment request type"), choices=[]) def __init__(self, *args, **kwargs): super(TreatmentFileSourceSelect, self).__init__(*args, **kwargs) diff --git a/archaeological_finds/lookups.py b/archaeological_finds/lookups.py new file mode 100644 index 000000000..1449ff52b --- /dev/null +++ b/archaeological_finds/lookups.py @@ -0,0 +1,84 @@ +from ajax_select import register, LookupChannel + +from django.db.models import Q +from django.utils.encoding import force_text +from django.utils.html import escape + +from archaeological_finds import models + + +@register('base_find') +class BaseFindLookup(LookupChannel): + model = models.BaseFind + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(cache_complete_id__icontains=term) | + Q(label__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by( + 'cache_complete_id')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.cache_complete_id + + +@register('find') +class FindLookup(LookupChannel): + model = models.Find + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(cached_label__icontains=term) | + Q(base_finds__cache_complete_id__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by( + 'cached_label')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.full_label + + def format_match(self, obj): + return escape(force_text(obj.full_label)) + + +@register('treatment') +class TreatmentLookup(LookupChannel): + model = models.Treatment + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(cached_label__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by( + 'cached_label')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.cached_label + + +@register('treatment_file') +class TreatmentFileLookup(LookupChannel): + model = models.TreatmentFile + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(cached_label__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by( + 'cached_label')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.cached_label diff --git a/archaeological_finds/migrations/0001_initial.py b/archaeological_finds/migrations/0001_initial.py index d5f3e804a..0f436867e 100644 --- a/archaeological_finds/migrations/0001_initial.py +++ b/archaeological_finds/migrations/0001_initial.py @@ -1,814 +1,598 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - depends_on = ( - ('archaeological_context_records', '0001_initial.py'), - ('archaeological_warehouse', - '0011_auto__add_containerlocalisation__add_unique_containerlocalisation_cont.py'), - ) - - def forwards(self, orm): - # Adding model 'MaterialType' - db.create_table('archaeological_finds_materialtype', ( - ('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)), - ('recommendation', self.gf('django.db.models.fields.TextField')()), - ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_finds.MaterialType'], null=True, blank=True)), - )) - db.send_create_signal('archaeological_finds', ['MaterialType']) - - # Adding model 'HistoricalBaseFind' - db.create_table('archaeological_finds_historicalbasefind', ( - ('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)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=60)), - ('description', self.gf('django.db.models.fields.TextField')()), - ('context_record_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('is_isolated', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('index', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('material_index', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('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('archaeological_finds', ['HistoricalBaseFind']) - - # Adding model 'BaseFind' - db.create_table('archaeological_finds_basefind', ( - ('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'])), - ('label', self.gf('django.db.models.fields.CharField')(max_length=60)), - ('description', self.gf('django.db.models.fields.TextField')()), - ('context_record', self.gf('django.db.models.fields.related.ForeignKey')(related_name='base_finds', to=orm['archaeological_context_records.ContextRecord'])), - ('is_isolated', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('index', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('material_index', self.gf('django.db.models.fields.IntegerField')(default=0)), - )) - db.send_create_signal('archaeological_finds', ['BaseFind']) - - # Adding model 'HistoricalFind' - db.create_table('archaeological_finds_historicalfind', ( - ('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)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - ('label', self.gf('django.db.models.fields.CharField')(max_length=60)), - ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('material_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('volume', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - ('weight', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - ('find_number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('upstream_treatment_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('downstream_treatment_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('dating_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('container_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('archaeological_finds', ['HistoricalFind']) - - # Adding model 'Find' - db.create_table('archaeological_finds_find', ( - ('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'])), - ('order', self.gf('django.db.models.fields.IntegerField')()), - ('label', self.gf('django.db.models.fields.CharField')(max_length=60)), - ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('material_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_finds.MaterialType'])), - ('volume', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - ('weight', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - ('find_number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('upstream_treatment', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='downstream_treatment', null=True, to=orm['archaeological_finds.Treatment'])), - ('downstream_treatment', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='upstream_treatment', null=True, to=orm['archaeological_finds.Treatment'])), - ('dating', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.Dating'])), - ('container', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='finds', null=True, to=orm['archaeological_warehouse.Container'])), - )) - db.send_create_signal('archaeological_finds', ['Find']) - - # Adding M2M table for field base_finds on 'Find' - db.create_table('archaeological_finds_find_base_finds', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('find', models.ForeignKey(orm['archaeological_finds.find'], null=False)), - ('basefind', models.ForeignKey(orm['archaeological_finds.basefind'], null=False)) - )) - db.create_unique('archaeological_finds_find_base_finds', ['find_id', 'basefind_id']) - - # Adding model 'FindSource' - db.create_table('archaeological_finds_findsource', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), - ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), - ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('find', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_finds.Find'])), - )) - db.send_create_signal('archaeological_finds', ['FindSource']) - - # Adding M2M table for field authors on 'FindSource' - db.create_table('archaeological_finds_findsource_authors', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('findsource', models.ForeignKey(orm['archaeological_finds.findsource'], null=False)), - ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) - )) - db.create_unique('archaeological_finds_findsource_authors', ['findsource_id', 'author_id']) - - # Adding model 'TreatmentType' - db.create_table('archaeological_finds_treatmenttype', ( - ('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)), - ('virtual', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('archaeological_finds', ['TreatmentType']) - - # Adding model 'HistoricalTreatment' - db.create_table('archaeological_finds_historicaltreatment', ( - ('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)), - ('container_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('treatment_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('location_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('person_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('start_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.DateField')(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('archaeological_finds', ['HistoricalTreatment']) - - # Adding model 'Treatment' - db.create_table('archaeological_finds_treatment', ( - ('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'])), - ('container', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.Container'], null=True, blank=True)), - ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('treatment_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_finds.TreatmentType'])), - ('location', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.Warehouse'], null=True, blank=True)), - ('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'], null=True, blank=True)), - ('start_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - )) - db.send_create_signal('archaeological_finds', ['Treatment']) - - # Adding model 'TreatmentSource' - db.create_table('archaeological_finds_treatmentsource', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), - ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), - ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('treatment', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_finds.Treatment'])), - )) - db.send_create_signal('archaeological_finds', ['TreatmentSource']) - - # Adding M2M table for field authors on 'TreatmentSource' - db.create_table('archaeological_finds_treatmentsource_authors', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('treatmentsource', models.ForeignKey(orm['archaeological_finds.treatmentsource'], null=False)), - ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) - )) - db.create_unique('archaeological_finds_treatmentsource_authors', ['treatmentsource_id', 'author_id']) - - # Adding model 'Property' - db.create_table('archaeological_finds_property', ( - ('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'])), - ('history_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), - ('find', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_finds.Find'])), - ('administrative_act', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.AdministrativeAct'])), - ('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'])), - ('start_date', self.gf('django.db.models.fields.DateField')()), - ('end_date', self.gf('django.db.models.fields.DateField')()), - )) - db.send_create_signal('archaeological_finds', ['Property']) +from __future__ import unicode_literals - - def backwards(self, orm): - # Deleting model 'MaterialType' - db.delete_table('archaeological_finds_materialtype') - - # Deleting model 'HistoricalBaseFind' - db.delete_table('archaeological_finds_historicalbasefind') - - # Deleting model 'BaseFind' - db.delete_table('archaeological_finds_basefind') - - # Deleting model 'HistoricalFind' - db.delete_table('archaeological_finds_historicalfind') - - # Deleting model 'Find' - db.delete_table('archaeological_finds_find') - - # Removing M2M table for field base_finds on 'Find' - db.delete_table('archaeological_finds_find_base_finds') - - # Deleting model 'FindSource' - db.delete_table('archaeological_finds_findsource') - - # Removing M2M table for field authors on 'FindSource' - db.delete_table('archaeological_finds_findsource_authors') - - # Deleting model 'TreatmentType' - db.delete_table('archaeological_finds_treatmenttype') - - # Deleting model 'HistoricalTreatment' - db.delete_table('archaeological_finds_historicaltreatment') - - # Deleting model 'Treatment' - db.delete_table('archaeological_finds_treatment') - - # Deleting model 'TreatmentSource' - db.delete_table('archaeological_finds_treatmentsource') - - # Removing M2M table for field authors on 'TreatmentSource' - db.delete_table('archaeological_finds_treatmentsource_authors') - - # Deleting model 'Property' - db.delete_table('archaeological_finds_property') - - - models = { - 'archaeological_context_records.activitytype': { - 'Meta': {'object_name': 'ActivityType'}, - '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'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_context_records.contextrecord': { - 'Meta': {'object_name': 'ContextRecord'}, - 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), - 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), - 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.dating': { - 'Meta': {'object_name': 'Dating'}, - 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), - 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.datingquality': { - 'Meta': {'object_name': 'DatingQuality'}, - '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'}) - }, - 'archaeological_context_records.datingtype': { - 'Meta': {'object_name': 'DatingType'}, - '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'}) - }, - 'archaeological_context_records.identificationtype': { - 'Meta': {'object_name': 'IdentificationType'}, - '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'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_context_records.unit': { - 'Meta': {'object_name': 'Unit'}, - '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'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_files.file': { - 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), - 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'object_name': 'FileType'}, - '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'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'object_name': 'PermitType'}, - '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'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {}), - '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'}) - }, - 'archaeological_finds.basefind': { - 'Meta': {'object_name': 'BaseFind'}, - 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'base_finds'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'is_isolated': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'material_index': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'archaeological_finds.find': { - 'Meta': {'object_name': 'Find'}, - 'base_finds': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'find'", 'symmetrical': 'False', 'to': "orm['archaeological_finds.BaseFind']"}), - 'container': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'finds'", 'null': 'True', 'to': "orm['archaeological_warehouse.Container']"}), - 'dating': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Dating']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'downstream_treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'upstream_treatment'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), - 'find_number': ('django.db.models.fields.IntegerField', [], {'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'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'material_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.MaterialType']"}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'upstream_treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'downstream_treatment'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), - 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'weight': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_finds.findsource': { - 'Meta': {'object_name': 'FindSource'}, - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'find': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_finds.Find']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) - }, - 'archaeological_finds.historicalbasefind': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalBaseFind'}, - 'context_record_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - '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'}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'is_isolated': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'material_index': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'archaeological_finds.historicalfind': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalFind'}, - 'container_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'dating_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'downstream_treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'find_number': ('django.db.models.fields.IntegerField', [], {'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'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'material_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'upstream_treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'weight': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_finds.historicaltreatment': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalTreatment'}, - 'container_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'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'}), - 'location_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'person_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'treatment_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_finds.materialtype': { - 'Meta': {'object_name': 'MaterialType'}, - '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'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.MaterialType']", 'null': 'True', 'blank': 'True'}), - 'recommendation': ('django.db.models.fields.TextField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_finds.property': { - 'Meta': {'object_name': 'Property'}, - 'administrative_act': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.AdministrativeAct']"}), - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'find': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.Find']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}), - 'start_date': ('django.db.models.fields.DateField', [], {}) - }, - 'archaeological_finds.treatment': { - 'Meta': {'object_name': 'Treatment'}, - 'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'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'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']", 'null': 'True', 'blank': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'treatment_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentType']"}) - }, - 'archaeological_finds.treatmentsource': { - 'Meta': {'object_name': 'TreatmentSource'}, - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_finds.Treatment']"}) - }, - 'archaeological_finds.treatmenttype': { - 'Meta': {'object_name': 'TreatmentType'}, - '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'}), - 'virtual': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'archaeological_operations.acttype': { - 'Meta': {'object_name': 'ActType'}, - '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'}), - 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_operations.administrativeact': { - 'Meta': {'object_name': 'AdministrativeAct'}, - 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), - 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15'}), - 'scientific': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'object_name': 'Operation'}, - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operationtype': { - 'Meta': {'object_name': 'OperationType'}, - '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'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'object_name': 'Parcel'}, - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.period': { - 'Meta': {'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'object_name': 'RemainType'}, - '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'}) - }, - 'archaeological_warehouse.container': { - 'Meta': {'object_name': 'Container'}, - 'comment': ('django.db.models.fields.TextField', [], {}), - 'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}) - }, - 'archaeological_warehouse.containertype': { - 'Meta': {'object_name': 'ContainerType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'volume': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_warehouse.warehouse': { - 'Meta': {'object_name': 'Warehouse'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('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': '40'}), - 'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']", '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'}), - 'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) - }, - 'archaeological_warehouse.warehousetype': { - 'Meta': {'object_name': 'WarehouseType'}, - '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'}) - }, - '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.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 = ['archaeological_finds'] +from django.db import models, migrations +import datetime +import re +import django.contrib.gis.db.models.fields +import archaeological_operations.models +import ishtar_common.utils +import ishtar_common.models +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='BaseFind', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.TextField(verbose_name='Free ID')), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('special_interest', models.CharField(max_length=120, null=True, verbose_name='Special interest', blank=True)), + ('discovery_date', models.DateField(null=True, verbose_name='Discovery date', blank=True)), + ('index', models.IntegerField(default=0, verbose_name='Index')), + ('material_index', models.IntegerField(default=0, verbose_name='Material index')), + ('topographic_localisation', models.CharField(max_length=120, null=True, verbose_name='Point of topographic reference', blank=True)), + ('x', models.FloatField(null=True, verbose_name='X', blank=True)), + ('y', models.FloatField(null=True, verbose_name='Y', blank=True)), + ('z', models.FloatField(null=True, verbose_name='Z', blank=True)), + ('estimated_error_x', models.FloatField(null=True, verbose_name='Estimated error for X', blank=True)), + ('estimated_error_y', models.FloatField(null=True, verbose_name='Estimated error for Y', blank=True)), + ('estimated_error_z', models.FloatField(null=True, verbose_name='Estimated error for Z', blank=True)), + ('point_2d', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, verbose_name='Point (2D)', blank=True)), + ('point', django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point', blank=True)), + ('line', django.contrib.gis.db.models.fields.LineStringField(srid=4326, null=True, verbose_name='Line', blank=True)), + ('polygon', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, verbose_name='Polygon', blank=True)), + ('cache_short_id', models.TextField(help_text='Cached value - do not edit', null=True, verbose_name='Short ID', blank=True)), + ('cache_complete_id', models.TextField(help_text='Cached value - do not edit', null=True, verbose_name='Complete ID', blank=True)), + ], + options={ + 'verbose_name': 'Base find', + 'verbose_name_plural': 'Base finds', + 'permissions': (('view_basefind', 'Peut voir tout le Mobilier de base'), ('view_own_basefind', 'Peut voir son propre Mobilier de base'), ('add_own_basefind', 'Peut ajouter son propre Mobilier de base'), ('change_own_basefind', 'Peut modifier son propre Mobilier de base'), ('delete_own_basefind', 'Peut supprimer son propre Mobilier de base')), + }, + bases=(models.Model, ishtar_common.models.OwnPerms), + ), + migrations.CreateModel( + name='BatchType', + 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')), + ], + options={ + 'ordering': ('order',), + 'verbose_name': 'Batch type', + 'verbose_name_plural': 'Batch types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ConservatoryState', + 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': 'Conservatory state', + 'verbose_name_plural': 'Conservatory states', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Find', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('order', models.IntegerField(default=1, verbose_name='Order')), + ('label', models.TextField(verbose_name='Free ID')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('conservatory_comment', models.TextField(null=True, verbose_name='Conservatory comment', blank=True)), + ('volume', models.FloatField(null=True, verbose_name='Volume (l)', blank=True)), + ('weight', models.FloatField(null=True, verbose_name='Weight (g)', blank=True)), + ('weight_unit', models.CharField(blank=True, max_length=4, null=True, verbose_name='Weight unit', choices=[(b'g', 'g'), (b'kg', 'kg')])), + ('find_number', models.IntegerField(null=True, verbose_name='Find number', blank=True)), + ('is_complete', models.NullBooleanField(verbose_name='Is complete?')), + ('min_number_of_individuals', models.IntegerField(null=True, verbose_name='Minimum number of individuals (MNI)', blank=True)), + ('length', models.FloatField(null=True, verbose_name='Length (cm)', blank=True)), + ('width', models.FloatField(null=True, verbose_name='Width (cm)', blank=True)), + ('height', models.FloatField(null=True, verbose_name='Height (cm)', blank=True)), + ('diameter', models.FloatField(null=True, verbose_name='Diameter (cm)', blank=True)), + ('thickness', models.FloatField(null=True, verbose_name='Thickness (cm)', blank=True)), + ('dimensions_comment', models.TextField(null=True, verbose_name='Dimensions comment', blank=True)), + ('mark', models.TextField(null=True, verbose_name='Mark', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('dating_comment', models.TextField(null=True, verbose_name='Comment on dating', blank=True)), + ('previous_id', models.TextField(null=True, verbose_name='Previous ID', blank=True)), + ('index', models.IntegerField(default=0, verbose_name='Index')), + ('checked', models.CharField(default=b'NC', max_length=2, verbose_name='Check', choices=[(b'NC', 'Not checked'), (b'CI', 'Checked but incorrect'), (b'CC', 'Checked and correct')])), + ('check_date', models.DateField(default=datetime.date.today, verbose_name='Check date')), + ('estimated_value', models.FloatField(null=True, verbose_name='Estimated value', blank=True)), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', blank=True)), + ], + options={ + 'ordering': ('cached_label',), + 'verbose_name': 'Find', + 'verbose_name_plural': 'Finds', + 'permissions': (('view_find', 'Peut voir tout le Mobilier'), ('view_own_find', 'Peut voir son propre Mobilier'), ('add_own_find', 'Peut ajouter son propre Mobilier'), ('change_own_find', 'Peut modifier son propre Mobilier'), ('delete_own_find', 'Peut supprimer son propre Mobilier')), + }, + bases=(ishtar_common.models.ValueGetter, models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ShortMenuItem), + ), + migrations.CreateModel( + name='FindBasket', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=1000, verbose_name='Label')), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='FindSource', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('title', models.CharField(max_length=300, verbose_name='Title')), + ('external_id', models.TextField(max_length=300, null=True, verbose_name='External ID', blank=True)), + ('scale', models.CharField(max_length=30, null=True, verbose_name='Scale', blank=True)), + ('associated_url', models.URLField(null=True, verbose_name='Numerical ressource (web address)', blank=True)), + ('receipt_date', models.DateField(null=True, verbose_name='Receipt date', blank=True)), + ('creation_date', models.DateField(null=True, verbose_name='Creation date', blank=True)), + ('receipt_date_in_documentation', models.DateField(null=True, verbose_name='Receipt date in documentation', blank=True)), + ('item_number', models.IntegerField(default=1, verbose_name='Item number')), + ('reference', models.CharField(max_length=100, null=True, verbose_name='Ref.', blank=True)), + ('internal_reference', models.CharField(max_length=100, null=True, verbose_name='Internal ref.', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('additional_information', models.TextField(null=True, verbose_name='Additional information', blank=True)), + ('duplicate', models.BooleanField(default=False, verbose_name='Has a duplicate')), + ], + options={ + 'verbose_name': 'Find documentation', + 'verbose_name_plural': 'Find documentations', + 'permissions': (('view_findsource', 'Can view all Find sources'), ('view_own_findsource', 'Can view own Find source'), ('add_own_findsource', 'Can add own Find source'), ('change_own_findsource', 'Can change own Find source'), ('delete_own_findsource', 'Can delete own Find source')), + }, + bases=(ishtar_common.models.OwnPerms, models.Model), + ), + migrations.CreateModel( + name='HistoricalBaseFind', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('label', models.TextField(verbose_name='Free ID')), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('special_interest', models.CharField(max_length=120, null=True, verbose_name='Special interest', blank=True)), + ('discovery_date', models.DateField(null=True, verbose_name='Discovery date', blank=True)), + ('index', models.IntegerField(default=0, verbose_name='Index')), + ('material_index', models.IntegerField(default=0, verbose_name='Material index')), + ('topographic_localisation', models.CharField(max_length=120, null=True, verbose_name='Point of topographic reference', blank=True)), + ('x', models.FloatField(null=True, verbose_name='X', blank=True)), + ('y', models.FloatField(null=True, verbose_name='Y', blank=True)), + ('z', models.FloatField(null=True, verbose_name='Z', blank=True)), + ('estimated_error_x', models.FloatField(null=True, verbose_name='Estimated error for X', blank=True)), + ('estimated_error_y', models.FloatField(null=True, verbose_name='Estimated error for Y', blank=True)), + ('estimated_error_z', models.FloatField(null=True, verbose_name='Estimated error for Z', blank=True)), + ('point_2d', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, verbose_name='Point (2D)', blank=True)), + ('point', django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point', blank=True)), + ('line', django.contrib.gis.db.models.fields.LineStringField(srid=4326, null=True, verbose_name='Line', blank=True)), + ('polygon', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, verbose_name='Polygon', blank=True)), + ('cache_short_id', models.TextField(help_text='Cached value - do not edit', null=True, verbose_name='Short ID', blank=True)), + ('cache_complete_id', models.TextField(help_text='Cached value - do not edit', null=True, verbose_name='Complete ID', 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 Base find', + }, + ), + migrations.CreateModel( + name='HistoricalFind', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('image', models.TextField(max_length=255, null=True, blank=True)), + ('thumbnail', models.TextField(max_length=255, null=True, blank=True)), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('order', models.IntegerField(default=1, verbose_name='Order')), + ('label', models.TextField(verbose_name='Free ID')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('conservatory_comment', models.TextField(null=True, verbose_name='Conservatory comment', blank=True)), + ('volume', models.FloatField(null=True, verbose_name='Volume (l)', blank=True)), + ('weight', models.FloatField(null=True, verbose_name='Weight (g)', blank=True)), + ('weight_unit', models.CharField(blank=True, max_length=4, null=True, verbose_name='Weight unit', choices=[(b'g', 'g'), (b'kg', 'kg')])), + ('find_number', models.IntegerField(null=True, verbose_name='Find number', blank=True)), + ('is_complete', models.NullBooleanField(verbose_name='Is complete?')), + ('min_number_of_individuals', models.IntegerField(null=True, verbose_name='Minimum number of individuals (MNI)', blank=True)), + ('length', models.FloatField(null=True, verbose_name='Length (cm)', blank=True)), + ('width', models.FloatField(null=True, verbose_name='Width (cm)', blank=True)), + ('height', models.FloatField(null=True, verbose_name='Height (cm)', blank=True)), + ('diameter', models.FloatField(null=True, verbose_name='Diameter (cm)', blank=True)), + ('thickness', models.FloatField(null=True, verbose_name='Thickness (cm)', blank=True)), + ('dimensions_comment', models.TextField(null=True, verbose_name='Dimensions comment', blank=True)), + ('mark', models.TextField(null=True, verbose_name='Mark', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('dating_comment', models.TextField(null=True, verbose_name='Comment on dating', blank=True)), + ('previous_id', models.TextField(null=True, verbose_name='Previous ID', blank=True)), + ('index', models.IntegerField(default=0, verbose_name='Index')), + ('checked', models.CharField(default=b'NC', max_length=2, verbose_name='Check', choices=[(b'NC', 'Not checked'), (b'CI', 'Checked but incorrect'), (b'CC', 'Checked and correct')])), + ('check_date', models.DateField(default=datetime.date.today, verbose_name='Check date')), + ('estimated_value', models.FloatField(null=True, verbose_name='Estimated value', blank=True)), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', 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 Find', + }, + ), + migrations.CreateModel( + name='HistoricalTreatment', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('image', models.TextField(max_length=255, null=True, blank=True)), + ('thumbnail', models.TextField(max_length=255, null=True, blank=True)), + ('label', models.CharField(max_length=200, null=True, verbose_name='Label', blank=True)), + ('other_reference', models.CharField(max_length=200, null=True, verbose_name='Other ref.', blank=True)), + ('year', models.IntegerField(default=ishtar_common.utils.get_current_year, verbose_name='Year')), + ('index', models.IntegerField(default=1, verbose_name='Index')), + ('external_id', models.CharField(max_length=200, null=True, verbose_name='External ID', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('goal', models.TextField(null=True, verbose_name='Goal', blank=True)), + ('start_date', models.DateField(null=True, verbose_name='Start date', blank=True)), + ('end_date', models.DateField(null=True, verbose_name='Closing date', blank=True)), + ('estimated_cost', models.FloatField(null=True, verbose_name='Estimated cost', blank=True)), + ('quoted_cost', models.FloatField(null=True, verbose_name='Quoted cost', blank=True)), + ('realized_cost', models.FloatField(null=True, verbose_name='Realized cost', blank=True)), + ('insurance_cost', models.FloatField(null=True, verbose_name='Insurance cost', blank=True)), + ('target_is_basket', models.BooleanField(default=False, verbose_name='Target a basket')), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', 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 Treatment', + }, + ), + migrations.CreateModel( + name='HistoricalTreatmentFile', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('year', models.IntegerField(default=ishtar_common.utils.get_current_year, verbose_name='Year')), + ('index', models.IntegerField(default=1, verbose_name='Index')), + ('internal_reference', models.CharField(max_length=200, null=True, verbose_name='Internal reference', blank=True)), + ('external_id', models.CharField(max_length=200, null=True, verbose_name='External ID', blank=True)), + ('name', models.TextField(null=True, verbose_name='Name', blank=True)), + ('end_date', models.DateField(null=True, verbose_name='Closing date', blank=True)), + ('creation_date', models.DateField(default=datetime.date.today, null=True, verbose_name='Creation date', blank=True)), + ('reception_date', models.DateField(null=True, verbose_name='Reception date', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', 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 Treatment request', + }, + ), + migrations.CreateModel( + name='IntegrityType', + 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': 'Integrity / interest type', + 'verbose_name_plural': 'Integrity / interest types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='MaterialType', + 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')), + ('code', models.CharField(max_length=10, null=True, verbose_name='Code', blank=True)), + ('recommendation', models.TextField(null=True, verbose_name='Recommendation', blank=True)), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Material type', + 'verbose_name_plural': 'Material types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ObjectType', + 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': ('parent__label', 'label'), + 'verbose_name': 'Object type', + 'verbose_name_plural': 'Object types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='PreservationType', + 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': 'Preservation type', + 'verbose_name_plural': 'Preservation types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Property', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('start_date', models.DateField(verbose_name='Start date')), + ('end_date', models.DateField(verbose_name='End date')), + ], + options={ + 'verbose_name': 'Property', + 'verbose_name_plural': 'Properties', + }, + ), + migrations.CreateModel( + name='RemarkabilityType', + 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': 'Remarkability type', + 'verbose_name_plural': 'Remarkability types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Treatment', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('label', models.CharField(max_length=200, null=True, verbose_name='Label', blank=True)), + ('other_reference', models.CharField(max_length=200, null=True, verbose_name='Other ref.', blank=True)), + ('year', models.IntegerField(default=ishtar_common.utils.get_current_year, verbose_name='Year')), + ('index', models.IntegerField(default=1, verbose_name='Index')), + ('external_id', models.CharField(max_length=200, null=True, verbose_name='External ID', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('goal', models.TextField(null=True, verbose_name='Goal', blank=True)), + ('start_date', models.DateField(null=True, verbose_name='Start date', blank=True)), + ('end_date', models.DateField(null=True, verbose_name='Closing date', blank=True)), + ('estimated_cost', models.FloatField(null=True, verbose_name='Estimated cost', blank=True)), + ('quoted_cost', models.FloatField(null=True, verbose_name='Quoted cost', blank=True)), + ('realized_cost', models.FloatField(null=True, verbose_name='Realized cost', blank=True)), + ('insurance_cost', models.FloatField(null=True, verbose_name='Insurance cost', blank=True)), + ('target_is_basket', models.BooleanField(default=False, verbose_name='Target a basket')), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', blank=True)), + ], + options={ + 'verbose_name': 'Treatment', + 'verbose_name_plural': 'Treatments', + 'permissions': (('view_treatment', 'Peut voir tous les Traitements'), ('view_own_treatment', 'Peut voir son propre Traitement'), ('add_own_treatment', 'Peut ajouter son propre Traitement'), ('change_own_treatment', 'Peut modifier son propre Traitement'), ('delete_own_treatment', 'Peut supprimer son propre Traitement')), + }, + bases=(ishtar_common.models.DashboardFormItem, ishtar_common.models.ValueGetter, models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ShortMenuItem), + ), + migrations.CreateModel( + name='TreatmentFile', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('year', models.IntegerField(default=ishtar_common.utils.get_current_year, verbose_name='Year')), + ('index', models.IntegerField(default=1, verbose_name='Index')), + ('internal_reference', models.CharField(max_length=200, null=True, verbose_name='Internal reference', blank=True)), + ('external_id', models.CharField(max_length=200, null=True, verbose_name='External ID', blank=True)), + ('name', models.TextField(null=True, verbose_name='Name', blank=True)), + ('end_date', models.DateField(null=True, verbose_name='Closing date', blank=True)), + ('creation_date', models.DateField(default=datetime.date.today, null=True, verbose_name='Creation date', blank=True)), + ('reception_date', models.DateField(null=True, verbose_name='Reception date', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', blank=True)), + ], + options={ + 'ordering': ('cached_label',), + 'verbose_name': 'Treatment request', + 'verbose_name_plural': 'Treatment requests', + 'permissions': (('view_filetreatment', 'Peut voir toutes les Demandes de traitement'), ('add_filetreatment', 'Can add Treatment request'), ('change_filetreatment', 'Can change Treatment request'), ('delete_filetreatment', 'Can delete Treatment request'), ('view_own_filetreatment', 'Peut voir sa propre Demande de traitement'), ('add_own_filetreatment', 'Peut ajouter sa propre Demande de traitement'), ('change_own_filetreatment', 'Peut modifier sa propre Demande de traitement'), ('delete_own_filetreatment', 'Peut supprimer sa propre Demande de traitement')), + }, + bases=(ishtar_common.models.DashboardFormItem, archaeological_operations.models.ClosedItem, models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter, ishtar_common.models.ShortMenuItem), + ), + migrations.CreateModel( + name='TreatmentFileSource', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('title', models.CharField(max_length=300, verbose_name='Title')), + ('external_id', models.TextField(max_length=300, null=True, verbose_name='External ID', blank=True)), + ('scale', models.CharField(max_length=30, null=True, verbose_name='Scale', blank=True)), + ('associated_url', models.URLField(null=True, verbose_name='Numerical ressource (web address)', blank=True)), + ('receipt_date', models.DateField(null=True, verbose_name='Receipt date', blank=True)), + ('creation_date', models.DateField(null=True, verbose_name='Creation date', blank=True)), + ('receipt_date_in_documentation', models.DateField(null=True, verbose_name='Receipt date in documentation', blank=True)), + ('item_number', models.IntegerField(default=1, verbose_name='Item number')), + ('reference', models.CharField(max_length=100, null=True, verbose_name='Ref.', blank=True)), + ('internal_reference', models.CharField(max_length=100, null=True, verbose_name='Internal ref.', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('additional_information', models.TextField(null=True, verbose_name='Additional information', blank=True)), + ('duplicate', models.BooleanField(default=False, verbose_name='Has a duplicate')), + ], + options={ + 'verbose_name': 'Treatment request documentation', + 'verbose_name_plural': 'Treatment request documentations', + 'permissions': (('view_filetreatmentsource', 'Can view Treatment request source'), ('view_own_filetreatmentsource', 'Can view own Treatment request source'), ('add_own_filetreatmentsource', 'Can add own Treatment request source'), ('change_own_filetreatmentsource', 'Can change own Treatment request source'), ('delete_own_filetreatmentsource', 'Can delete own Treatment request source')), + }, + bases=(ishtar_common.models.OwnPerms, models.Model), + ), + migrations.CreateModel( + name='TreatmentFileType', + 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': 'Treatment request type', + 'verbose_name_plural': 'Treatment request types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='TreatmentSource', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('title', models.CharField(max_length=300, verbose_name='Title')), + ('external_id', models.TextField(max_length=300, null=True, verbose_name='External ID', blank=True)), + ('scale', models.CharField(max_length=30, null=True, verbose_name='Scale', blank=True)), + ('associated_url', models.URLField(null=True, verbose_name='Numerical ressource (web address)', blank=True)), + ('receipt_date', models.DateField(null=True, verbose_name='Receipt date', blank=True)), + ('creation_date', models.DateField(null=True, verbose_name='Creation date', blank=True)), + ('receipt_date_in_documentation', models.DateField(null=True, verbose_name='Receipt date in documentation', blank=True)), + ('item_number', models.IntegerField(default=1, verbose_name='Item number')), + ('reference', models.CharField(max_length=100, null=True, verbose_name='Ref.', blank=True)), + ('internal_reference', models.CharField(max_length=100, null=True, verbose_name='Internal ref.', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('additional_information', models.TextField(null=True, verbose_name='Additional information', blank=True)), + ('duplicate', models.BooleanField(default=False, verbose_name='Has a duplicate')), + ], + options={ + 'verbose_name': 'Treatment documentation', + 'verbose_name_plural': 'Treament documentations', + 'permissions': (('view_treatmentsource', 'Can view all Treatment sources'), ('view_own_treatmentsource', 'Can view own Treatment source'), ('add_own_treatmentsource', 'Can add own Treatment source'), ('change_own_treatmentsource', 'Can change own Treatment source'), ('delete_own_treatmentsource', 'Can delete own Treatment source')), + }, + bases=(ishtar_common.models.OwnPerms, models.Model), + ), + migrations.CreateModel( + name='TreatmentState', + 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': 'Treatment state type', + 'verbose_name_plural': 'Treatment state types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='TreatmentType', + 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')), + ('virtual', models.BooleanField(verbose_name='Virtual')), + ('upstream_is_many', models.BooleanField(default=False, help_text="Check this if for this treatment from many finds you'll get one.", verbose_name='Upstream is many')), + ('downstream_is_many', models.BooleanField(default=False, help_text="Check this if for this treatment from one find you'll get many.", verbose_name='Downstream is many')), + ('parent', models.ForeignKey(verbose_name='Parent type', blank=True, to='archaeological_finds.TreatmentType', null=True)), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Treatment type', + 'verbose_name_plural': 'Treatment types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='FindDownstreamTreatments', + fields=[ + ('treatment', models.OneToOneField(primary_key=True, serialize=False, to='archaeological_finds.Treatment', verbose_name='Treatment')), + ('treatment_nb', models.IntegerField(verbose_name='Order')), + ], + options={ + 'ordering': ('find', '-treatment_nb'), + 'db_table': 'find_downtreatments', + 'managed': False, + }, + ), + migrations.CreateModel( + name='FindTreatments', + fields=[ + ('treatment', models.OneToOneField(primary_key=True, serialize=False, to='archaeological_finds.Treatment', verbose_name='Treatment')), + ('treatment_nb', models.IntegerField(verbose_name='Order')), + ('upstream', models.BooleanField(verbose_name='Is upstream')), + ], + options={ + 'ordering': ('find', 'upstream', '-treatment_nb'), + 'db_table': 'find_treatments', + 'managed': False, + }, + ), + migrations.CreateModel( + name='FindUpstreamTreatments', + fields=[ + ('treatment', models.OneToOneField(primary_key=True, serialize=False, to='archaeological_finds.Treatment', verbose_name='Treatment')), + ('treatment_nb', models.IntegerField(verbose_name='Order')), + ], + options={ + 'ordering': ('find', '-treatment_nb'), + 'db_table': 'find_uptreatments', + 'managed': False, + }, + ), + ] diff --git a/archaeological_finds/migrations/0002_auto_20170414_2123.py b/archaeological_finds/migrations/0002_auto_20170414_2123.py new file mode 100644 index 000000000..380ba2807 --- /dev/null +++ b/archaeological_finds/migrations/0002_auto_20170414_2123.py @@ -0,0 +1,503 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('archaeological_warehouse', '0001_initial'), + ('ishtar_common', '0001_initial'), + ('archaeological_finds', '0001_initial'), + ('archaeological_context_records', '0003_auto_20170414_2123'), + ] + + operations = [ + migrations.AddField( + model_name='treatmentsource', + name='authors', + field=models.ManyToManyField(related_name='treatmentsource_related', verbose_name='Authors', to='ishtar_common.Author'), + ), + migrations.AddField( + model_name='treatmentsource', + name='format_type', + field=models.ForeignKey(verbose_name='Format', blank=True, to='ishtar_common.Format', null=True), + ), + migrations.AddField( + model_name='treatmentsource', + name='source_type', + field=models.ForeignKey(verbose_name='Type', to='ishtar_common.SourceType'), + ), + migrations.AddField( + model_name='treatmentsource', + name='support_type', + field=models.ForeignKey(verbose_name='Support', blank=True, to='ishtar_common.SupportType', null=True), + ), + migrations.AddField( + model_name='treatmentsource', + name='treatment', + field=models.ForeignKey(related_name='source', verbose_name='Treatment', to='archaeological_finds.Treatment'), + ), + migrations.AddField( + model_name='treatmentfilesource', + name='authors', + field=models.ManyToManyField(related_name='treatmentfilesource_related', verbose_name='Authors', to='ishtar_common.Author'), + ), + migrations.AddField( + model_name='treatmentfilesource', + name='format_type', + field=models.ForeignKey(verbose_name='Format', blank=True, to='ishtar_common.Format', null=True), + ), + migrations.AddField( + model_name='treatmentfilesource', + name='source_type', + field=models.ForeignKey(verbose_name='Type', to='ishtar_common.SourceType'), + ), + migrations.AddField( + model_name='treatmentfilesource', + name='support_type', + field=models.ForeignKey(verbose_name='Support', blank=True, to='ishtar_common.SupportType', null=True), + ), + migrations.AddField( + model_name='treatmentfilesource', + name='treatment_file', + field=models.ForeignKey(related_name='source', verbose_name='Treatment request', to='archaeological_finds.TreatmentFile'), + ), + migrations.AddField( + model_name='treatmentfile', + name='applicant', + field=models.ForeignKey(related_name='treatmentfile_applicant', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Applicant', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='treatmentfile', + name='applicant_organisation', + field=models.ForeignKey(related_name='treatmentfile_applicant', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Applicant organisation', blank=True, to='ishtar_common.Organization', null=True), + ), + migrations.AddField( + model_name='treatmentfile', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='treatmentfile', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='treatmentfile', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_finds_treatmentfile', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='treatmentfile', + name='in_charge', + field=models.ForeignKey(related_name='treatmentfile_responsability', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Person in charge', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='treatmentfile', + name='type', + field=models.ForeignKey(verbose_name='Treatment request type', to='archaeological_finds.TreatmentFileType'), + ), + migrations.AddField( + model_name='treatment', + name='container', + field=models.ForeignKey(verbose_name='Container', blank=True, to='archaeological_warehouse.Container', null=True), + ), + migrations.AddField( + model_name='treatment', + name='file', + field=models.ForeignKey(related_name='treatments', verbose_name='Associated request', blank=True, to='archaeological_finds.TreatmentFile', null=True), + ), + migrations.AddField( + model_name='treatment', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='treatment', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='treatment', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_finds_treatment', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='treatment', + name='location', + field=models.ForeignKey(blank=True, to='archaeological_warehouse.Warehouse', help_text='Location where the treatment is done. Target warehouse for a move.', null=True, verbose_name='Location'), + ), + migrations.AddField( + model_name='treatment', + name='organization', + field=models.ForeignKey(related_name='treatments', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Organization', blank=True, to='ishtar_common.Organization', null=True), + ), + migrations.AddField( + model_name='treatment', + name='person', + field=models.ForeignKey(related_name='treatments', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Responsible', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='treatment', + name='treatment_state', + field=models.ForeignKey(verbose_name='State', blank=True, to='archaeological_finds.TreatmentState', null=True), + ), + migrations.AddField( + model_name='treatment', + name='treatment_types', + field=models.ManyToManyField(to='archaeological_finds.TreatmentType', verbose_name='Treatment type'), + ), + migrations.AddField( + model_name='property', + name='administrative_act', + field=models.ForeignKey(verbose_name='Administrative act', to='archaeological_operations.AdministrativeAct'), + ), + migrations.AddField( + model_name='property', + name='find', + field=models.ForeignKey(verbose_name='Find', to='archaeological_finds.Find'), + ), + migrations.AddField( + model_name='property', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='property', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='property', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_finds_property', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='property', + name='person', + field=models.ForeignKey(related_name='properties', verbose_name='Person', to='ishtar_common.Person'), + ), + migrations.AddField( + model_name='objecttype', + name='parent', + field=models.ForeignKey(verbose_name='Parent', blank=True, to='archaeological_finds.ObjectType', null=True), + ), + migrations.AddField( + model_name='materialtype', + name='parent', + field=models.ForeignKey(verbose_name='Parent material', blank=True, to='archaeological_finds.MaterialType', null=True), + ), + migrations.AddField( + model_name='historicaltreatmentfile', + name='applicant', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaltreatmentfile', + name='applicant_organisation', + 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='historicaltreatmentfile', + 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='historicaltreatmentfile', + 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='historicaltreatmentfile', + 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='historicaltreatmentfile', + name='in_charge', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaltreatmentfile', + name='type', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.TreatmentFileType', null=True), + ), + migrations.AddField( + model_name='historicaltreatment', + name='container', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_warehouse.Container', null=True), + ), + migrations.AddField( + model_name='historicaltreatment', + name='file', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.TreatmentFile', null=True), + ), + migrations.AddField( + model_name='historicaltreatment', + 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='historicaltreatment', + 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='historicaltreatment', + 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='historicaltreatment', + name='location', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_warehouse.Warehouse', null=True), + ), + migrations.AddField( + model_name='historicaltreatment', + name='organization', + 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='historicaltreatment', + name='person', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaltreatment', + name='treatment_state', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.TreatmentState', null=True), + ), + migrations.AddField( + model_name='historicalfind', + name='collection', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_warehouse.Collection', null=True), + ), + migrations.AddField( + model_name='historicalfind', + name='conservatory_state', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.ConservatoryState', null=True), + ), + migrations.AddField( + model_name='historicalfind', + name='container', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_warehouse.Container', null=True), + ), + migrations.AddField( + model_name='historicalfind', + name='downstream_treatment', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.Treatment', null=True), + ), + migrations.AddField( + model_name='historicalfind', + 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='historicalfind', + 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='historicalfind', + 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='historicalfind', + name='upstream_treatment', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.Treatment', null=True), + ), + migrations.AddField( + model_name='historicalbasefind', + name='batch', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.BatchType', null=True), + ), + migrations.AddField( + model_name='historicalbasefind', + name='context_record', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.ContextRecord', null=True), + ), + migrations.AddField( + model_name='historicalbasefind', + 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='historicalbasefind', + 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='historicalbasefind', + 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='historicalbasefind', + name='spatial_reference_system', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.SpatialReferenceSystem', null=True), + ), + migrations.AddField( + model_name='findsource', + name='authors', + field=models.ManyToManyField(related_name='findsource_related', verbose_name='Authors', to='ishtar_common.Author'), + ), + migrations.AddField( + model_name='findsource', + name='find', + field=models.ForeignKey(related_name='source', verbose_name='Find', to='archaeological_finds.Find'), + ), + migrations.AddField( + model_name='findsource', + name='format_type', + field=models.ForeignKey(verbose_name='Format', blank=True, to='ishtar_common.Format', null=True), + ), + migrations.AddField( + model_name='findsource', + name='source_type', + field=models.ForeignKey(verbose_name='Type', to='ishtar_common.SourceType'), + ), + migrations.AddField( + model_name='findsource', + name='support_type', + field=models.ForeignKey(verbose_name='Support', blank=True, to='ishtar_common.SupportType', null=True), + ), + migrations.AddField( + model_name='findbasket', + name='items', + field=models.ManyToManyField(related_name='basket', to='archaeological_finds.Find', blank=True), + ), + migrations.AddField( + model_name='findbasket', + name='user', + field=models.ForeignKey(blank=True, to='ishtar_common.IshtarUser', null=True), + ), + migrations.AddField( + model_name='find', + name='base_finds', + field=models.ManyToManyField(related_name='find', verbose_name='Base find', to='archaeological_finds.BaseFind'), + ), + migrations.AddField( + model_name='find', + name='collection', + field=models.ForeignKey(related_name='finds', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Collection', blank=True, to='archaeological_warehouse.Collection', null=True), + ), + migrations.AddField( + model_name='find', + name='conservatory_state', + field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, verbose_name='Conservatory state', blank=True, to='archaeological_finds.ConservatoryState', null=True), + ), + migrations.AddField( + model_name='find', + name='container', + field=models.ForeignKey(related_name='finds', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Container', blank=True, to='archaeological_warehouse.Container', null=True), + ), + migrations.AddField( + model_name='find', + name='datings', + field=models.ManyToManyField(related_name='find', verbose_name='Dating', to='archaeological_context_records.Dating'), + ), + migrations.AddField( + model_name='find', + name='downstream_treatment', + field=models.ForeignKey(related_name='upstream', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Downstream treatment', blank=True, to='archaeological_finds.Treatment', null=True), + ), + migrations.AddField( + model_name='find', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='find', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='find', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_finds_find', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='find', + name='integrities', + field=models.ManyToManyField(related_name='find', verbose_name='Integrity / interest', to='archaeological_finds.IntegrityType'), + ), + migrations.AddField( + model_name='find', + name='material_types', + field=models.ManyToManyField(related_name='finds', verbose_name='Material types', to='archaeological_finds.MaterialType'), + ), + migrations.AddField( + model_name='find', + name='object_types', + field=models.ManyToManyField(related_name='find', verbose_name='Object types', to='archaeological_finds.ObjectType'), + ), + migrations.AddField( + model_name='find', + name='preservation_to_considers', + field=models.ManyToManyField(related_name='finds', verbose_name='Type of preservation to consider', to='archaeological_finds.PreservationType'), + ), + migrations.AddField( + model_name='find', + name='remarkabilities', + field=models.ManyToManyField(related_name='find', verbose_name='Remarkability', to='archaeological_finds.RemarkabilityType'), + ), + migrations.AddField( + model_name='find', + name='upstream_treatment', + field=models.ForeignKey(related_name='downstream', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Upstream treatment', blank=True, to='archaeological_finds.Treatment', null=True), + ), + migrations.AddField( + model_name='conservatorystate', + name='parent', + field=models.ForeignKey(verbose_name='Parent conservatory state', blank=True, to='archaeological_finds.ConservatoryState', null=True), + ), + migrations.AddField( + model_name='basefind', + name='batch', + field=models.ForeignKey(verbose_name='Batch/object', blank=True, to='archaeological_finds.BatchType', null=True), + ), + migrations.AddField( + model_name='basefind', + name='context_record', + field=models.ForeignKey(related_name='base_finds', verbose_name='Context Record', to='archaeological_context_records.ContextRecord'), + ), + migrations.AddField( + model_name='basefind', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='basefind', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='basefind', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_finds_basefind', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='basefind', + name='spatial_reference_system', + field=models.ForeignKey(verbose_name='Spatial Reference System', blank=True, to='ishtar_common.SpatialReferenceSystem', null=True), + ), + migrations.AlterUniqueTogether( + name='treatmentfile', + unique_together=set([('year', 'index')]), + ), + migrations.AlterUniqueTogether( + name='treatment', + unique_together=set([('year', 'index')]), + ), + migrations.AlterUniqueTogether( + name='findbasket', + unique_together=set([('label', 'user')]), + ), + ] diff --git a/archaeological_finds/migrations/0003_views.py b/archaeological_finds/migrations/0003_views.py new file mode 100644 index 000000000..d405a35e1 --- /dev/null +++ b/archaeological_finds/migrations/0003_views.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations +from archaeological_finds.models import FirstBaseFindView, FindTreatments, \ + FindDownstreamTreatments, FindUpstreamTreatments, FBulkView, BFBulkView + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_finds', '0002_auto_20170414_2123'), + ] + + operations = [ + migrations.RunSQL(FindUpstreamTreatments.CREATE_SQL + + FindDownstreamTreatments.CREATE_SQL + + FindTreatments.CREATE_SQL + + FirstBaseFindView.CREATE_SQL + + FBulkView.CREATE_SQL + + BFBulkView.CREATE_SQL) + ] diff --git a/archaeological_finds/migrations/0004_auto_20170802_1557.py b/archaeological_finds/migrations/0004_auto_20170802_1557.py new file mode 100644 index 000000000..761410d90 --- /dev/null +++ b/archaeological_finds/migrations/0004_auto_20170802_1557.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_finds', '0003_views'), + ] + + operations = [ + migrations.AlterModelOptions( + name='basefind', + options={'verbose_name': 'Base find', 'verbose_name_plural': 'Base finds', 'permissions': (('view_basefind', 'Can view all Base finds'), ('view_own_basefind', 'Can view own Base find'), ('add_own_basefind', 'Can add own Base find'), ('change_own_basefind', 'Can change own Base find'), ('delete_own_basefind', 'Can delete own Base find'))}, + ), + migrations.AlterModelOptions( + name='find', + options={'ordering': ('cached_label',), 'verbose_name': 'Find', 'verbose_name_plural': 'Finds', 'permissions': (('view_find', 'Can view all Finds'), ('view_own_find', 'Can view own Find'), ('add_own_find', 'Can add own Find'), ('change_own_find', 'Can change own Find'), ('delete_own_find', 'Can delete own Find'))}, + ), + migrations.AlterModelOptions( + name='treatment', + options={'verbose_name': 'Treatment', 'verbose_name_plural': 'Treatments', 'permissions': (('view_treatment', 'Can view all Treatments'), ('view_own_treatment', 'Can view own Treatment'), ('add_own_treatment', 'Can add own Treatment'), ('change_own_treatment', 'Can change own Treatment'), ('delete_own_treatment', 'Can delete own Treatment'))}, + ), + migrations.AlterModelOptions( + name='treatmentfile', + options={'ordering': ('cached_label',), 'verbose_name': 'Treatment request', 'verbose_name_plural': 'Treatment requests', 'permissions': (('view_filetreatment', 'Can view all Treatment requests'), ('add_filetreatment', 'Can add Treatment request'), ('change_filetreatment', 'Can change Treatment request'), ('delete_filetreatment', 'Can delete Treatment request'), ('view_own_filetreatment', 'Can view own Treatment request'), ('add_own_filetreatment', 'Can add own Treatment request'), ('change_own_filetreatment', 'Can change own Treatment request'), ('delete_own_filetreatment', 'Can delete own Treatment request'))}, + ), + ] diff --git a/archaeological_finds/migrations/0005_auto_20170804_2024.py b/archaeological_finds/migrations/0005_auto_20170804_2024.py new file mode 100644 index 000000000..29a475e88 --- /dev/null +++ b/archaeological_finds/migrations/0005_auto_20170804_2024.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import re +import django.contrib.gis.db.models.fields +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_finds', '0004_auto_20170802_1557'), + ] + + operations = [ + migrations.AlterField( + model_name='basefind', + name='point', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point (3D)', blank=True), + ), + migrations.AlterField( + model_name='batchtype', + 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='conservatorystate', + 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='find', + name='integrities', + field=models.ManyToManyField(related_name='find', verbose_name='Integrity / interest', to='archaeological_finds.IntegrityType', blank=True), + ), + migrations.AlterField( + model_name='find', + name='material_types', + field=models.ManyToManyField(related_name='finds', verbose_name='Material types', to='archaeological_finds.MaterialType', blank=True), + ), + migrations.AlterField( + model_name='find', + name='object_types', + field=models.ManyToManyField(related_name='find', verbose_name='Object types', to='archaeological_finds.ObjectType', blank=True), + ), + migrations.AlterField( + model_name='find', + name='preservation_to_considers', + field=models.ManyToManyField(related_name='finds', verbose_name='Type of preservation to consider', to='archaeological_finds.PreservationType', blank=True), + ), + migrations.AlterField( + model_name='find', + name='remarkabilities', + field=models.ManyToManyField(related_name='find', verbose_name='Remarkability', to='archaeological_finds.RemarkabilityType', blank=True), + ), + migrations.AlterField( + model_name='historicalbasefind', + name='point', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point (3D)', blank=True), + ), + migrations.AlterField( + model_name='integritytype', + 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='materialtype', + 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='objecttype', + 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='preservationtype', + 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='remarkabilitytype', + 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='treatmentfiletype', + 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='treatmentstate', + 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='treatmenttype', + 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/archaeological_finds/migrations/0006_auto_20170826_1152.py b/archaeological_finds/migrations/0006_auto_20170826_1152.py new file mode 100644 index 000000000..ba29a939f --- /dev/null +++ b/archaeological_finds/migrations/0006_auto_20170826_1152.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-26 11:52 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_finds', '0005_auto_20170804_2024'), + ] + + operations = [ + migrations.AlterField( + model_name='batchtype', + 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='conservatorystate', + 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='integritytype', + 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='materialtype', + 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='objecttype', + 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='preservationtype', + 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='remarkabilitytype', + 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='treatmentfiletype', + 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='treatmentstate', + 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='treatmenttype', + 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/archaeological_finds/migrations/0007_auto_20170829_1639.py b/archaeological_finds/migrations/0007_auto_20170829_1639.py new file mode 100644 index 000000000..1a646d2fa --- /dev/null +++ b/archaeological_finds/migrations/0007_auto_20170829_1639.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-29 16:39 +from __future__ import unicode_literals + +from django.db import migrations, models +import ishtar_common.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_finds', '0006_auto_20170826_1152'), + ] + + operations = [ + migrations.AlterField( + model_name='find', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='find', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='findsource', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='findsource', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='treatment', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='treatment', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='treatmentfilesource', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='treatmentfilesource', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='treatmentsource', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='treatmentsource', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + ] diff --git a/archaeological_finds/migrations/0086_auto__chg_field_treatmentsource_external_id__chg_field_treatmentfileso.py b/archaeological_finds/migrations/0086_auto__chg_field_treatmentsource_external_id__chg_field_treatmentfileso.py deleted file mode 100644 index 32789a1ee..000000000 --- a/archaeological_finds/migrations/0086_auto__chg_field_treatmentsource_external_id__chg_field_treatmentfileso.py +++ /dev/null @@ -1,1251 +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): - - # Changing field 'TreatmentSource.external_id' - db.alter_column('archaeological_finds_treatmentsource', 'external_id', self.gf('django.db.models.fields.TextField')(max_length=300, null=True)) - - # Changing field 'TreatmentFileSource.external_id' - db.alter_column('archaeological_finds_treatmentfilesource', 'external_id', self.gf('django.db.models.fields.TextField')(max_length=300, null=True)) - - # Changing field 'FindSource.external_id' - db.alter_column('archaeological_finds_findsource', 'external_id', self.gf('django.db.models.fields.TextField')(max_length=300, null=True)) - - def backwards(self, orm): - - # Changing field 'TreatmentSource.external_id' - db.alter_column('archaeological_finds_treatmentsource', 'external_id', self.gf('django.db.models.fields.CharField')(max_length=12, null=True)) - - # Changing field 'TreatmentFileSource.external_id' - db.alter_column('archaeological_finds_treatmentfilesource', 'external_id', self.gf('django.db.models.fields.CharField')(max_length=12, null=True)) - - # Changing field 'FindSource.external_id' - db.alter_column('archaeological_finds_findsource', 'external_id', self.gf('django.db.models.fields.CharField')(max_length=12, null=True)) - - models = { - 'archaeological_context_records.activitytype': { - 'Meta': {'ordering': "('order',)", 'object_name': 'ActivityType'}, - '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', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.contextrecord': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'ContextRecord'}, - 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), - 'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'documentations': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.DocumentationType']", 'null': 'True', 'blank': 'True'}), - 'excavation_technic': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ExcavationTechnicType']", 'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'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'}), - 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_context_records_contextrecord'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), - 'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), - 'related_context_records': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.ContextRecord']", 'null': 'True', 'through': "orm['archaeological_context_records.RecordRelations']", 'blank': 'True'}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), - 'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.dating': { - 'Meta': {'object_name': 'Dating'}, - 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), - 'precise_dating': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.datingquality': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DatingQuality'}, - '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'}) - }, - 'archaeological_context_records.datingtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DatingType'}, - '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'}) - }, - 'archaeological_context_records.documentationtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DocumentationType'}, - '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'}) - }, - 'archaeological_context_records.excavationtechnictype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ExcavationTechnicType'}, - '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'}) - }, - 'archaeological_context_records.identificationtype': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'IdentificationType'}, - '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', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.recordrelations': { - 'Meta': {'object_name': 'RecordRelations'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']"}), - 'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}) - }, - 'archaeological_context_records.relationtype': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, - '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'}), - 'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']", 'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.unit': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'Unit'}, - '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', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_files.file': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - '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'}), - 'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), - 'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), - 'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, - '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'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, - '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'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), - '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'}) - }, - 'archaeological_finds.basefind': { - 'Meta': {'object_name': 'BaseFind'}, - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'batch': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.BatchType']", 'null': 'True', 'blank': 'True'}), - 'cache_complete_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cache_short_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'base_finds'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'discovery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_error_x': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_error_y': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_error_z': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'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_archaeological_finds_basefind'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'label': ('django.db.models.fields.TextField', [], {}), - 'line': ('django.contrib.gis.db.models.fields.LineStringField', [], {'null': 'True', 'blank': 'True'}), - 'material_index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), - 'point_2d': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), - 'spatial_reference_system': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SpatialReferenceSystem']", 'null': 'True', 'blank': 'True'}), - 'special_interest': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'topographic_localisation': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'x': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'y': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'z': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_finds.batchtype': { - 'Meta': {'ordering': "('order',)", 'object_name': 'BatchType'}, - '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'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_finds.conservatorystate': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ConservatoryState'}, - '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'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.ConservatoryState']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_finds.find': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'Find'}, - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'base_finds': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'find'", 'symmetrical': 'False', 'to': "orm['archaeological_finds.BaseFind']"}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'check_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'checked': ('django.db.models.fields.CharField', [], {'default': "'NC'", 'max_length': '2'}), - 'collection': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'finds'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['archaeological_warehouse.Collection']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'conservatory_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'conservatory_state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.ConservatoryState']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), - 'container': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'finds'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['archaeological_warehouse.Container']"}), - 'dating_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'find'", 'symmetrical': 'False', 'to': "orm['archaeological_context_records.Dating']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'dimensions_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'downstream_treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'upstream'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['archaeological_finds.Treatment']"}), - 'estimated_value': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'find_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'height': ('django.db.models.fields.FloatField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_finds_find'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'integrities': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'find'", 'symmetrical': 'False', 'to': "orm['archaeological_finds.IntegrityType']"}), - 'is_complete': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.TextField', [], {}), - 'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'mark': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'material_types': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'finds'", 'symmetrical': 'False', 'to': "orm['archaeological_finds.MaterialType']"}), - 'min_number_of_individuals': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'object_types': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'find'", 'symmetrical': 'False', 'to': "orm['archaeological_finds.ObjectType']"}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'preservation_to_considers': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'finds'", 'symmetrical': 'False', 'to': "orm['archaeological_finds.PreservationType']"}), - 'previous_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'remarkabilities': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'find'", 'symmetrical': 'False', 'to': "orm['archaeological_finds.RemarkabilityType']"}), - 'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'upstream_treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'downstream'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['archaeological_finds.Treatment']"}), - 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'weight': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'weight_unit': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_finds.findbasket': { - 'Meta': {'unique_together': "(('label', 'user'),)", 'object_name': 'FindBasket'}, - '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'}), - 'items': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'basket'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['archaeological_finds.Find']"}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '1000'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_finds.finddownstreamtreatments': { - 'Meta': {'ordering': "('find', '-treatment_nb')", 'unique_together': "(('find', 'treatment'),)", 'object_name': 'FindDownstreamTreatments', 'db_table': "'find_downtreatments'", 'managed': 'False'}, - 'find': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'finddownstreamtreatments_related'", 'to': "orm['archaeological_finds.Find']"}), - 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.Treatment']", 'primary_key': 'True'}), - 'treatment_nb': ('django.db.models.fields.IntegerField', [], {}) - }, - 'archaeological_finds.findsource': { - 'Meta': {'object_name': 'FindSource'}, - 'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'findsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'find': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_finds.Find']"}), - 'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) - }, - 'archaeological_finds.findtreatments': { - 'Meta': {'ordering': "('find', 'upstream', '-treatment_nb')", 'unique_together': "(('find', 'treatment'),)", 'object_name': 'FindTreatments', 'db_table': "'find_treatments'", 'managed': 'False'}, - 'find': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'findtreatments_related'", 'to': "orm['archaeological_finds.Find']"}), - 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.Treatment']", 'primary_key': 'True'}), - 'treatment_nb': ('django.db.models.fields.IntegerField', [], {}), - 'upstream': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'archaeological_finds.findupstreamtreatments': { - 'Meta': {'ordering': "('find', '-treatment_nb')", 'unique_together': "(('find', 'treatment'),)", 'object_name': 'FindUpstreamTreatments', 'db_table': "'find_uptreatments'", 'managed': 'False'}, - 'find': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'findupstreamtreatments_related'", 'to': "orm['archaeological_finds.Find']"}), - 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.Treatment']", 'primary_key': 'True'}), - 'treatment_nb': ('django.db.models.fields.IntegerField', [], {}) - }, - 'archaeological_finds.historicalbasefind': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalBaseFind'}, - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'batch_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'cache_complete_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cache_short_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'context_record_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'discovery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_error_x': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_error_y': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_error_z': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'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'}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'label': ('django.db.models.fields.TextField', [], {}), - 'line': ('django.contrib.gis.db.models.fields.LineStringField', [], {'null': 'True', 'blank': 'True'}), - 'material_index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), - 'point_2d': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), - 'spatial_reference_system_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'special_interest': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'topographic_localisation': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'x': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'y': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'z': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_finds.historicalfind': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalFind'}, - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'check_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'checked': ('django.db.models.fields.CharField', [], {'default': "'NC'", 'max_length': '2'}), - 'collection_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'conservatory_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'conservatory_state_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'container_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'dating_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'dimensions_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'downstream_treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'estimated_value': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'find_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'height': ('django.db.models.fields.FloatField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'is_complete': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.TextField', [], {}), - 'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'mark': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'min_number_of_individuals': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'previous_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'upstream_treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'weight': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'weight_unit': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_finds.historicaltreatment': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalTreatment'}, - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'container_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'goal': ('django.db.models.fields.TextField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'insurance_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'location_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'organization_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'other_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'person_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'quoted_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'realized_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'target_is_basket': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'treatment_state_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_finds.historicaltreatmentfile': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalTreatmentFile'}, - 'applicant_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'applicant_organisation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', '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'}), - 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_finds.integritytype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'IntegrityType'}, - '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'}) - }, - 'archaeological_finds.materialtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'MaterialType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': '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'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.MaterialType']", 'null': 'True', 'blank': 'True'}), - 'recommendation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_finds.objecttype': { - 'Meta': {'ordering': "('parent__label', 'label')", 'object_name': 'ObjectType'}, - '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'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.ObjectType']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_finds.preservationtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'PreservationType'}, - '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'}) - }, - 'archaeological_finds.property': { - 'Meta': {'object_name': 'Property'}, - 'administrative_act': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.AdministrativeAct']"}), - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'find': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.Find']"}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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_archaeological_finds_property'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'properties'", 'to': "orm['ishtar_common.Person']"}), - 'start_date': ('django.db.models.fields.DateField', [], {}) - }, - 'archaeological_finds.remarkabilitytype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'RemarkabilityType'}, - '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'}) - }, - 'archaeological_finds.treatment': { - 'Meta': {'unique_together': "(('year', 'index'),)", 'object_name': 'Treatment'}, - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), - 'goal': ('django.db.models.fields.TextField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_finds_treatment'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'insurance_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']", 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'other_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'quoted_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'realized_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'target_is_basket': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'treatment_state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentState']", 'null': 'True', 'blank': 'True'}), - 'treatment_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_finds.TreatmentType']", 'symmetrical': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_finds.treatmentfile': { - 'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('year', 'index'),)", 'object_name': 'TreatmentFile'}, - 'applicant': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'applicant_organisation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', '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_archaeological_finds_treatmentfile'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentFileType']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_finds.treatmentfilesource': { - 'Meta': {'object_name': 'TreatmentFileSource'}, - 'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'treatmentfilesource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'treatment_file': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_finds.TreatmentFile']"}) - }, - 'archaeological_finds.treatmentfiletype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentFileType'}, - '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'}) - }, - 'archaeological_finds.treatmentsource': { - 'Meta': {'object_name': 'TreatmentSource'}, - 'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'treatmentsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_finds.Treatment']"}) - }, - 'archaeological_finds.treatmentstate': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentState'}, - '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'}) - }, - 'archaeological_finds.treatmenttype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'downstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - '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'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentType']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'upstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'virtual': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'archaeological_operations.acttype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ActType'}, - 'associated_template': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'acttypes'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.DocumentTemplate']"}), - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'indexed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.administrativeact': { - 'Meta': {'ordering': "('year', 'signature_date', 'index', 'act_type')", 'object_name': 'AdministrativeAct'}, - 'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'departments_label': ('django.db.models.fields.TextField', [], {'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_archaeological_operations_administrativeact'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operation_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'signatory'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), - 'treatment_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.archaeologicalsite': { - 'Meta': {'object_name': 'ArchaeologicalSite'}, - '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_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, - 'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'code_patriarche': ('django.db.models.fields.TextField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'operation_collaborator'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Person']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), - 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), - 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', '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_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.period': { - 'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, - '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'}) - }, - 'archaeological_operations.reportstate': { - 'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, - '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', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_warehouse.collection': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Collection'}, - 'description': ('django.db.models.fields.TextField', [], {'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_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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_archaeological_warehouse_collection'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'collections'", 'to': "orm['archaeological_warehouse.Warehouse']"}) - }, - 'archaeological_warehouse.container': { - 'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('index', 'location'),)", 'object_name': 'Container'}, - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cached_location': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), - 'external_id': ('django.db.models.fields.TextField', [], {'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_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_container'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_warehouse.containertype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ContainerType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_warehouse.warehouse': { - 'Meta': {'object_name': 'Warehouse'}, - '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'}), - 'associated_divisions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']", 'symmetrical': 'False', 'through': "orm['archaeological_warehouse.WarehouseDivisionLink']", 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'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'}), - 'external_id': ('django.db.models.fields.TextField', [], {'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_archaeological_warehouse_warehouse'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'warehouse_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - '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'}), - 'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) - }, - 'archaeological_warehouse.warehousedivision': { - 'Meta': {'object_name': 'WarehouseDivision'}, - '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'}) - }, - 'archaeological_warehouse.warehousedivisionlink': { - 'Meta': {'ordering': "('warehouse', 'order')", 'unique_together': "(('warehouse', 'division'),)", 'object_name': 'WarehouseDivisionLink'}, - 'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}), - 'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}) - }, - 'archaeological_warehouse.warehousetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'WarehouseType'}, - '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'}) - }, - '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': {'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.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.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.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.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.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.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 = ['archaeological_finds']
\ No newline at end of file diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 66059079b..811e6be74 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -28,17 +28,19 @@ from django.db.models.signals import m2m_changed, post_save, post_delete, \ pre_delete from django.utils.translation import ugettext_lazy as _, ugettext +from ishtar_common.data_importer import post_importer_action, ImporterError from ishtar_common.utils import cached_label_changed, post_save_point from ishtar_common.models import GeneralType, ImageModel, BaseHistorizedItem, \ ShortMenuItem, LightHistorizedItem, HistoricalRecords, OwnPerms, Source, \ - Person, Basket, get_external_id, post_save_cache, ValueGetter, \ + Person, Basket, post_save_cache, ValueGetter, \ get_current_profile from archaeological_operations.models import AdministrativeAct from archaeological_context_records.models import ContextRecord, Dating -from ishtar_common.models import PRIVATE_FIELDS, SpatialReferenceSystem +from ishtar_common.models import PRIVATE_FIELDS, SpatialReferenceSystem, \ + BulkUpdatedItem class MaterialType(GeneralType): @@ -148,7 +150,9 @@ class BFBulkView(object): """ -class BaseFind(BaseHistorizedItem, OwnPerms): +class BaseFind(BulkUpdatedItem, BaseHistorizedItem, OwnPerms): + EXTERNAL_ID_KEY = 'base_find_external_id' + EXTERNAL_ID_DEPENDENCIES = ['find'] label = models.TextField(_(u"Free ID")) external_id = models.TextField(_(u"External ID"), blank=True, null=True) auto_external_id = models.BooleanField( @@ -182,7 +186,7 @@ class BaseFind(BaseHistorizedItem, OwnPerms): SpatialReferenceSystem, verbose_name=_(u"Spatial Reference System"), blank=True, null=True) point_2d = models.PointField(_(u"Point (2D)"), blank=True, null=True) - point = models.PointField(_(u"Point"), blank=True, null=True, dim=3) + point = models.PointField(_(u"Point (3D)"), blank=True, null=True, dim=3) line = models.LineStringField(_(u"Line"), blank=True, null=True) polygon = models.PolygonField(_(u"Polygon"), blank=True, null=True) cache_short_id = models.TextField( @@ -199,11 +203,11 @@ class BaseFind(BaseHistorizedItem, OwnPerms): verbose_name = _(u"Base find") verbose_name_plural = _(u"Base finds") permissions = ( - ("view_basefind", ugettext(u"Can view all Base finds")), - ("view_own_basefind", ugettext(u"Can view own Base find")), - ("add_own_basefind", ugettext(u"Can add own Base find")), - ("change_own_basefind", ugettext(u"Can change own Base find")), - ("delete_own_basefind", ugettext(u"Can delete own Base find")), + ("view_basefind", u"Can view all Base finds"), + ("view_own_basefind", u"Can view own Base find"), + ("add_own_basefind", u"Can add own Base find"), + ("change_own_basefind", u"Can change own Base find"), + ("delete_own_basefind", u"Can delete own Base find"), ) def __unicode__(self): @@ -224,12 +228,12 @@ class BaseFind(BaseHistorizedItem, OwnPerms): profile = get_current_profile() if profile.find_index == u'O': operation = self.context_record.operation - q = Find.objects \ - .filter(base_finds__context_record__operation=operation) + q = BaseFind.objects \ + .filter(context_record__operation=operation) elif profile.find_index == u'CR': cr = self.context_record - q = Find.objects \ - .filter(base_finds__context_record=cr) + q = BaseFind.objects \ + .filter(context_record=cr) else: return False if self.pk: @@ -326,31 +330,13 @@ class BaseFind(BaseHistorizedItem, OwnPerms): return self.label @classmethod - def get_extra_fields(cls): - fields = {} - for field in Find._meta.many_to_many: - if field.name == 'base_finds': - fields['find'] = field.related.model - return fields - - def save(self, *args, **kwargs): - returned = super(BaseFind, self).save(*args, **kwargs) - - updated = False - if not self.external_id or self.auto_external_id: - external_id = get_external_id('base_find_external_id', self) - if external_id != self.external_id: - updated = True - self.auto_external_id = True - self.external_id = external_id - if updated: - self._cached_label_checked = False - self.save() - return returned - - @classmethod def cached_label_bulk_update(cls, operation_id=None, parcel_id=None, - context_record_id=None): + context_record_id=None, transaction_id=None): + transaction_id, is_recursion = cls.bulk_recursion( + transaction_id, [operation_id, parcel_id, context_record_id]) + if is_recursion: + return + if operation_id: filters = """ INNER JOIN archaeological_context_records_contextrecord acr @@ -373,6 +359,7 @@ class BaseFind(BaseHistorizedItem, OwnPerms): kwargs = {'context_record_id': context_record_id} else: return + kwargs['transaction_id'] = transaction_id sql = """ UPDATE "archaeological_finds_basefind" AS bf @@ -450,12 +437,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms): ope_prefix=settings.ISHTAR_DEF_OPE_PREFIX, join=settings.JOINT, filters=filters, zeros=settings.ISHTAR_FINDS_INDEX_ZERO_LEN * "0") - # with connection.cursor() as c: # django 1.8 - c = connection.cursor() - c.execute(sql, args) - transaction.commit_unless_managed() - cls._meta.get_field_by_name( - 'find')[0].model.cached_label_bulk_update(**kwargs) + with connection.cursor() as c: + c.execute(sql, args) + Find.cached_label_bulk_update(**kwargs) post_save.connect(post_save_point, sender=BaseFind) @@ -470,8 +454,7 @@ CHECK_CHOICES = (('NC', _(u"Not checked")), class FindBasket(Basket): - items = models.ManyToManyField('Find', blank=True, null=True, - related_name='basket') + items = models.ManyToManyField('Find', blank=True, related_name='basket') class FirstBaseFindView(object): @@ -510,8 +493,9 @@ class FBulkView(object): """ -class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, - ShortMenuItem): +class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, ImageModel, + OwnPerms, ShortMenuItem): + EXTERNAL_ID_KEY = 'find_external_id' CHECK_DICT = dict(CHECK_CHOICES) SHOW_URL = 'show-find' SLUG = 'find' @@ -519,7 +503,7 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, 'base_finds__context_record__operation__common_name', 'base_finds__context_record__parcel', 'base_finds__context_record__label', - 'material_types__label', 'object_types', + 'material_types__label', 'object_types__label', 'datings__period__label', 'container__cached_label', 'base_finds__batch', ] @@ -530,7 +514,7 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, 'base_finds__cache_short_id', 'base_finds__cache_complete_id', 'previous_id', 'label', 'material_types__label', - 'datings__period__label', 'find_number', 'object_types', + 'datings__period__label', 'find_number', 'object_types__label', 'container__cached_label', 'description', 'base_finds__context_record__parcel__town', @@ -557,6 +541,7 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, 'container__cached_label': _(u"Container"), 'datings__period__label': _(u"Periods"), 'material_types__label': _(u"Material types"), + 'object_types__label': _(u"Object types"), } EXTRA_FULL_FIELDS = [ @@ -636,7 +621,9 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, label = models.TextField(_(u"Free ID")) description = models.TextField(_(u"Description"), blank=True, null=True) material_types = models.ManyToManyField( - MaterialType, verbose_name=_(u"Material types"), related_name='finds') + MaterialType, verbose_name=_(u"Material types"), related_name='finds', + blank=True + ) conservatory_state = models.ForeignKey( ConservatoryState, verbose_name=_(u"Conservatory state"), blank=True, null=True, on_delete=models.SET_NULL) @@ -644,7 +631,7 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, blank=True, null=True) preservation_to_considers = models.ManyToManyField( PreservationType, verbose_name=_(u"Type of preservation to consider"), - related_name='finds') + related_name='finds', blank=True) volume = models.FloatField(_(u"Volume (l)"), blank=True, null=True) weight = models.FloatField(_(u"Weight (g)"), blank=True, null=True) weight_unit = models.CharField(_(u"Weight unit"), max_length=4, @@ -666,13 +653,15 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, is_complete = models.NullBooleanField(_(u"Is complete?"), blank=True, null=True) object_types = models.ManyToManyField( - ObjectType, verbose_name=_(u"Object types"), related_name='find') + ObjectType, verbose_name=_(u"Object types"), related_name='find', + blank=True + ) integrities = models.ManyToManyField( IntegrityType, verbose_name=_(u"Integrity / interest"), - related_name='find') + related_name='find', blank=True) remarkabilities = models.ManyToManyField( RemarkabilityType, verbose_name=_(u"Remarkability"), - related_name='find') + related_name='find', blank=True) min_number_of_individuals = models.IntegerField( _(u"Minimum number of individuals (MNI)"), blank=True, null=True) length = models.FloatField(_(u"Length (cm)"), blank=True, null=True) @@ -688,7 +677,7 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, null=True) previous_id = models.TextField(_(u"Previous ID"), blank=True, null=True) index = models.IntegerField(u"Index", default=0) - checked = models.CharField(_(u"Check"), max_length=2, default='NC', + checked = models.CharField(_(u"Check"), max_length=2, default=u'NC', choices=CHECK_CHOICES) check_date = models.DateField(_(u"Check date"), default=datetime.date.today) @@ -700,17 +689,16 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, cached_label = models.TextField(_(u"Cached name"), null=True, blank=True) history = HistoricalRecords() BASKET_MODEL = FindBasket - IMAGE_PREFIX = 'finds/' class Meta: verbose_name = _(u"Find") verbose_name_plural = _(u"Finds") permissions = ( - ("view_find", ugettext(u"Can view all Finds")), - ("view_own_find", ugettext(u"Can view own Find")), - ("add_own_find", ugettext(u"Can add own Find")), - ("change_own_find", ugettext(u"Can change own Find")), - ("delete_own_find", ugettext(u"Can delete own Find")), + ("view_find", u"Can view all Finds"), + ("view_own_find", u"Can view own Find"), + ("add_own_find", u"Can add own Find"), + ("change_own_find", u"Can change own Find"), + ("delete_own_find", u"Can delete own Find"), ) ordering = ('cached_label',) @@ -733,6 +721,11 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, return u" ; ".join([unicode(dating) for dating in self.datings.all()]) @property + def materials(self): + return u" ; ".join([unicode(material) + for material in self.material_types.all()]) + + @property def show_url(self): return reverse('show-find', args=[self.pk, '']) @@ -753,10 +746,9 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, return lbl def get_first_base_find(self): - q = self.base_finds - if not q.count(): + if not self.base_finds.count(): return - return q.order_by('-pk').all()[0] + return self.base_finds.order_by('-pk').all()[0] @property def reference(self): @@ -765,15 +757,43 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, return "00" return bf.short_id() + def _get_base_image_path(self): + bf = None + if self.id: + bf = self.get_first_base_find() + if not bf: + return u"detached/{}".format(self.SLUG) + ope = bf.context_record.operation + find_idx = u'{:0' + str(settings.ISHTAR_FINDS_INDEX_ZERO_LEN) + 'd}' + return (u"operation/{}/{}/{}/" + find_idx).format( + ope.year, ope.reference, self.SLUG, self.index) + @property def administrative_index(self): bf = self.get_first_base_find() if not bf or not bf.context_record or not bf.context_record.operation: return "" - return "{}-{}".format( + return u"{}-{}".format( bf.context_record.operation.get_reference(), self.index) + def context_records_lbl(self): + return u" - ".join( + [bf.context_record.cached_label for bf in self.base_finds.all()] + ) + context_records_lbl.short_description = _(u"Context record") + context_records_lbl.admin_order_field = \ + "base_finds__context_record__cached_label" + + def operations_lbl(self): + return u" - ".join( + [bf.context_record.operation.cached_label + for bf in self.base_finds.all()] + ) + operations_lbl.short_description = _(u"Operation") + operations_lbl.admin_order_field = \ + "base_finds__context_record__operation__cached_label" + def _get_treatments(self, model, rel='upstream', limit=None): treatments, findtreats = [], [] q = model.objects.filter( @@ -909,14 +929,14 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, return new @classmethod - def get_query_owns(cls, user): - return (Q(base_finds__context_record__operation__scientist=user. + def get_query_owns(cls, ishtaruser): + return (Q(base_finds__context_record__operation__scientist= ishtaruser.person) | - Q(base_finds__context_record__operation__in_charge=user. + Q(base_finds__context_record__operation__in_charge= ishtaruser.person) | - Q(base_finds__context_record__operation__collaborators__pk=user. + Q(base_finds__context_record__operation__collaborators__pk= ishtaruser.person.pk) | - Q(history_creator=user)) \ + Q(history_creator=ishtaruser.user_ptr)) \ & Q(base_finds__context_record__operation__end_date__isnull=True) @classmethod @@ -937,7 +957,12 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, @classmethod def cached_label_bulk_update(cls, operation_id=None, parcel_id=None, - context_record_id=None): + context_record_id=None, transaction_id=None): + transaction_id, is_recursion = cls.bulk_recursion( + transaction_id, [operation_id, parcel_id, context_record_id]) + if is_recursion: + return + if operation_id: filters = """ INNER JOIN find_first_base_find myfbf @@ -1007,10 +1032,82 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, ope_prefix=settings.ISHTAR_DEF_OPE_PREFIX, join=settings.JOINT, filters=filters, zeros=settings.ISHTAR_FINDS_INDEX_ZERO_LEN * "0") - # with connection.cursor() as c: # django 1.8 - c = connection.cursor() - c.execute(sql, args) - transaction.commit_unless_managed() + with connection.cursor() as c: + c.execute(sql, args) + + def get_localisation(self, place): + """ + Get localisation reference in the warehouse + + :param place: number of the localisation starting with 0 + :return: reference - empty string if not available + """ + if not self.container: + return "" + locas = self.container.get_localisations() + if len(locas) < (place + 1): + return "" + return locas[place] + + @property + def localisation_1(self): + return self.get_localisation(0) + + @property + def localisation_2(self): + return self.get_localisation(1) + + @property + def localisation_3(self): + return self.get_localisation(2) + + @property + def localisation_4(self): + return self.get_localisation(3) + + @property + def localisation_5(self): + return self.get_localisation(4) + + @property + def localisation_6(self): + return self.get_localisation(5) + + def set_localisation(self, place, context, value): + if not self.container: + raise ImporterError(_(u"No container have been set - the " + u"localisation cannot be set.")) + + localisation = self.container.set_localisation(place, value) + if not localisation: + raise ImporterError( + unicode(_(u"The division number {} have not been set " + u"for the warehouse {}.")).format( + place + 1, self.container.location)) + + @post_importer_action + def set_localisation_1(self, context, value): + return self.set_localisation(0, context, value) + + @post_importer_action + def set_localisation_2(self, context, value): + return self.set_localisation(1, context, value) + + @post_importer_action + def set_localisation_3(self, context, value): + return self.set_localisation(2, context, value) + + @post_importer_action + def set_localisation_4(self, context, value): + return self.set_localisation(3, context, value) + + @post_importer_action + def set_localisation_5(self, context, value): + return self.set_localisation(4, context, value) + + @post_importer_action + def set_localisation_6(self, context, value): + return self.set_localisation(5, context, value) def generate_index(self): """ @@ -1052,14 +1149,8 @@ class Find(ValueGetter, BaseHistorizedItem, ImageModel, OwnPerms, def save(self, *args, **kwargs): super(Find, self).save(*args, **kwargs) - updated = False self.skip_history_when_saving = True - if not self.external_id or self.auto_external_id: - external_id = get_external_id('find_external_id', self) - if external_id != self.external_id: - updated = True - self.auto_external_id = True - self.external_id = external_id + updated = self.update_external_id(save=False) if updated: self._cached_label_checked = False self.save() @@ -1175,15 +1266,15 @@ class FindSource(Source): verbose_name_plural = _(u"Find documentations") permissions = ( ("view_findsource", - ugettext(u"Can view all Find sources")), + u"Can view all Find sources"), ("view_own_findsource", - ugettext(u"Can view own Find source")), + u"Can view own Find source"), ("add_own_findsource", - ugettext(u"Can add own Find source")), + u"Can add own Find source"), ("change_own_findsource", - ugettext(u"Can change own Find source")), + u"Can change own Find source"), ("delete_own_findsource", - ugettext(u"Can delete own Find source")), + u"Can delete own Find source"), ) find = models.ForeignKey(Find, verbose_name=_(u"Find"), related_name="source") @@ -1193,13 +1284,13 @@ class FindSource(Source): return self.find @classmethod - def get_query_owns(cls, user): - return (Q(find__base_finds__context_record__operation__scientist=user. + def get_query_owns(cls, ishtaruser): + return (Q(find__base_finds__context_record__operation__scientist= ishtaruser.person) | - Q(find__base_finds__context_record__operation__in_charge=user. + Q(find__base_finds__context_record__operation__in_charge= ishtaruser.person) | Q( - find__base_finds__context_record__operation__collaborators__pk=user. + find__base_finds__context_record__operation__collaborators__pk= ishtaruser.person.pk)) \ & Q( find__base_finds__context_record__operation__end_date__isnull=True) diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 47f60bb44..866e218aa 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -27,7 +27,7 @@ from django.template.defaultfilters import slugify from django.utils.translation import ugettext_lazy as _, ugettext -from ishtar_common.utils import cached_label_changed +from ishtar_common.utils import cached_label_changed, get_current_year from ishtar_common.models import GeneralType, ImageModel, BaseHistorizedItem, \ OwnPerms, HistoricalRecords, Person, Organization, Source, \ ValueGetter, post_save_cache, ShortMenuItem, DashboardFormItem @@ -92,7 +92,6 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, "treatment_types__label": _(u"Type"), "treatment_state__label": _(u"State"), } - IMAGE_PREFIX = 'treatment' # extra keys than can be passed to save method EXTRA_SAVED_KEYS = ('items', 'user') SLUG = 'treatment' @@ -100,8 +99,7 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, max_length=200) other_reference = models.CharField(_(u"Other ref."), blank=True, null=True, max_length=200) - year = models.IntegerField(_(u"Year"), - default=lambda: datetime.datetime.now().year) + year = models.IntegerField(_(u"Year"), default=get_current_year) index = models.IntegerField(_(u"Index"), default=1) file = models.ForeignKey( 'TreatmentFile', related_name='treatments', blank=True, null=True, @@ -149,11 +147,11 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, verbose_name_plural = _(u"Treatments") unique_together = ('year', 'index') permissions = ( - ("view_treatment", ugettext(u"Can view all Treatments")), - ("view_own_treatment", ugettext(u"Can view own Treatment")), - ("add_own_treatment", ugettext(u"Can add own Treatment")), - ("change_own_treatment", ugettext(u"Can change own Treatment")), - ("delete_own_treatment", ugettext(u"Can delete own Treatment")), + ("view_treatment", u"Can view all Treatments"), + ("view_own_treatment", u"Can view own Treatment"), + ("add_own_treatment", u"Can add own Treatment"), + ("change_own_treatment", u"Can change own Treatment"), + ("delete_own_treatment", u"Can delete own Treatment"), ) def __unicode__(self): @@ -168,9 +166,9 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, return _(u"TREATMENT") @classmethod - def get_query_owns(cls, user): - return (Q(history_creator=user) | - Q(person__ishtaruser=user.ishtaruser)) \ + def get_query_owns(cls, ishtaruser): + return (Q(history_creator=ishtaruser.user_ptr) | + Q(person__ishtaruser=ishtaruser)) \ & Q(end_date__isnull=True) @classmethod @@ -203,12 +201,36 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, getattr(self, k)] return u'{} | {}'.format(u"-".join(items), self.treatment_types_lbl()) + def _get_base_image_path(self,): + return u"treatment/{}/{}".format( + self.year, self.index) + def treatment_types_lbl(self): """ Treatment types label :return: string """ return u" ; ".join([unicode(t) for t in self.treatment_types.all()]) + treatment_types_lbl.short_description = _(u"Treatment types") + treatment_types_lbl.admin_order_field = 'treatment_types__label' + + def downstream_lbl(self): + """ + Downstream finds label + :return: string + """ + return u" ; ".join([f.cached_label for f in self.downstream.all()]) + downstream_lbl.short_description = _(u"Downstream finds") + downstream_lbl.admin_order_field = 'downstream__cached_label' + + def upstream_lbl(self): + """ + Upstream finds label + :return: string + """ + return u" ; ".join([f.cached_label for f in self.upstream.all()]) + upstream_lbl.short_description = _(u"Upstream finds") + upstream_lbl.admin_order_field = 'upstream__cached_label' def get_values(self, prefix=''): values = super(Treatment, self).get_values(prefix=prefix) @@ -297,8 +319,8 @@ pre_delete.connect(pre_delete_treatment, sender=Treatment) class AbsFindTreatments(models.Model): find = models.ForeignKey(Find, verbose_name=_(u"Find"), related_name='%(class)s_related') - treatment = models.ForeignKey(Treatment, verbose_name=_(u"Treatment"), - primary_key=True) + treatment = models.OneToOneField(Treatment, verbose_name=_(u"Treatment"), + primary_key=True) # primary_key is set to prevent django to ask for an id column # treatment is not a primary key treatment_nb = models.IntegerField(_(u"Order")) @@ -480,8 +502,7 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem, SLUG = 'treatmentfile' # fields - year = models.IntegerField(_(u"Year"), - default=lambda: datetime.datetime.now().year) + year = models.IntegerField(_(u"Year"), default=get_current_year) index = models.IntegerField(_(u"Index"), default=1) internal_reference = models.CharField(_(u"Internal reference"), blank=True, null=True, max_length=200) @@ -518,21 +539,21 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem, unique_together = ('year', 'index') permissions = ( ("view_filetreatment", - ugettext(u"Can view all Treatment requests")), + u"Can view all Treatment requests"), ("add_filetreatment", - ugettext(u"Can add Treatment request")), + u"Can add Treatment request"), ("change_filetreatment", - ugettext(u"Can change Treatment request")), + u"Can change Treatment request"), ("delete_filetreatment", - ugettext(u"Can delete Treatment request")), + u"Can delete Treatment request"), ("view_own_filetreatment", - ugettext(u"Can view own Treatment request")), + u"Can view own Treatment request"), ("add_own_filetreatment", - ugettext(u"Can add own Treatment request")), + u"Can add own Treatment request"), ("change_own_filetreatment", - ugettext(u"Can change own Treatment request")), + u"Can change own Treatment request"), ("delete_own_filetreatment", - ugettext(u"Can delete own Treatment request")), + u"Can delete own Treatment request"), ) ordering = ('cached_label',) @@ -544,9 +565,9 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem, return _(u"Treatment request") @classmethod - def get_query_owns(cls, user): - return (Q(history_creator=user) | - Q(in_charge__ishtaruser=user.ishtaruser)) \ + def get_query_owns(cls, ishtaruser): + return (Q(history_creator=ishtaruser.user_ptr) | + Q(in_charge__ishtaruser=ishtaruser)) \ & Q(end_date__isnull=True) @property @@ -598,21 +619,25 @@ class TreatmentSource(Source): verbose_name_plural = _(u"Treament documentations") permissions = ( ("view_treatmentsource", - ugettext(u"Can view all Treatment sources")), + u"Can view all Treatment sources"), ("view_own_treatmentsource", - ugettext(u"Can view own Treatment source")), + u"Can view own Treatment source"), ("add_own_treatmentsource", - ugettext(u"Can add own Treatment source")), + u"Can add own Treatment source"), ("change_own_treatmentsource", - ugettext(u"Can change own Treatment source")), + u"Can change own Treatment source"), ("delete_own_treatmentsource", - ugettext(u"Can delete own Treatment source")), + u"Can delete own Treatment source"), ) @property def owner(self): return self.treatment + def _get_base_image_path(self): + return u"treatment/{}/{}/source".format( + self.treatment.year, self.treatment.index) + class TreatmentFileSource(Source): treatment_file = models.ForeignKey( @@ -628,17 +653,21 @@ class TreatmentFileSource(Source): verbose_name_plural = _(u"Treatment request documentations") permissions = ( ("view_filetreatmentsource", - ugettext(u"Can view Treatment request source")), + u"Can view Treatment request source"), ("view_own_filetreatmentsource", - ugettext(u"Can view own Treatment request source")), + u"Can view own Treatment request source"), ("add_own_filetreatmentsource", - ugettext(u"Can add own Treatment request source")), + u"Can add own Treatment request source"), ("change_own_filetreatmentsource", - ugettext(u"Can change own Treatment request source")), + u"Can change own Treatment request source"), ("delete_own_filetreatmentsource", - ugettext(u"Can delete own Treatment request source")), + u"Can delete own Treatment request source"), ) @property def owner(self): return self.treatment_file + + def _get_base_image_path(self): + return u"treatmentfile/{}/{}/source".format( + self.treatment_file.year, self.treatment_file.index) diff --git a/archaeological_finds/old_migrations/0001_initial.py b/archaeological_finds/old_migrations/0001_initial.py new file mode 100644 index 000000000..d5f3e804a --- /dev/null +++ b/archaeological_finds/old_migrations/0001_initial.py @@ -0,0 +1,814 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + depends_on = ( + ('archaeological_context_records', '0001_initial.py'), + ('archaeological_warehouse', + '0011_auto__add_containerlocalisation__add_unique_containerlocalisation_cont.py'), + ) + + def forwards(self, orm): + # Adding model 'MaterialType' + db.create_table('archaeological_finds_materialtype', ( + ('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)), + ('recommendation', self.gf('django.db.models.fields.TextField')()), + ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_finds.MaterialType'], null=True, blank=True)), + )) + db.send_create_signal('archaeological_finds', ['MaterialType']) + + # Adding model 'HistoricalBaseFind' + db.create_table('archaeological_finds_historicalbasefind', ( + ('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)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=60)), + ('description', self.gf('django.db.models.fields.TextField')()), + ('context_record_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('is_isolated', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('index', self.gf('django.db.models.fields.IntegerField')(default=0)), + ('material_index', self.gf('django.db.models.fields.IntegerField')(default=0)), + ('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('archaeological_finds', ['HistoricalBaseFind']) + + # Adding model 'BaseFind' + db.create_table('archaeological_finds_basefind', ( + ('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'])), + ('label', self.gf('django.db.models.fields.CharField')(max_length=60)), + ('description', self.gf('django.db.models.fields.TextField')()), + ('context_record', self.gf('django.db.models.fields.related.ForeignKey')(related_name='base_finds', to=orm['archaeological_context_records.ContextRecord'])), + ('is_isolated', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('index', self.gf('django.db.models.fields.IntegerField')(default=0)), + ('material_index', self.gf('django.db.models.fields.IntegerField')(default=0)), + )) + db.send_create_signal('archaeological_finds', ['BaseFind']) + + # Adding model 'HistoricalFind' + db.create_table('archaeological_finds_historicalfind', ( + ('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)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + ('label', self.gf('django.db.models.fields.CharField')(max_length=60)), + ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('material_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('volume', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), + ('weight', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), + ('find_number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('upstream_treatment_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('downstream_treatment_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('dating_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('container_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('archaeological_finds', ['HistoricalFind']) + + # Adding model 'Find' + db.create_table('archaeological_finds_find', ( + ('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'])), + ('order', self.gf('django.db.models.fields.IntegerField')()), + ('label', self.gf('django.db.models.fields.CharField')(max_length=60)), + ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('material_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_finds.MaterialType'])), + ('volume', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), + ('weight', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), + ('find_number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('upstream_treatment', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='downstream_treatment', null=True, to=orm['archaeological_finds.Treatment'])), + ('downstream_treatment', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='upstream_treatment', null=True, to=orm['archaeological_finds.Treatment'])), + ('dating', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.Dating'])), + ('container', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='finds', null=True, to=orm['archaeological_warehouse.Container'])), + )) + db.send_create_signal('archaeological_finds', ['Find']) + + # Adding M2M table for field base_finds on 'Find' + db.create_table('archaeological_finds_find_base_finds', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('find', models.ForeignKey(orm['archaeological_finds.find'], null=False)), + ('basefind', models.ForeignKey(orm['archaeological_finds.basefind'], null=False)) + )) + db.create_unique('archaeological_finds_find_base_finds', ['find_id', 'basefind_id']) + + # Adding model 'FindSource' + db.create_table('archaeological_finds_findsource', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), + ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), + ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('find', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_finds.Find'])), + )) + db.send_create_signal('archaeological_finds', ['FindSource']) + + # Adding M2M table for field authors on 'FindSource' + db.create_table('archaeological_finds_findsource_authors', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('findsource', models.ForeignKey(orm['archaeological_finds.findsource'], null=False)), + ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) + )) + db.create_unique('archaeological_finds_findsource_authors', ['findsource_id', 'author_id']) + + # Adding model 'TreatmentType' + db.create_table('archaeological_finds_treatmenttype', ( + ('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)), + ('virtual', self.gf('django.db.models.fields.BooleanField')(default=False)), + )) + db.send_create_signal('archaeological_finds', ['TreatmentType']) + + # Adding model 'HistoricalTreatment' + db.create_table('archaeological_finds_historicaltreatment', ( + ('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)), + ('container_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('treatment_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('location_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('person_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('start_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('end_date', self.gf('django.db.models.fields.DateField')(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('archaeological_finds', ['HistoricalTreatment']) + + # Adding model 'Treatment' + db.create_table('archaeological_finds_treatment', ( + ('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'])), + ('container', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.Container'], null=True, blank=True)), + ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('treatment_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_finds.TreatmentType'])), + ('location', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.Warehouse'], null=True, blank=True)), + ('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'], null=True, blank=True)), + ('start_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + )) + db.send_create_signal('archaeological_finds', ['Treatment']) + + # Adding model 'TreatmentSource' + db.create_table('archaeological_finds_treatmentsource', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), + ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), + ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('treatment', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_finds.Treatment'])), + )) + db.send_create_signal('archaeological_finds', ['TreatmentSource']) + + # Adding M2M table for field authors on 'TreatmentSource' + db.create_table('archaeological_finds_treatmentsource_authors', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('treatmentsource', models.ForeignKey(orm['archaeological_finds.treatmentsource'], null=False)), + ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) + )) + db.create_unique('archaeological_finds_treatmentsource_authors', ['treatmentsource_id', 'author_id']) + + # Adding model 'Property' + db.create_table('archaeological_finds_property', ( + ('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'])), + ('history_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), + ('find', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_finds.Find'])), + ('administrative_act', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.AdministrativeAct'])), + ('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'])), + ('start_date', self.gf('django.db.models.fields.DateField')()), + ('end_date', self.gf('django.db.models.fields.DateField')()), + )) + db.send_create_signal('archaeological_finds', ['Property']) + + + def backwards(self, orm): + # Deleting model 'MaterialType' + db.delete_table('archaeological_finds_materialtype') + + # Deleting model 'HistoricalBaseFind' + db.delete_table('archaeological_finds_historicalbasefind') + + # Deleting model 'BaseFind' + db.delete_table('archaeological_finds_basefind') + + # Deleting model 'HistoricalFind' + db.delete_table('archaeological_finds_historicalfind') + + # Deleting model 'Find' + db.delete_table('archaeological_finds_find') + + # Removing M2M table for field base_finds on 'Find' + db.delete_table('archaeological_finds_find_base_finds') + + # Deleting model 'FindSource' + db.delete_table('archaeological_finds_findsource') + + # Removing M2M table for field authors on 'FindSource' + db.delete_table('archaeological_finds_findsource_authors') + + # Deleting model 'TreatmentType' + db.delete_table('archaeological_finds_treatmenttype') + + # Deleting model 'HistoricalTreatment' + db.delete_table('archaeological_finds_historicaltreatment') + + # Deleting model 'Treatment' + db.delete_table('archaeological_finds_treatment') + + # Deleting model 'TreatmentSource' + db.delete_table('archaeological_finds_treatmentsource') + + # Removing M2M table for field authors on 'TreatmentSource' + db.delete_table('archaeological_finds_treatmentsource_authors') + + # Deleting model 'Property' + db.delete_table('archaeological_finds_property') + + + models = { + 'archaeological_context_records.activitytype': { + 'Meta': {'object_name': 'ActivityType'}, + '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'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_context_records.contextrecord': { + 'Meta': {'object_name': 'ContextRecord'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), + 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), + 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'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'}), + 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), + 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), + 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), + 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), + 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_context_records.dating': { + 'Meta': {'object_name': 'Dating'}, + 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), + 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_context_records.datingquality': { + 'Meta': {'object_name': 'DatingQuality'}, + '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'}) + }, + 'archaeological_context_records.datingtype': { + 'Meta': {'object_name': 'DatingType'}, + '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'}) + }, + 'archaeological_context_records.identificationtype': { + 'Meta': {'object_name': 'IdentificationType'}, + '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'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_context_records.unit': { + 'Meta': {'object_name': 'Unit'}, + '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'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_files.file': { + 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), + 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), + 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), + 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), + 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), + 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), + 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) + }, + 'archaeological_files.filetype': { + 'Meta': {'object_name': 'FileType'}, + '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'}) + }, + 'archaeological_files.permittype': { + 'Meta': {'object_name': 'PermitType'}, + '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'}) + }, + 'archaeological_files.saisinetype': { + 'Meta': {'object_name': 'SaisineType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'delay': ('django.db.models.fields.IntegerField', [], {}), + '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'}) + }, + 'archaeological_finds.basefind': { + 'Meta': {'object_name': 'BaseFind'}, + 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'base_finds'", 'to': "orm['archaeological_context_records.ContextRecord']"}), + 'description': ('django.db.models.fields.TextField', [], {}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'is_isolated': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}), + 'material_index': ('django.db.models.fields.IntegerField', [], {'default': '0'}) + }, + 'archaeological_finds.find': { + 'Meta': {'object_name': 'Find'}, + 'base_finds': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'find'", 'symmetrical': 'False', 'to': "orm['archaeological_finds.BaseFind']"}), + 'container': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'finds'", 'null': 'True', 'to': "orm['archaeological_warehouse.Container']"}), + 'dating': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Dating']"}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'downstream_treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'upstream_treatment'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), + 'find_number': ('django.db.models.fields.IntegerField', [], {'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'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}), + 'material_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.MaterialType']"}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'upstream_treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'downstream_treatment'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), + 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'weight': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_finds.findsource': { + 'Meta': {'object_name': 'FindSource'}, + 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'find': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_finds.Find']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) + }, + 'archaeological_finds.historicalbasefind': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalBaseFind'}, + 'context_record_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {}), + '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'}), + 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'is_isolated': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}), + 'material_index': ('django.db.models.fields.IntegerField', [], {'default': '0'}) + }, + 'archaeological_finds.historicalfind': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalFind'}, + 'container_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'dating_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'downstream_treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'find_number': ('django.db.models.fields.IntegerField', [], {'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'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}), + 'material_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'upstream_treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'weight': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_finds.historicaltreatment': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalTreatment'}, + 'container_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.DateField', [], {'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'}), + 'location_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'person_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'treatment_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) + }, + 'archaeological_finds.materialtype': { + 'Meta': {'object_name': 'MaterialType'}, + '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'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.MaterialType']", 'null': 'True', 'blank': 'True'}), + 'recommendation': ('django.db.models.fields.TextField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_finds.property': { + 'Meta': {'object_name': 'Property'}, + 'administrative_act': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.AdministrativeAct']"}), + 'end_date': ('django.db.models.fields.DateField', [], {}), + 'find': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.Find']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}), + 'start_date': ('django.db.models.fields.DateField', [], {}) + }, + 'archaeological_finds.treatment': { + 'Meta': {'object_name': 'Treatment'}, + 'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']", 'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.DateField', [], {'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'}), + 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']", 'null': 'True', 'blank': 'True'}), + 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'treatment_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentType']"}) + }, + 'archaeological_finds.treatmentsource': { + 'Meta': {'object_name': 'TreatmentSource'}, + 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_finds.Treatment']"}) + }, + 'archaeological_finds.treatmenttype': { + 'Meta': {'object_name': 'TreatmentType'}, + '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'}), + 'virtual': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'archaeological_operations.acttype': { + 'Meta': {'object_name': 'ActType'}, + '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'}), + 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.administrativeact': { + 'Meta': {'object_name': 'AdministrativeAct'}, + 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), + 'operator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), + 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15'}), + 'scientific': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.operation': { + 'Meta': {'object_name': 'Operation'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {}), + 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), + 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), + 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), + 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), + 'year': ('django.db.models.fields.IntegerField', [], {}), + 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.operationtype': { + 'Meta': {'object_name': 'OperationType'}, + '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'}) + }, + 'archaeological_operations.parcel': { + 'Meta': {'object_name': 'Parcel'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), + 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6'}), + 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), + 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.period': { + 'Meta': {'object_name': 'Period'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.IntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.remaintype': { + 'Meta': {'object_name': 'RemainType'}, + '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'}) + }, + 'archaeological_warehouse.container': { + 'Meta': {'object_name': 'Container'}, + 'comment': ('django.db.models.fields.TextField', [], {}), + 'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}), + 'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}) + }, + 'archaeological_warehouse.containertype': { + 'Meta': {'object_name': 'ContainerType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'volume': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_warehouse.warehouse': { + 'Meta': {'object_name': 'Warehouse'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('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': '40'}), + 'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']", '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'}), + 'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) + }, + 'archaeological_warehouse.warehousetype': { + 'Meta': {'object_name': 'WarehouseType'}, + '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'}) + }, + '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.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 = ['archaeological_finds'] diff --git a/archaeological_finds/migrations/0002_auto__add_field_findsource_reference__add_field_findsource_internal_re.py b/archaeological_finds/old_migrations/0002_auto__add_field_findsource_reference__add_field_findsource_internal_re.py index b98515edc..b98515edc 100644 --- a/archaeological_finds/migrations/0002_auto__add_field_findsource_reference__add_field_findsource_internal_re.py +++ b/archaeological_finds/old_migrations/0002_auto__add_field_findsource_reference__add_field_findsource_internal_re.py diff --git a/archaeological_finds/migrations/0003_auto__add_field_materialtype_code.py b/archaeological_finds/old_migrations/0003_auto__add_field_materialtype_code.py index 76b84a4bb..76b84a4bb 100644 --- a/archaeological_finds/migrations/0003_auto__add_field_materialtype_code.py +++ b/archaeological_finds/old_migrations/0003_auto__add_field_materialtype_code.py diff --git a/archaeological_finds/migrations/0004_auto__add_field_historicalfind_image__add_field_historicalfind_thumbna.py b/archaeological_finds/old_migrations/0004_auto__add_field_historicalfind_image__add_field_historicalfind_thumbna.py index d849b9e92..d849b9e92 100644 --- a/archaeological_finds/migrations/0004_auto__add_field_historicalfind_image__add_field_historicalfind_thumbna.py +++ b/archaeological_finds/old_migrations/0004_auto__add_field_historicalfind_image__add_field_historicalfind_thumbna.py diff --git a/archaeological_finds/migrations/0005_auto__add_conservatorystate__add_field_historicalfind_conservatory_sta.py b/archaeological_finds/old_migrations/0005_auto__add_conservatorystate__add_field_historicalfind_conservatory_sta.py index 9ad323a70..9ad323a70 100644 --- a/archaeological_finds/migrations/0005_auto__add_conservatorystate__add_field_historicalfind_conservatory_sta.py +++ b/archaeological_finds/old_migrations/0005_auto__add_conservatorystate__add_field_historicalfind_conservatory_sta.py diff --git a/archaeological_finds/migrations/0006_auto__add_field_historicalfind_history_creator_id__add_field_treatment.py b/archaeological_finds/old_migrations/0006_auto__add_field_historicalfind_history_creator_id__add_field_treatment.py index 11ec0c4f3..11ec0c4f3 100644 --- a/archaeological_finds/migrations/0006_auto__add_field_historicalfind_history_creator_id__add_field_treatment.py +++ b/archaeological_finds/old_migrations/0006_auto__add_field_historicalfind_history_creator_id__add_field_treatment.py diff --git a/archaeological_finds/migrations/0007_init_history_creator.py b/archaeological_finds/old_migrations/0007_init_history_creator.py index 8d0a5a583..8d0a5a583 100644 --- a/archaeological_finds/migrations/0007_init_history_creator.py +++ b/archaeological_finds/old_migrations/0007_init_history_creator.py diff --git a/archaeological_finds/migrations/0008_reinit_history_creator.py b/archaeological_finds/old_migrations/0008_reinit_history_creator.py index 38c05050e..38c05050e 100644 --- a/archaeological_finds/migrations/0008_reinit_history_creator.py +++ b/archaeological_finds/old_migrations/0008_reinit_history_creator.py diff --git a/archaeological_finds/migrations/0009_auto__chg_field_materialtype_recommendation__chg_field_treatment_perso.py b/archaeological_finds/old_migrations/0009_auto__chg_field_materialtype_recommendation__chg_field_treatment_perso.py index e2998e4a6..e2998e4a6 100644 --- a/archaeological_finds/migrations/0009_auto__chg_field_materialtype_recommendation__chg_field_treatment_perso.py +++ b/archaeological_finds/old_migrations/0009_auto__chg_field_materialtype_recommendation__chg_field_treatment_perso.py diff --git a/archaeological_finds/migrations/0010_auto__chg_field_treatment_history_creator__chg_field_treatment_history.py b/archaeological_finds/old_migrations/0010_auto__chg_field_treatment_history_creator__chg_field_treatment_history.py index 5067e113a..5067e113a 100644 --- a/archaeological_finds/migrations/0010_auto__chg_field_treatment_history_creator__chg_field_treatment_history.py +++ b/archaeological_finds/old_migrations/0010_auto__chg_field_treatment_history_creator__chg_field_treatment_history.py diff --git a/archaeological_finds/migrations/0011_auto__add_field_historicalfind_weight_unit__add_field_historicalfind_d.py b/archaeological_finds/old_migrations/0011_auto__add_field_historicalfind_weight_unit__add_field_historicalfind_d.py index 259f7e272..259f7e272 100644 --- a/archaeological_finds/migrations/0011_auto__add_field_historicalfind_weight_unit__add_field_historicalfind_d.py +++ b/archaeological_finds/old_migrations/0011_auto__add_field_historicalfind_weight_unit__add_field_historicalfind_d.py diff --git a/archaeological_finds/migrations/0012_auto__add_preservationtype__add_field_historicalfind_preservation_to_c.py b/archaeological_finds/old_migrations/0012_auto__add_preservationtype__add_field_historicalfind_preservation_to_c.py index 2604104d0..2604104d0 100644 --- a/archaeological_finds/migrations/0012_auto__add_preservationtype__add_field_historicalfind_preservation_to_c.py +++ b/archaeological_finds/old_migrations/0012_auto__add_preservationtype__add_field_historicalfind_preservation_to_c.py diff --git a/archaeological_finds/migrations/0013_auto__del_field_historicalfind_discovery_date__del_field_find_discover.py b/archaeological_finds/old_migrations/0013_auto__del_field_historicalfind_discovery_date__del_field_find_discover.py index 32d97b8fa..32d97b8fa 100644 --- a/archaeological_finds/migrations/0013_auto__del_field_historicalfind_discovery_date__del_field_find_discover.py +++ b/archaeological_finds/old_migrations/0013_auto__del_field_historicalfind_discovery_date__del_field_find_discover.py diff --git a/archaeological_finds/migrations/0014_auto__chg_field_find_dating.py b/archaeological_finds/old_migrations/0014_auto__chg_field_find_dating.py index 563f1c7cc..563f1c7cc 100644 --- a/archaeological_finds/migrations/0014_auto__chg_field_find_dating.py +++ b/archaeological_finds/old_migrations/0014_auto__chg_field_find_dating.py diff --git a/archaeological_finds/migrations/0015_auto__add_field_historicalfind_external_id__add_field_find_external_id.py b/archaeological_finds/old_migrations/0015_auto__add_field_historicalfind_external_id__add_field_find_external_id.py index 24aedfc1e..24aedfc1e 100644 --- a/archaeological_finds/migrations/0015_auto__add_field_historicalfind_external_id__add_field_find_external_id.py +++ b/archaeological_finds/old_migrations/0015_auto__add_field_historicalfind_external_id__add_field_find_external_id.py diff --git a/archaeological_finds/migrations/0016_auto__add_field_treatment_external_id__add_field_historicaltreatment_e.py b/archaeological_finds/old_migrations/0016_auto__add_field_treatment_external_id__add_field_historicaltreatment_e.py index ebb8c209b..ebb8c209b 100644 --- a/archaeological_finds/migrations/0016_auto__add_field_treatment_external_id__add_field_historicaltreatment_e.py +++ b/archaeological_finds/old_migrations/0016_auto__add_field_treatment_external_id__add_field_historicaltreatment_e.py diff --git a/archaeological_finds/migrations/0017_auto__add_field_findsource_external_id__add_field_treatmentsource_exte.py b/archaeological_finds/old_migrations/0017_auto__add_field_findsource_external_id__add_field_treatmentsource_exte.py index ddfcb927e..ddfcb927e 100644 --- a/archaeological_finds/migrations/0017_auto__add_field_findsource_external_id__add_field_treatmentsource_exte.py +++ b/archaeological_finds/old_migrations/0017_auto__add_field_findsource_external_id__add_field_treatmentsource_exte.py diff --git a/archaeological_finds/migrations/0018_auto.py b/archaeological_finds/old_migrations/0018_auto.py index 8ab73cf57..8ab73cf57 100644 --- a/archaeological_finds/migrations/0018_auto.py +++ b/archaeological_finds/old_migrations/0018_auto.py diff --git a/archaeological_finds/migrations/0019_auto__chg_field_preservationtype_txt_idx__chg_field_treatmenttype_txt_.py b/archaeological_finds/old_migrations/0019_auto__chg_field_preservationtype_txt_idx__chg_field_treatmenttype_txt_.py index 56331ba2a..56331ba2a 100644 --- a/archaeological_finds/migrations/0019_auto__chg_field_preservationtype_txt_idx__chg_field_treatmenttype_txt_.py +++ b/archaeological_finds/old_migrations/0019_auto__chg_field_preservationtype_txt_idx__chg_field_treatmenttype_txt_.py diff --git a/archaeological_finds/migrations/0020_auto__chg_field_historicalfind_weight_unit__chg_field_find_weight_unit.py b/archaeological_finds/old_migrations/0020_auto__chg_field_historicalfind_weight_unit__chg_field_find_weight_unit.py index 44ee3d608..44ee3d608 100644 --- a/archaeological_finds/migrations/0020_auto__chg_field_historicalfind_weight_unit__chg_field_find_weight_unit.py +++ b/archaeological_finds/old_migrations/0020_auto__chg_field_historicalfind_weight_unit__chg_field_find_weight_unit.py diff --git a/archaeological_finds/migrations/0021_auto__add_objecttype__add_field_historicalfind_is_complete__add_field_.py b/archaeological_finds/old_migrations/0021_auto__add_objecttype__add_field_historicalfind_is_complete__add_field_.py index 739266877..739266877 100644 --- a/archaeological_finds/migrations/0021_auto__add_objecttype__add_field_historicalfind_is_complete__add_field_.py +++ b/archaeological_finds/old_migrations/0021_auto__add_objecttype__add_field_historicalfind_is_complete__add_field_.py diff --git a/archaeological_finds/migrations/0022_auto__add_field_objecttype_parent.py b/archaeological_finds/old_migrations/0022_auto__add_field_objecttype_parent.py index deff19871..deff19871 100644 --- a/archaeological_finds/migrations/0022_auto__add_field_objecttype_parent.py +++ b/archaeological_finds/old_migrations/0022_auto__add_field_objecttype_parent.py diff --git a/archaeological_finds/migrations/0023_auto__del_field_historicalfind_heigth__add_field_historicalfind_height.py b/archaeological_finds/old_migrations/0023_auto__del_field_historicalfind_heigth__add_field_historicalfind_height.py index 74fc5a8f1..74fc5a8f1 100644 --- a/archaeological_finds/migrations/0023_auto__del_field_historicalfind_heigth__add_field_historicalfind_height.py +++ b/archaeological_finds/old_migrations/0023_auto__del_field_historicalfind_heigth__add_field_historicalfind_height.py diff --git a/archaeological_finds/migrations/0024_auto.py b/archaeological_finds/old_migrations/0024_auto.py index 5a64c5142..5a64c5142 100644 --- a/archaeological_finds/migrations/0024_auto.py +++ b/archaeological_finds/old_migrations/0024_auto.py diff --git a/archaeological_finds/migrations/0025_find_to_finds.py b/archaeological_finds/old_migrations/0025_find_to_finds.py index 30df3b583..30df3b583 100644 --- a/archaeological_finds/migrations/0025_find_to_finds.py +++ b/archaeological_finds/old_migrations/0025_find_to_finds.py diff --git a/archaeological_finds/migrations/0026_auto__del_field_historicalfind_material_type_id__del_field_find_materi.py b/archaeological_finds/old_migrations/0026_auto__del_field_historicalfind_material_type_id__del_field_find_materi.py index ad2471900..ad2471900 100644 --- a/archaeological_finds/migrations/0026_auto__del_field_historicalfind_material_type_id__del_field_find_materi.py +++ b/archaeological_finds/old_migrations/0026_auto__del_field_historicalfind_material_type_id__del_field_find_materi.py diff --git a/archaeological_finds/migrations/0027_auto__add_field_historicalfind_index__add_field_find_index.py b/archaeological_finds/old_migrations/0027_auto__add_field_historicalfind_index__add_field_find_index.py index b1457bd39..b1457bd39 100644 --- a/archaeological_finds/migrations/0027_auto__add_field_historicalfind_index__add_field_find_index.py +++ b/archaeological_finds/old_migrations/0027_auto__add_field_historicalfind_index__add_field_find_index.py diff --git a/archaeological_finds/migrations/0028_auto.py b/archaeological_finds/old_migrations/0028_auto.py index a74e99f50..a74e99f50 100644 --- a/archaeological_finds/migrations/0028_auto.py +++ b/archaeological_finds/old_migrations/0028_auto.py diff --git a/archaeological_finds/migrations/0029_dating_to_datings.py b/archaeological_finds/old_migrations/0029_dating_to_datings.py index a8af268f1..a8af268f1 100644 --- a/archaeological_finds/migrations/0029_dating_to_datings.py +++ b/archaeological_finds/old_migrations/0029_dating_to_datings.py diff --git a/archaeological_finds/migrations/0030_auto__del_field_historicalfind_dating_id__del_field_find_dating.py b/archaeological_finds/old_migrations/0030_auto__del_field_historicalfind_dating_id__del_field_find_dating.py index 08a05efbc..08a05efbc 100644 --- a/archaeological_finds/migrations/0030_auto__del_field_historicalfind_dating_id__del_field_find_dating.py +++ b/archaeological_finds/old_migrations/0030_auto__del_field_historicalfind_dating_id__del_field_find_dating.py diff --git a/archaeological_finds/migrations/0031_auto__add_field_historicalfind_dating_comment__add_field_find_dating_c.py b/archaeological_finds/old_migrations/0031_auto__add_field_historicalfind_dating_comment__add_field_find_dating_c.py index 0909d52fa..0909d52fa 100644 --- a/archaeological_finds/migrations/0031_auto__add_field_historicalfind_dating_comment__add_field_find_dating_c.py +++ b/archaeological_finds/old_migrations/0031_auto__add_field_historicalfind_dating_comment__add_field_find_dating_c.py diff --git a/archaeological_finds/migrations/0032_auto__add_field_historicalfind_checked__add_field_find_checked.py b/archaeological_finds/old_migrations/0032_auto__add_field_historicalfind_checked__add_field_find_checked.py index a8a28822a..a8a28822a 100644 --- a/archaeological_finds/migrations/0032_auto__add_field_historicalfind_checked__add_field_find_checked.py +++ b/archaeological_finds/old_migrations/0032_auto__add_field_historicalfind_checked__add_field_find_checked.py diff --git a/archaeological_finds/migrations/0033_auto__add_field_historicalfind_check_date__add_field_find_check_date.py b/archaeological_finds/old_migrations/0033_auto__add_field_historicalfind_check_date__add_field_find_check_date.py index 57d50bd22..57d50bd22 100644 --- a/archaeological_finds/migrations/0033_auto__add_field_historicalfind_check_date__add_field_find_check_date.py +++ b/archaeological_finds/old_migrations/0033_auto__add_field_historicalfind_check_date__add_field_find_check_date.py diff --git a/archaeological_finds/migrations/0034_auto__add_field_historicalbasefind_cache_short_id__add_field_historica.py b/archaeological_finds/old_migrations/0034_auto__add_field_historicalbasefind_cache_short_id__add_field_historica.py index 4e19f2a99..4e19f2a99 100644 --- a/archaeological_finds/migrations/0034_auto__add_field_historicalbasefind_cache_short_id__add_field_historica.py +++ b/archaeological_finds/old_migrations/0034_auto__add_field_historicalbasefind_cache_short_id__add_field_historica.py diff --git a/archaeological_finds/migrations/0035_auto.py b/archaeological_finds/old_migrations/0035_auto.py index d0f93c6a4..d0f93c6a4 100644 --- a/archaeological_finds/migrations/0035_auto.py +++ b/archaeological_finds/old_migrations/0035_auto.py diff --git a/archaeological_finds/migrations/0036_preservation_to_preservations.py b/archaeological_finds/old_migrations/0036_preservation_to_preservations.py index 4322510e9..4322510e9 100644 --- a/archaeological_finds/migrations/0036_preservation_to_preservations.py +++ b/archaeological_finds/old_migrations/0036_preservation_to_preservations.py diff --git a/archaeological_finds/migrations/0037_auto__del_field_historicalfind_preservation_to_consider_id__del_field_.py b/archaeological_finds/old_migrations/0037_auto__del_field_historicalfind_preservation_to_consider_id__del_field_.py index e69d0ac88..e69d0ac88 100644 --- a/archaeological_finds/migrations/0037_auto__del_field_historicalfind_preservation_to_consider_id__del_field_.py +++ b/archaeological_finds/old_migrations/0037_auto__del_field_historicalfind_preservation_to_consider_id__del_field_.py diff --git a/archaeological_finds/migrations/0038_auto__add_field_historicalbasefind_batch__add_field_basefind_batch.py b/archaeological_finds/old_migrations/0038_auto__add_field_historicalbasefind_batch__add_field_basefind_batch.py index dac8ae01a..dac8ae01a 100644 --- a/archaeological_finds/migrations/0038_auto__add_field_historicalbasefind_batch__add_field_basefind_batch.py +++ b/archaeological_finds/old_migrations/0038_auto__add_field_historicalbasefind_batch__add_field_basefind_batch.py diff --git a/archaeological_finds/migrations/0039_is_isolated_batch.py b/archaeological_finds/old_migrations/0039_is_isolated_batch.py index f3a71751b..f3a71751b 100644 --- a/archaeological_finds/migrations/0039_is_isolated_batch.py +++ b/archaeological_finds/old_migrations/0039_is_isolated_batch.py diff --git a/archaeological_finds/migrations/0040_auto__del_field_historicalbasefind_is_isolated__del_field_basefind_is_.py b/archaeological_finds/old_migrations/0040_auto__del_field_historicalbasefind_is_isolated__del_field_basefind_is_.py index 02b6dbf4a..02b6dbf4a 100644 --- a/archaeological_finds/migrations/0040_auto__del_field_historicalbasefind_is_isolated__del_field_basefind_is_.py +++ b/archaeological_finds/old_migrations/0040_auto__del_field_historicalbasefind_is_isolated__del_field_basefind_is_.py diff --git a/archaeological_finds/migrations/0041_auto__add_integritytype.py b/archaeological_finds/old_migrations/0041_auto__add_integritytype.py index c38d16d6a..c38d16d6a 100644 --- a/archaeological_finds/migrations/0041_auto__add_integritytype.py +++ b/archaeological_finds/old_migrations/0041_auto__add_integritytype.py diff --git a/archaeological_finds/migrations/0042_auto__chg_field_historicalfind_label__chg_field_find_label__chg_field_.py b/archaeological_finds/old_migrations/0042_auto__chg_field_historicalfind_label__chg_field_find_label__chg_field_.py index 9b31f2024..9b31f2024 100644 --- a/archaeological_finds/migrations/0042_auto__chg_field_historicalfind_label__chg_field_find_label__chg_field_.py +++ b/archaeological_finds/old_migrations/0042_auto__chg_field_historicalfind_label__chg_field_find_label__chg_field_.py diff --git a/archaeological_finds/migrations/0043_auto__add_field_findsource_duplicate__chg_field_findsource_internal_re.py b/archaeological_finds/old_migrations/0043_auto__add_field_findsource_duplicate__chg_field_findsource_internal_re.py index 3e288d58d..3e288d58d 100644 --- a/archaeological_finds/migrations/0043_auto__add_field_findsource_duplicate__chg_field_findsource_internal_re.py +++ b/archaeological_finds/old_migrations/0043_auto__add_field_findsource_duplicate__chg_field_findsource_internal_re.py diff --git a/archaeological_finds/migrations/0044_auto__add_field_findsource_receipt_date_in_documentation__add_field_tr.py b/archaeological_finds/old_migrations/0044_auto__add_field_findsource_receipt_date_in_documentation__add_field_tr.py index 2c0c74701..2c0c74701 100644 --- a/archaeological_finds/migrations/0044_auto__add_field_findsource_receipt_date_in_documentation__add_field_tr.py +++ b/archaeological_finds/old_migrations/0044_auto__add_field_findsource_receipt_date_in_documentation__add_field_tr.py diff --git a/archaeological_finds/migrations/0045_auto__add_findbasket__add_unique_findbasket_label_user.py b/archaeological_finds/old_migrations/0045_auto__add_findbasket__add_unique_findbasket_label_user.py index 2879e422a..2879e422a 100644 --- a/archaeological_finds/migrations/0045_auto__add_findbasket__add_unique_findbasket_label_user.py +++ b/archaeological_finds/old_migrations/0045_auto__add_findbasket__add_unique_findbasket_label_user.py diff --git a/archaeological_finds/migrations/0046_auto__add_field_basefind_point__add_field_basefind_line__add_field_bas.py b/archaeological_finds/old_migrations/0046_auto__add_field_basefind_point__add_field_basefind_line__add_field_bas.py index 47898f58a..47898f58a 100644 --- a/archaeological_finds/migrations/0046_auto__add_field_basefind_point__add_field_basefind_line__add_field_bas.py +++ b/archaeological_finds/old_migrations/0046_auto__add_field_basefind_point__add_field_basefind_line__add_field_bas.py diff --git a/archaeological_finds/migrations/0047_auto__add_field_historicalfind_conservatory_comment__add_field_histori.py b/archaeological_finds/old_migrations/0047_auto__add_field_historicalfind_conservatory_comment__add_field_histori.py index 53e9e7643..53e9e7643 100644 --- a/archaeological_finds/migrations/0047_auto__add_field_historicalfind_conservatory_comment__add_field_histori.py +++ b/archaeological_finds/old_migrations/0047_auto__add_field_historicalfind_conservatory_comment__add_field_histori.py diff --git a/archaeological_finds/migrations/0048_auto__add_field_treatmenttype_upstream_is_many__add_field_treatmenttyp.py b/archaeological_finds/old_migrations/0048_auto__add_field_treatmenttype_upstream_is_many__add_field_treatmenttyp.py index 27c628852..27c628852 100644 --- a/archaeological_finds/migrations/0048_auto__add_field_treatmenttype_upstream_is_many__add_field_treatmenttyp.py +++ b/archaeological_finds/old_migrations/0048_auto__add_field_treatmenttype_upstream_is_many__add_field_treatmenttyp.py diff --git a/archaeological_finds/migrations/0049_auto__chg_field_historicalfind_external_id__chg_field_find_external_id.py b/archaeological_finds/old_migrations/0049_auto__chg_field_historicalfind_external_id__chg_field_find_external_id.py index ba9399ab6..ba9399ab6 100644 --- a/archaeological_finds/migrations/0049_auto__chg_field_historicalfind_external_id__chg_field_find_external_id.py +++ b/archaeological_finds/old_migrations/0049_auto__chg_field_historicalfind_external_id__chg_field_find_external_id.py diff --git a/archaeological_finds/migrations/0050_auto__add_field_historicalfind_auto_external_id__add_field_find_auto_e.py b/archaeological_finds/old_migrations/0050_auto__add_field_historicalfind_auto_external_id__add_field_find_auto_e.py index 43745a418..43745a418 100644 --- a/archaeological_finds/migrations/0050_auto__add_field_historicalfind_auto_external_id__add_field_find_auto_e.py +++ b/archaeological_finds/old_migrations/0050_auto__add_field_historicalfind_auto_external_id__add_field_find_auto_e.py diff --git a/archaeological_finds/migrations/0051_auto__add_remarkabilitytype.py b/archaeological_finds/old_migrations/0051_auto__add_remarkabilitytype.py index 879d3cd2c..879d3cd2c 100644 --- a/archaeological_finds/migrations/0051_auto__add_remarkabilitytype.py +++ b/archaeological_finds/old_migrations/0051_auto__add_remarkabilitytype.py diff --git a/archaeological_finds/migrations/0052_auto__add_field_historicalfind_estimated_value__add_field_find_estimat.py b/archaeological_finds/old_migrations/0052_auto__add_field_historicalfind_estimated_value__add_field_find_estimat.py index 01196ccbd..01196ccbd 100644 --- a/archaeological_finds/migrations/0052_auto__add_field_historicalfind_estimated_value__add_field_find_estimat.py +++ b/archaeological_finds/old_migrations/0052_auto__add_field_historicalfind_estimated_value__add_field_find_estimat.py diff --git a/archaeological_finds/migrations/0053_view_find_treatments.py b/archaeological_finds/old_migrations/0053_view_find_treatments.py index 1e06e490b..1e06e490b 100644 --- a/archaeological_finds/migrations/0053_view_find_treatments.py +++ b/archaeological_finds/old_migrations/0053_view_find_treatments.py diff --git a/archaeological_finds/migrations/0054_rename_treatment_views.py b/archaeological_finds/old_migrations/0054_rename_treatment_views.py index 1eccc93c1..1eccc93c1 100644 --- a/archaeological_finds/migrations/0054_rename_treatment_views.py +++ b/archaeological_finds/old_migrations/0054_rename_treatment_views.py diff --git a/archaeological_finds/migrations/0055_auto__add_field_findsource_image__add_field_findsource_thumbnail__add_.py b/archaeological_finds/old_migrations/0055_auto__add_field_findsource_image__add_field_findsource_thumbnail__add_.py index 8ac1a319f..8ac1a319f 100644 --- a/archaeological_finds/migrations/0055_auto__add_field_findsource_image__add_field_findsource_thumbnail__add_.py +++ b/archaeological_finds/old_migrations/0055_auto__add_field_findsource_image__add_field_findsource_thumbnail__add_.py diff --git a/archaeological_finds/migrations/0056_auto__add_field_historicalfind_cached_label__add_field_find_cached_lab.py b/archaeological_finds/old_migrations/0056_auto__add_field_historicalfind_cached_label__add_field_find_cached_lab.py index c0d048ba3..c0d048ba3 100644 --- a/archaeological_finds/migrations/0056_auto__add_field_historicalfind_cached_label__add_field_find_cached_lab.py +++ b/archaeological_finds/old_migrations/0056_auto__add_field_historicalfind_cached_label__add_field_find_cached_lab.py diff --git a/archaeological_finds/migrations/0057_generate_cached_label.py b/archaeological_finds/old_migrations/0057_generate_cached_label.py index 911eb7746..911eb7746 100644 --- a/archaeological_finds/migrations/0057_generate_cached_label.py +++ b/archaeological_finds/old_migrations/0057_generate_cached_label.py diff --git a/archaeological_finds/migrations/0058_auto__chg_field_historicalfind_image__chg_field_historicalfind_thumbna.py b/archaeological_finds/old_migrations/0058_auto__chg_field_historicalfind_image__chg_field_historicalfind_thumbna.py index eb09747d4..eb09747d4 100644 --- a/archaeological_finds/migrations/0058_auto__chg_field_historicalfind_image__chg_field_historicalfind_thumbna.py +++ b/archaeological_finds/old_migrations/0058_auto__chg_field_historicalfind_image__chg_field_historicalfind_thumbna.py diff --git a/archaeological_finds/migrations/0059_auto__add_field_historicalfind_thickness__add_field_find_thickness.py b/archaeological_finds/old_migrations/0059_auto__add_field_historicalfind_thickness__add_field_find_thickness.py index e72ad71e4..e72ad71e4 100644 --- a/archaeological_finds/migrations/0059_auto__add_field_historicalfind_thickness__add_field_find_thickness.py +++ b/archaeological_finds/old_migrations/0059_auto__add_field_historicalfind_thickness__add_field_find_thickness.py diff --git a/archaeological_finds/migrations/0060_auto__add_field_historicalfind_topographic_reference_point__add_field_.py b/archaeological_finds/old_migrations/0060_auto__add_field_historicalfind_topographic_reference_point__add_field_.py index b4855a779..b4855a779 100644 --- a/archaeological_finds/migrations/0060_auto__add_field_historicalfind_topographic_reference_point__add_field_.py +++ b/archaeological_finds/old_migrations/0060_auto__add_field_historicalfind_topographic_reference_point__add_field_.py diff --git a/archaeological_finds/migrations/0061_auto__add_field_historicalfind_min_number_of_individuals__add_field_fi.py b/archaeological_finds/old_migrations/0061_auto__add_field_historicalfind_min_number_of_individuals__add_field_fi.py index 8ae8784f8..8ae8784f8 100644 --- a/archaeological_finds/migrations/0061_auto__add_field_historicalfind_min_number_of_individuals__add_field_fi.py +++ b/archaeological_finds/old_migrations/0061_auto__add_field_historicalfind_min_number_of_individuals__add_field_fi.py diff --git a/archaeological_finds/migrations/0062_auto__del_field_historicaltreatment_other_location__add_field_historic.py b/archaeological_finds/old_migrations/0062_auto__del_field_historicaltreatment_other_location__add_field_historic.py index 61985ec9f..61985ec9f 100644 --- a/archaeological_finds/migrations/0062_auto__del_field_historicaltreatment_other_location__add_field_historic.py +++ b/archaeological_finds/old_migrations/0062_auto__del_field_historicaltreatment_other_location__add_field_historic.py diff --git a/archaeological_finds/migrations/0063_treats_generate_year_index.py b/archaeological_finds/old_migrations/0063_treats_generate_year_index.py index 0c6ddee13..0c6ddee13 100644 --- a/archaeological_finds/migrations/0063_treats_generate_year_index.py +++ b/archaeological_finds/old_migrations/0063_treats_generate_year_index.py diff --git a/archaeological_finds/migrations/0064_auto__add_unique_treatment_index_year.py b/archaeological_finds/old_migrations/0064_auto__add_unique_treatment_index_year.py index 3185fc2ff..3185fc2ff 100644 --- a/archaeological_finds/migrations/0064_auto__add_unique_treatment_index_year.py +++ b/archaeological_finds/old_migrations/0064_auto__add_unique_treatment_index_year.py diff --git a/archaeological_finds/migrations/0065_copy_treatment_types.py b/archaeological_finds/old_migrations/0065_copy_treatment_types.py index b4bdd0a05..b4bdd0a05 100644 --- a/archaeological_finds/migrations/0065_copy_treatment_types.py +++ b/archaeological_finds/old_migrations/0065_copy_treatment_types.py diff --git a/archaeological_finds/migrations/0066_auto__del_field_historicaltreatment_treatment_type_id__del_field_treat.py b/archaeological_finds/old_migrations/0066_auto__del_field_historicaltreatment_treatment_type_id__del_field_treat.py index 2bcca03aa..2bcca03aa 100644 --- a/archaeological_finds/migrations/0066_auto__del_field_historicaltreatment_treatment_type_id__del_field_treat.py +++ b/archaeological_finds/old_migrations/0066_auto__del_field_historicaltreatment_treatment_type_id__del_field_treat.py diff --git a/archaeological_finds/migrations/0067_on_delete_for_views.py b/archaeological_finds/old_migrations/0067_on_delete_for_views.py index f7a744325..f7a744325 100644 --- a/archaeological_finds/migrations/0067_on_delete_for_views.py +++ b/archaeological_finds/old_migrations/0067_on_delete_for_views.py diff --git a/archaeological_finds/migrations/0068_auto__add_treatmentfile__add_unique_treatmentfile_year_index__add_hist.py b/archaeological_finds/old_migrations/0068_auto__add_treatmentfile__add_unique_treatmentfile_year_index__add_hist.py index 5949fa70d..5949fa70d 100644 --- a/archaeological_finds/migrations/0068_auto__add_treatmentfile__add_unique_treatmentfile_year_index__add_hist.py +++ b/archaeological_finds/old_migrations/0068_auto__add_treatmentfile__add_unique_treatmentfile_year_index__add_hist.py diff --git a/archaeological_finds/migrations/0069_auto__add_field_historicaltreatment_file_id__add_field_treatment_file.py b/archaeological_finds/old_migrations/0069_auto__add_field_historicaltreatment_file_id__add_field_treatment_file.py index cba7e6c94..cba7e6c94 100644 --- a/archaeological_finds/migrations/0069_auto__add_field_historicaltreatment_file_id__add_field_treatment_file.py +++ b/archaeological_finds/old_migrations/0069_auto__add_field_historicaltreatment_file_id__add_field_treatment_file.py diff --git a/archaeological_finds/migrations/0070_auto__add_treatmentfilesource.py b/archaeological_finds/old_migrations/0070_auto__add_treatmentfilesource.py index 6793487e0..6793487e0 100644 --- a/archaeological_finds/migrations/0070_auto__add_treatmentfilesource.py +++ b/archaeological_finds/old_migrations/0070_auto__add_treatmentfilesource.py diff --git a/archaeological_finds/migrations/0071_auto__add_field_historicaltreatment_cached_label__add_field_treatment_.py b/archaeological_finds/old_migrations/0071_auto__add_field_historicaltreatment_cached_label__add_field_treatment_.py index bc5bfb611..bc5bfb611 100644 --- a/archaeological_finds/migrations/0071_auto__add_field_historicaltreatment_cached_label__add_field_treatment_.py +++ b/archaeological_finds/old_migrations/0071_auto__add_field_historicaltreatment_cached_label__add_field_treatment_.py diff --git a/archaeological_finds/migrations/0072_auto__add_field_treatmentfile_applicant__add_field_treatmentfile_appli.py b/archaeological_finds/old_migrations/0072_auto__add_field_treatmentfile_applicant__add_field_treatmentfile_appli.py index fd24fe719..fd24fe719 100644 --- a/archaeological_finds/migrations/0072_auto__add_field_treatmentfile_applicant__add_field_treatmentfile_appli.py +++ b/archaeological_finds/old_migrations/0072_auto__add_field_treatmentfile_applicant__add_field_treatmentfile_appli.py diff --git a/archaeological_finds/migrations/0073_auto__add_treatmentstate__add_field_historicaltreatment_treatment_stat.py b/archaeological_finds/old_migrations/0073_auto__add_treatmentstate__add_field_historicaltreatment_treatment_stat.py index b68e13499..b68e13499 100644 --- a/archaeological_finds/migrations/0073_auto__add_treatmentstate__add_field_historicaltreatment_treatment_stat.py +++ b/archaeological_finds/old_migrations/0073_auto__add_treatmentstate__add_field_historicaltreatment_treatment_stat.py diff --git a/archaeological_finds/migrations/0074_auto__add_field_find_collection__add_field_historicalfind_collection_i.py b/archaeological_finds/old_migrations/0074_auto__add_field_find_collection__add_field_historicalfind_collection_i.py index 8bb0a2c44..8bb0a2c44 100644 --- a/archaeological_finds/migrations/0074_auto__add_field_find_collection__add_field_historicalfind_collection_i.py +++ b/archaeological_finds/old_migrations/0074_auto__add_field_find_collection__add_field_historicalfind_collection_i.py diff --git a/archaeological_finds/migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py b/archaeological_finds/old_migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py index 600f7ca74..600f7ca74 100644 --- a/archaeological_finds/migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py +++ b/archaeological_finds/old_migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py diff --git a/archaeological_finds/migrations/0076_auto__add_field_treatmenttype_order__add_field_treatmenttype_parent.py b/archaeological_finds/old_migrations/0076_auto__add_field_treatmenttype_order__add_field_treatmenttype_parent.py index 0b07fff4a..0b07fff4a 100644 --- a/archaeological_finds/migrations/0076_auto__add_field_treatmenttype_order__add_field_treatmenttype_parent.py +++ b/archaeological_finds/old_migrations/0076_auto__add_field_treatmenttype_order__add_field_treatmenttype_parent.py diff --git a/archaeological_finds/migrations/0077_auto__add_field_historicaltreatment_estimated_cost__add_field_historic.py b/archaeological_finds/old_migrations/0077_auto__add_field_historicaltreatment_estimated_cost__add_field_historic.py index 720d66973..720d66973 100644 --- a/archaeological_finds/migrations/0077_auto__add_field_historicaltreatment_estimated_cost__add_field_historic.py +++ b/archaeological_finds/old_migrations/0077_auto__add_field_historicaltreatment_estimated_cost__add_field_historic.py diff --git a/archaeological_finds/migrations/0078_fix_treatment_views.py b/archaeological_finds/old_migrations/0078_fix_treatment_views.py index 0bd018e50..0bd018e50 100644 --- a/archaeological_finds/migrations/0078_fix_treatment_views.py +++ b/archaeological_finds/old_migrations/0078_fix_treatment_views.py diff --git a/archaeological_finds/migrations/0079_auto__del_field_find_topographic_reference_point__del_field_historical.py b/archaeological_finds/old_migrations/0079_auto__del_field_find_topographic_reference_point__del_field_historical.py index e2b16f1da..e2b16f1da 100644 --- a/archaeological_finds/migrations/0079_auto__del_field_find_topographic_reference_point__del_field_historical.py +++ b/archaeological_finds/old_migrations/0079_auto__del_field_find_topographic_reference_point__del_field_historical.py diff --git a/archaeological_finds/migrations/0080_auto__add_field_basefind_x__add_field_basefind_y__add_field_basefind_z.py b/archaeological_finds/old_migrations/0080_auto__add_field_basefind_x__add_field_basefind_y__add_field_basefind_z.py index 7559daeab..7559daeab 100644 --- a/archaeological_finds/migrations/0080_auto__add_field_basefind_x__add_field_basefind_y__add_field_basefind_z.py +++ b/archaeological_finds/old_migrations/0080_auto__add_field_basefind_x__add_field_basefind_y__add_field_basefind_z.py diff --git a/archaeological_finds/migrations/0081_regenerate_treatment_views.py b/archaeological_finds/old_migrations/0081_regenerate_treatment_views.py index 9417088c2..9417088c2 100644 --- a/archaeological_finds/migrations/0081_regenerate_treatment_views.py +++ b/archaeological_finds/old_migrations/0081_regenerate_treatment_views.py diff --git a/archaeological_finds/migrations/0082_auto__add_batchtype__add_field_basefind_new_batch__add_field_historica.py b/archaeological_finds/old_migrations/0082_auto__add_batchtype__add_field_basefind_new_batch__add_field_historica.py index 1f1a8edc1..1f1a8edc1 100644 --- a/archaeological_finds/migrations/0082_auto__add_batchtype__add_field_basefind_new_batch__add_field_historica.py +++ b/archaeological_finds/old_migrations/0082_auto__add_batchtype__add_field_basefind_new_batch__add_field_historica.py diff --git a/archaeological_finds/migrations/0083_batch_to_new_batch.py b/archaeological_finds/old_migrations/0083_batch_to_new_batch.py index 2a982d391..2a982d391 100644 --- a/archaeological_finds/migrations/0083_batch_to_new_batch.py +++ b/archaeological_finds/old_migrations/0083_batch_to_new_batch.py diff --git a/archaeological_finds/migrations/0084_auto__del_field_basefind_new_batch__chg_field_basefind_batch__del_fiel.py b/archaeological_finds/old_migrations/0084_auto__del_field_basefind_new_batch__chg_field_basefind_batch__del_fiel.py index 404fb76eb..404fb76eb 100644 --- a/archaeological_finds/migrations/0084_auto__del_field_basefind_new_batch__chg_field_basefind_batch__del_fiel.py +++ b/archaeological_finds/old_migrations/0084_auto__del_field_basefind_new_batch__chg_field_basefind_batch__del_fiel.py diff --git a/archaeological_finds/migrations/0085_create_bulk_update_view.py b/archaeological_finds/old_migrations/0085_create_bulk_update_view.py index c59420fe2..c59420fe2 100644 --- a/archaeological_finds/migrations/0085_create_bulk_update_view.py +++ b/archaeological_finds/old_migrations/0085_create_bulk_update_view.py diff --git a/archaeological_finds/old_migrations/__init__.py b/archaeological_finds/old_migrations/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archaeological_finds/old_migrations/__init__.py diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index e0d74db77..6187a300f 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -1,6 +1,5 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_field from_dict link_to_window window_tables window_header humanize %} -{% load url from future %} {% block head_title %}{% trans "Find" %}{% endblock %} {% block content %} diff --git a/archaeological_finds/templates/ishtar/sheet_treatment.html b/archaeological_finds/templates/ishtar/sheet_treatment.html index 9d6c75425..5fc8f2aac 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatment.html +++ b/archaeological_finds/templates/ishtar/sheet_treatment.html @@ -1,6 +1,5 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %} -{% load url from future %} {% block head_title %}{% trans "Treatment" %}{% endblock %} {% block content %} diff --git a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html index b84f60883..f8fb3e0aa 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html +++ b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html @@ -1,6 +1,5 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %} -{% load url from future %} {% block head_title %}{% trans "Treatment request" %}{% endblock %} {% block content %} diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index b4a798807..5ea5adfb7 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -29,7 +29,7 @@ from ishtar_common.models import ImporterType, IshtarUser, ImporterColumn,\ FormaterType, ImportTarget, IshtarSiteProfile from ishtar_common.models import Person, get_current_profile -from archaeological_context_records.models import Period, Dating +from archaeological_context_records.models import Period, Dating, ContextRecord from archaeological_finds import models, views from archaeological_warehouse.models import Warehouse, WarehouseType @@ -37,7 +37,7 @@ from ishtar_common import forms_common from ishtar_common.tests import WizardTest, WizardTestFormData as FormData, \ TestCase -from archaeological_operations.tests import ImportTest +from archaeological_operations.tests import ImportTest, create_operation from archaeological_context_records.tests import ContextRecordInit, \ CONTEXT_RECORD_FIXTURES, CONTEXT_RECORD_TOWNS_FIXTURES @@ -68,8 +68,11 @@ class FindInit(ContextRecordInit): self.base_finds = [] default = {'label': "Base find"} - if not data_base.get('history_modifier'): - data_base['history_modifier'] = self.get_default_user() + if not data_base.get('history_modifier') or not data_base[ + 'history_modifier'].pk: + user = self.get_default_user() + user.save() + data_base['history_modifier'] = user if force or not data_base.get('context_record'): data_base['context_record'] = self.get_default_context_record( force=force) @@ -203,15 +206,15 @@ class TreatmentWizardCreationTest(WizardTest, FindInit, TestCase): FormData( 'Move treament', form_datas={ - 'file-treatment_creation': {}, - 'basetreatment-treatment_creation': { - 'treatment_type': 4, # move + 'file': {}, + 'basetreatment': { + 'treatment_type': None, 'person': 1, # doer 'location': 1, # associated warehouse 'year': 2016, 'target_is_basket': False }, - 'selecfind-treatment_creation': { + 'selecfind': { 'pk': 1, 'resulting_pk': 1 } @@ -233,10 +236,14 @@ class TreatmentWizardCreationTest(WizardTest, FindInit, TestCase): person = Person.objects.create(name="default") person.id = 1 person.save() + + trt_type = models.TreatmentType.objects.get(txt_idx='moving') + self.form_datas[0].set('basetreatment', 'treatment_type', trt_type.pk) + self.find, base_find = self.get_default_find(force=True) - self.form_datas[0].form_datas['selecfind-treatment_creation'][ + self.form_datas[0].form_datas['selecfind'][ 'pk'] = self.find.pk - self.form_datas[0].form_datas['selecfind-treatment_creation'][ + self.form_datas[0].form_datas['selecfind'][ 'resulting_pk'] = self.find.pk self.treatment_number = models.Treatment.objects.count() super(TreatmentWizardCreationTest, self).pre_wizard() @@ -280,8 +287,9 @@ class ImportFindTest(ImportTest, TestCase): 'imported_images': SimpleUploadedFile(mcc_images.name, mcc_images.read())} post_dict = {'importer_type': MCC.pk, 'skip_lines': 1, - "encoding": 'utf-8'} - form = forms_common.NewImportForm(data=post_dict, files=file_dict) + "encoding": 'utf-8', "name": 'init_find_import'} + form = forms_common.NewImportForm(data=post_dict, files=file_dict, + user=self.user) form.is_valid() self.assertTrue(form.is_valid()) impt = form.save(self.ishtar_user) @@ -305,6 +313,22 @@ class ImportFindTest(ImportTest, TestCase): images = [f.image for f in models.Find.objects.all() if f.image.name] self.assertEqual(len(images), 1) + # check index + bfs = list(models.BaseFind.objects.order_by("-pk").all()) + for idx in range(4): + bf = bfs[idx] + expected_index = 4 - idx + self.assertEqual( + bf.index, expected_index, + "Bad index for imported base find: {} where {} is " + "expected".format(bf.index, expected_index)) + f = bf.find.all()[0] + self.assertEqual( + f.index, expected_index, + "Bad index for imported find: {} where {} is expected".format( + f.index, expected_index + )) + class FindTest(FindInit, TestCase): fixtures = FIND_FIXTURES @@ -332,6 +356,32 @@ class FindTest(FindInit, TestCase): u"{}-{}".format( base_find.context_record.external_id, base_find.label)) + base_find.label = "New label" + base_find.save() + base_find = models.BaseFind.objects.get(pk=base_find.pk) + self.assertEqual( + base_find.external_id, + u"{}-{}".format( + base_find.context_record.external_id, + "New label")) + cr = ContextRecord.objects.get(pk=base_find.context_record.pk) + cr.label = "new-label-too" + cr.skip_history_when_saving = True + cr.save() + base_find = models.BaseFind.objects.get(pk=base_find.pk) + find = models.Find.objects.get(pk=find.pk) + cr = ContextRecord.objects.get(pk=cr.pk) + self.assertIn("new-label-too", find.external_id) + self.assertIn("new-label-too", base_find.external_id) + + cr.operation.code_patriarche = "PAT" + cr.operation.skip_history_when_saving = True + cr.operation.save() + base_find = models.BaseFind.objects.get(pk=base_find.pk) + find = models.Find.objects.get(pk=find.pk) + cr = ContextRecord.objects.get(pk=cr.pk) + self.assertIn("PAT", find.external_id) + self.assertIn("PAT", base_find.external_id) def testIndex(self): profile = get_current_profile() @@ -476,6 +526,28 @@ class FindSearchTest(FindInit, TestCase): self.assertEqual(response.status_code, 200) self.assertTrue(json.loads(response.content)['total'] == 1) + def test_pinned_search(self): + c = Client() + c.login(username=self.username, password=self.password) + + # operation with no associated find + operation = create_operation(self.user, values={"year": 2017}) + c.get(reverse("pin", args=["operation", operation.pk])) + response = c.get(reverse('get-find'), {}) # empty search -> check pined + self.assertEqual(response.status_code, 200) + self.assertEqual(json.loads(response.content)['total'], 0) + + # pinned operation with current find + find = self.finds[0] + c.get(reverse( + "pin", + args=["operation", + find.get_first_base_find().context_record.operation.pk])) + response = c.get(reverse('get-find'), {}) # empty search -> check pined + self.assertEqual(response.status_code, 200) + self.assertEqual(json.loads(response.content)['total'], 1) + + def testPeriodHierarchicSearch(self): find = self.finds[0] c = Client() diff --git a/archaeological_finds/urls.py b/archaeological_finds/urls.py index 9c331ccc9..317afcb91 100644 --- a/archaeological_finds/urls.py +++ b/archaeological_finds/urls.py @@ -17,18 +17,18 @@ # See the file COPYING for details. -from django.conf.urls import * +from django.conf.urls import url from ishtar_common.wizards import check_rights -import views +from archaeological_finds import views +from archaeological_operations.views import administrativeactfile_document from archaeological_finds import models # be careful: each check_rights must be relevant with ishtar_menu # forms -urlpatterns = patterns( - '', +urlpatterns = [ url(r'find_search/(?P<step>.+)?$', check_rights(['view_find', 'view_own_find'])( views.find_search_wizard), name='find_search'), @@ -197,8 +197,6 @@ urlpatterns = patterns( check_rights(['change_treatmentfile', 'change_own_treatmentfile'])( views.treatmentfile_source_deletion_wizard), name='treatmentfile_source_deletion'), - - url(r'^treatmentfle_search/(?P<step>.+)?$', check_rights(['change_find', 'change_own_find'])( views.treatmentfile_search_wizard), @@ -225,94 +223,89 @@ urlpatterns = patterns( url(r'get-downstreamtreatment/(?P<type>.+)?$', views.get_downstreamtreatment, name='get-downstreamtreatment'), -) - -urlpatterns += patterns( - 'archaeological_finds.views', - url(r'autocomplete-objecttype/$', 'autocomplete_objecttype', + url(r'autocomplete-objecttype/$', views.autocomplete_objecttype, name='autocomplete-objecttype'), - url(r'autocomplete-materialtype/$', 'autocomplete_materialtype', + url(r'autocomplete-materialtype/$', views.autocomplete_materialtype, name='autocomplete-materialtype'), - url(r'autocomplete-preservationtype/$', 'autocomplete_preservationtype', + url(r'autocomplete-preservationtype/$', views.autocomplete_preservationtype, name='autocomplete-preservationtype'), - url(r'autocomplete-integritytype/$', 'autocomplete_integritytype', + url(r'autocomplete-integritytype/$', views.autocomplete_integritytype, name='autocomplete-integritytype'), - url(r'autocomplete-treatmentfile/$', 'autocomplete_treatmentfile', + url(r'autocomplete-treatmentfile/$', views.autocomplete_treatmentfile, name='autocomplete-treatmentfile'), - url(r'get-find/own/(?P<type>.+)?$', 'get_find', + url(r'get-find/own/(?P<type>.+)?$', views.get_find, name='get-own-find', kwargs={'force_own': True}), - url(r'get-find/(?P<type>.+)?$', 'get_find', + url(r'get-find/(?P<type>.+)?$', views.get_find, name='get-find'), - url(r'get-find-for-ope/own/(?P<type>.+)?$', 'get_find_for_ope', + url(r'get-find-for-ope/own/(?P<type>.+)?$', views.get_find_for_ope, name='get-own-find-for-ope', kwargs={'force_own': True}), - url(r'get-find-for-ope/(?P<type>.+)?$', 'get_find_for_ope', + url(r'get-find-for-ope/(?P<type>.+)?$', views.get_find_for_ope, name='get-find-for-ope'), - url(r'get-find-for-treatment/own/(?P<type>.+)?$', 'get_find_for_treatment', + url(r'get-find-for-treatment/own/(?P<type>.+)?$', + views.get_find_for_treatment, name='get-own-find-for-treatment', kwargs={'force_own': True}), - url(r'get-find-for-treatment/(?P<type>.+)?$', 'get_find_for_treatment', + url(r'get-find-for-treatment/(?P<type>.+)?$', views.get_find_for_treatment, name='get-find-for-treatment'), - url(r'get-find-full/own/(?P<type>.+)?$', 'get_find', + url(r'get-find-full/own/(?P<type>.+)?$', views.get_find, name='get-own-find-full', kwargs={'full': True, 'force_own': True}), - url(r'get-find-full/(?P<type>.+)?$', 'get_find', + url(r'get-find-full/(?P<type>.+)?$', views.get_find, name='get-find-full', kwargs={'full': True}), url(r'get-find-shortcut/(?P<type>.+)?$', - 'get_find', name='get-find-shortcut', + views.get_find, name='get-find-shortcut', kwargs={'full': 'shortcut'}), url(r'get-findsource/(?P<type>.+)?$', - 'get_findsource', name='get-findsource'), + views.get_findsource, name='get-findsource'), url(r'get-findsource-full/(?P<type>.+)?$', - 'get_findsource', name='get-findsource-full', + views.get_findsource, name='get-findsource-full', kwargs={'full': True}), - url(r'^show-findsource(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_findsource', + url(r'^show-findsource(?:/(?P<pk>.+))?/(?P<type>.+)?$', + views.show_findsource, name=models.FindSource.SHOW_URL), - url(r'^show-find/basket-(?P<pk>.+)/(?P<type>.+)?$', 'show_findbasket', + url(r'^show-find/basket-(?P<pk>.+)/(?P<type>.+)?$', views.show_findbasket, name='show-findbasket'), - url(r'^display-find/basket-(?P<pk>.+)/$', 'display_findbasket', + url(r'^display-find/basket-(?P<pk>.+)/$', views.display_findbasket, name='display-findbasket'), - url(r'^show-find(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_find', + url(r'^show-find(?:/(?P<pk>.+))?/(?P<type>.+)?$', views.show_find, name=models.Find.SHOW_URL), - url(r'^display-find/(?P<pk>.+)/$', 'display_find', + url(r'^display-find/(?P<pk>.+)/$', views.display_find, name='display-' + models.Find.SLUG), url(r'^show-historized-find/(?P<pk>.+)?/(?P<date>.+)?$', - 'show_find', name='show-historized-find'), + views.show_find, name='show-historized-find'), url(r'^revert-find/(?P<pk>.+)/(?P<date>.+)$', - 'revert_find', name='revert-find'), + views.revert_find, name='revert-find'), url(r'^get-treatment/(?P<type>.+)?$', - 'get_treatment', name='get-treatment'), + views.get_treatment, name='get-treatment'), url(r'get-treatment-shortcut/(?P<type>.+)?$', - 'get_treatment', name='get-treatment-shortcut', + views.get_treatment, name='get-treatment-shortcut', kwargs={'full': 'shortcut'}), - url(r'^show-treatment(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_treatment', + url(r'^show-treatment(?:/(?P<pk>.+))?/(?P<type>.+)?$', views.show_treatment, name=models.Treatment.SHOW_URL), url(r'show-historized-treatment/(?P<pk>.+)?/(?P<date>.+)?$', - 'show_treatment', name='show-historized-treatment'), + views.show_treatment, name='show-historized-treatment'), url(r'^revert-treatment/(?P<pk>.+)/(?P<date>.+)$', - 'revert_treatment', name='revert-treatment'), + views.revert_treatment, name='revert-treatment'), url(r'get-treatmentfile/(?P<type>.+)?$', - 'get_treatmentfile', name='get-treatmentfile'), + views.get_treatmentfile, name='get-treatmentfile'), url(r'get-treatmentfile-shortcut/(?P<type>.+)?$', - 'get_treatmentfile', name='get-treatmentfile-shortcut', + views.get_treatmentfile, name='get-treatmentfile-shortcut', kwargs={'full': 'shortcut'}), url(r'^show-treatmentfile(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_treatmentfile', + views.show_treatmentfile, name=models.TreatmentFile.SHOW_URL), url(r'show-historized-treatmentfile/(?P<pk>.+)?/(?P<date>.+)?$', - 'show_treatmentfile', name='show-historized-treatmentfile'), + views.show_treatmentfile, name='show-historized-treatmentfile'), url(r'^revert-treatmentfile/(?P<pk>.+)/(?P<date>.+)$', - 'revert_treatmentfile', name='revert-treatmentfile'), - # url(r'show-treatmentfile(?:/(?P<pk>.+))?/(?P<type>.+)?$', - # 'show_treatmentfile', - # name=models.TreatmentFile.SHOW_URL), -) - -urlpatterns += patterns( - 'archaeological_operations.views', + views.revert_treatmentfile, name='revert-treatmentfile'), url(r'^treatment_administrativeact_document/$', - 'administrativeactfile_document', + administrativeactfile_document, name='treatment-administrativeact-document', kwargs={'treatment': True}), url(r'^treatmentfle_administrativeact_document/$', - 'administrativeactfile_document', + administrativeactfile_document, name='treatmentfle-administrativeact-document', kwargs={'treatment_file': True}), -) +] + +# url(r'show-treatmentfile(?:/(?P<pk>.+))?/(?P<type>.+)?$', +# 'show_treatmentfile', +# name=models.TreatmentFile.SHOW_URL), diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index 2e84757c9..828f9801d 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -84,9 +84,9 @@ def autocomplete_treatmentfile(request): models.Treatment) \ and not request.user.ishtaruser.has_right('treatmentfile_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 q1 in q.split(' '): @@ -104,7 +104,7 @@ def autocomplete_treatmentfile(request): files = models.TreatmentFile.objects.filter(query)[:limit] data = json.dumps([{'id': file.pk, 'value': unicode(file)} for file in files]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') show_findsource = show_item(models.FindSource, 'findsource') @@ -170,8 +170,11 @@ find_modification_wizard = FindModificationWizard.as_view([ def find_modify(request, pk): find_modification_wizard(request) + key = 'selec-find_modification' + if get_current_profile().warehouse: + key = 'selecw-find_modification' FindModificationWizard.session_set_value( - request, 'selec-find_modification', 'pk', pk, reset=True) + request, key, 'pk', pk, reset=True) return redirect( reverse('find_modification', kwargs={'step': 'selecrecord-find_modification'})) diff --git a/archaeological_operations/__init__.py b/archaeological_operations/__init__.py index e69de29bb..fe4502bb1 100644 --- a/archaeological_operations/__init__.py +++ b/archaeological_operations/__init__.py @@ -0,0 +1 @@ +default_app_config = 'ishtar_common.apps.ArchaeologicalOperationsConfig' diff --git a/archaeological_operations/admin.py b/archaeological_operations/admin.py index 3abf22eae..f1deac188 100644 --- a/archaeological_operations/admin.py +++ b/archaeological_operations/admin.py @@ -17,9 +17,17 @@ # See the file COPYING for details. +from ajax_select import make_ajax_form +from ajax_select.fields import AutoCompleteSelectField, \ + AutoCompleteSelectMultipleField + +from django import forms from django.conf import settings from django.contrib import admin +from django.contrib.gis.forms import PointField, MultiPolygonField, OSMWidget +from django.utils.translation import ugettext_lazy as _ +from ishtar_common.apps import admin_site from ishtar_common.admin import HistorizedObjectAdmin, GeneralTypeAdmin import models @@ -30,13 +38,15 @@ class AdministrativeActAdmin(HistorizedObjectAdmin): 'act_type') list_filter = ('act_type',) search_fields = ('year', 'index') - readonly_fields = ('in_charge', 'operator', 'scientist', 'signatory', - 'associated_file', 'imports', - 'departments_label', 'towns_label', - 'history_modifier', 'history_creator') + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'in_charge', 'operator', 'scientist', 'signatory', 'associated_file', + 'imports', 'departments_label', 'towns_label'] model = models.AdministrativeAct + form = make_ajax_form( + models.AdministrativeAct, {'operation': 'operation'} + ) -admin.site.register(models.AdministrativeAct, AdministrativeActAdmin) +admin_site.register(models.AdministrativeAct, AdministrativeActAdmin) class PeriodAdmin(admin.ModelAdmin): @@ -45,29 +55,68 @@ class PeriodAdmin(admin.ModelAdmin): list_filter = ('parent',) model = models.Period -admin.site.register(models.Period, PeriodAdmin) +admin_site.register(models.Period, PeriodAdmin) + + +class OperationInline(admin.TabularInline): + model = models.Operation.archaeological_sites.through + form = make_ajax_form( + model, {'operation': 'operation'}) + extra = 1 class ArchaeologicalSiteAdmin(HistorizedObjectAdmin): list_display = ('name', 'reference') search_fields = ('name', 'reference') model = models.ArchaeologicalSite - -admin.site.register(models.ArchaeologicalSite, ArchaeologicalSiteAdmin) + readonly_fields = HistorizedObjectAdmin.readonly_fields + ['imports'] + inlines = [OperationInline] + +admin_site.register(models.ArchaeologicalSite, ArchaeologicalSiteAdmin) + + +class ArchaeologicalSiteInline(admin.TabularInline): + model = models.Operation.archaeological_sites.through + form = make_ajax_form( + model, {'archaeologicalsite': 'archaeological_site'}) + extra = 1 + + +class AdminOperationForm(forms.ModelForm): + class Meta: + model = models.Operation + exclude = [] + point = PointField(label=_(u"Point"), required=False, + widget=OSMWidget) + multi_polygon = MultiPolygonField(label=_(u"Multi polygon"), required=False, + widget=OSMWidget) + in_charge = AutoCompleteSelectField('person', required=False) + scientist = AutoCompleteSelectField('person', required=False) + associated_file = AutoCompleteSelectField('file', required=False) + operator = AutoCompleteSelectField('organization', required=False) + collaborators = AutoCompleteSelectMultipleField('person', required=False) + towns = AutoCompleteSelectMultipleField('town', required=False) + archaeological_sites = AutoCompleteSelectMultipleField( + 'archaeological_site', required=False) + if settings.COUNTRY == 'fr': + cira_rapporteur = AutoCompleteSelectField('person', required=False) class OperationAdmin(HistorizedObjectAdmin): - list_display = ['year', 'operation_code', 'start_date', - 'excavation_end_date', 'end_date', - 'operation_type'] - list_filter = ("year", "operation_type",) - search_fields = ['towns__name', 'operation_code'] + list_display = ['year', 'operation_code', + 'operation_type', 'common_name'] + list_filter = ("operation_type", "year",) + search_fields = ['towns__name', 'cached_label'] if settings.COUNTRY == 'fr': - list_display += ['code_patriarche'] + list_display.insert(2, 'code_patriarche') search_fields += ['code_patriarche'] model = models.Operation + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports', 'cached_label'] + form = AdminOperationForm + inlines = [ArchaeologicalSiteInline] -admin.site.register(models.Operation, OperationAdmin) +admin_site.register(models.Operation, OperationAdmin) class OperationSourceAdmin(admin.ModelAdmin): @@ -75,49 +124,84 @@ class OperationSourceAdmin(admin.ModelAdmin): list_filter = ('source_type',) search_fields = ('title', 'operation__common_name') model = models.OperationSource + form = make_ajax_form( + model, {'operation': 'operation', + 'authors': 'author'} + ) -admin.site.register(models.OperationSource, OperationSourceAdmin) +admin_site.register(models.OperationSource, OperationSourceAdmin) class ParcelAdmin(HistorizedObjectAdmin): list_display = ['section', 'parcel_number', 'operation', 'associated_file'] - search_fields = ('operation__name',) + search_fields = ('operation__cached_label', + 'associated_file__cached_label', + 'year', 'section', 'parcel_number') model = models.Parcel + form = make_ajax_form( + model, {'associated_file': 'file', + 'operation': 'operation', + 'town': 'town'} + ) + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports', 'history_date' + ] -admin.site.register(models.Parcel, ParcelAdmin) +admin_site.register(models.Parcel, ParcelAdmin) class RecordRelationsAdmin(admin.ModelAdmin): list_display = ('left_record', 'relation_type', 'right_record') list_filter = ('relation_type',) + model = models.RecordRelations + search_fields = ['left_record__cached_label', + 'right_record__cached_label'] + form = make_ajax_form( + model, {'left_record': 'operation', + 'right_record': 'operation'}) -admin.site.register(models.RecordRelations, RecordRelationsAdmin) +admin_site.register(models.RecordRelations, RecordRelationsAdmin) class RelationTypeAdmin(admin.ModelAdmin): list_display = ('label', 'txt_idx', 'tiny_label', 'available', 'symmetrical', 'inverse_relation', 'comment') -admin.site.register(models.RelationType, RelationTypeAdmin) +admin_site.register(models.RelationType, RelationTypeAdmin) class ActTypeAdmin(GeneralTypeAdmin): list_filter = ('intented_to',) list_display = ['label', 'txt_idx', 'available', 'intented_to'] -admin.site.register(models.ActType, ActTypeAdmin) +admin_site.register(models.ActType, ActTypeAdmin) class ReportStateAdmin(GeneralTypeAdmin): list_display = ['label', 'txt_idx', 'available', 'order', 'comment'] -admin.site.register(models.ReportState, ReportStateAdmin) +admin_site.register(models.ReportState, ReportStateAdmin) + + +class ParcelOwnerAdmin(HistorizedObjectAdmin): + list_display = ['parcel', 'operation', 'associated_file', + 'owner'] + search_fields = ('parcel__operation__cached_label', + 'parcel__associated_file__cached_label', + 'owner__name', 'owner__surname', 'parcel__section', + 'parcel__parcel_number') + model = models.ParcelOwner + form = make_ajax_form( + model, {'owner': 'person', + 'parcel': 'parcel'} + ) + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports', 'history_date' + ] + +admin_site.register(models.ParcelOwner, ParcelOwnerAdmin) general_models = [models.RemainType] for model in general_models: - admin.site.register(model, GeneralTypeAdmin) - -basic_models = [models.ParcelOwner] -for model in basic_models: - admin.site.register(model) + admin_site.register(model, GeneralTypeAdmin) diff --git a/archaeological_operations/fixtures/initial_data-fr.json b/archaeological_operations/fixtures/initial_data-fr.json index 214ab9cad..43f834e0a 100644 --- a/archaeological_operations/fixtures/initial_data-fr.json +++ b/archaeological_operations/fixtures/initial_data-fr.json @@ -1,3025 +1,2794 @@ [ - { - "pk": 873, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Document attestant de la r\u00e9ception d'un dossier", - "available": true, - "code": "AR", - "intented_to": "F", - "label": "AR : Accus\u00e9 de r\u00e9ception dossier", - "indexed": false, - "associated_template": [ - 2 - ], - "txt_idx": "a_receipt" - } - }, - { - "pk": 909, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "AR_demande", - "intented_to": "TF", - "label": "AR : demande de pr\u00eat", - "indexed": false, - "associated_template": [], - "txt_idx": "loan_demand_receipt" - } - }, - { - "pk": 904, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "AR_OPER", - "intented_to": "O", - "label": "AR : Rapport DIAG Op\u00e9rateur", - "indexed": false, - "associated_template": [], - "txt_idx": "AR_operator" - } - }, - { - "pk": 905, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "AR_FOUILLE", - "intented_to": "O", - "label": "AR : Rapport FOUILLE Op\u00e9rateur", - "indexed": false, - "associated_template": [], - "txt_idx": "ar_report_excavation" - } - }, - { - "pk": 881, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "ABROG", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 d'abrogation de DIAG", - "indexed": true, - "associated_template": [], - "txt_idx": "cancel_act" - } - }, - { - "pk": 5, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Arr\u00eat\u00e9 qui donne l'autorisation \u00e0 un Am\u00e9nageur de faire ex\u00e9cuter par un Op\u00e9rateur agr\u00e9e sous la responsabilit\u00e9 d'un Responsable scientifique, une op\u00e9ration.", - "available": true, - "code": "AUT_F_PREV", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 d'autorisation de fouille pr\u00e9ventive", - "indexed": true, - "associated_template": [], - "txt_idx": "excavation_autorization_order" - } - }, - { - "pk": 6, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Arr\u00eat\u00e9 donnant l'autorisation \u00e0 une responsable scientifique de fouiller sur un terrain donn\u00e9.", - "available": true, - "code": "AUT_F_PROG", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 d'autorisation de fouille programm\u00e9e", - "indexed": true, - "associated_template": [], - "txt_idx": "prog_excav_autorization_order" - } - }, - { - "pk": 887, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "PI", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 d'autorisation de prospection inventaire", - "indexed": true, - "associated_template": [], - "txt_idx": "general_survey_act" - } - }, - { - "pk": 10, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 d'autorisation de prospection th\u00e9matique", - "indexed": true, - "associated_template": [], - "txt_idx": "thematic_survey_act" - } - }, - { - "pk": 8, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "DESIGN_RS", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 de d\u00e9signation de RS", - "indexed": true, - "associated_template": [], - "txt_idx": "responsible_act" - } - }, - { - "pk": 9, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "D\u00e9signation de l'op\u00e9rateur pour un diagnostic : utile dans le cas o\u00f9 un service territorial ET l'INRAP sont en m\u00eame temps comp\u00e9tents pour un territoire donn\u00e9.", - "available": true, - "code": "DES_OPE", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 de d\u00e9signation d'op\u00e9rateur", - "indexed": true, - "associated_template": [], - "txt_idx": "operator_designation_act" - } - }, - { - "pk": 1, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Un arr\u00eat\u00e9 prescrivant la r\u00e9alisation d'un diagnostic sur une surface donn\u00e9e, SANS pr\u00e9cision du responsable scientifique, SANS pr\u00e9cision de l'op\u00e9rateur", - "available": true, - "code": "A_DIAG", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 de diagnostic", - "indexed": true, - "associated_template": [], - "txt_idx": "diagnostic_order" - } - }, - { - "pk": 2, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Un arr\u00eat\u00e9 prescrivant la r\u00e9alisation d'une fouille pr\u00e9ventive sur une surface donn\u00e9e", - "available": true, - "code": "A_F_PREV", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 de prescription de fouille", - "indexed": true, - "associated_template": [], - "txt_idx": "excavation_order" - } - }, - { - "pk": 876, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "Arr_sond", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 de sondage", - "indexed": true, - "associated_template": [], - "txt_idx": "sondage_act" - } - }, - { - "pk": 885, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "ZONAGE", - "intented_to": "F", - "label": "Arr\u00eat\u00e9 de zonage arch\u00e9ologqiue", - "indexed": true, - "associated_template": [], - "txt_idx": "archaeological_zoning" - } - }, - { - "pk": 870, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Lorsque des op\u00e9rations sont r\u00e9alis\u00e9es par tranches successives, le calendrier pr\u00e9visionnel de leur r\u00e9alisation est communiqu\u00e9 au pr\u00e9fet de r\u00e9gion qui peut d\u00e9cider de prescrire les mesures pr\u00e9vues \u00e0 l'article R. 523-15 soit pour la totalit\u00e9 du projet, soit lors de l'ex\u00e9cution de chaque tranche. Dans ce dernier cas, il d\u00e9finit par arr\u00eat\u00e9 les d\u00e9lais de sa saisine et la nature des documents \u00e0 fournir.\r\nLes op\u00e9rations de diagnostic sont toutefois conduites pour l'ensemble du projet si la personne qui r\u00e9alise ce projet en fait la demande.\r\n", - "available": true, - "code": "A_INITIAL", - "intented_to": "F", - "label": "Arr\u00eat\u00e9 INITIAL (d\u00e9finissant les d\u00e9lais de saisine par tranches, Article R523-21)", - "indexed": true, - "associated_template": [], - "txt_idx": "initial_act" - } - }, - { - "pk": 871, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Modification d'un autre arr\u00eat\u00e9 concernant une op\u00e9ration", - "available": true, - "code": "A_MODIF_SU", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 modificatif", - "indexed": true, - "associated_template": [], - "txt_idx": "modif_act_ope" - } - }, - { - "pk": 884, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "A_MODIF_PR", - "intented_to": "O", - "label": "Arr\u00eat\u00e9 modificatif de la consistance du projet", - "indexed": true, - "associated_template": [], - "txt_idx": "project_modif_act" - } - }, - { - "pk": 872, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Modification d'un arr\u00eat\u00e9 d\u00e9finissant les d\u00e9lais de saisines (arr\u00eat\u00e9 initial)", - "available": true, - "code": "", - "intented_to": "F", - "label": "Arr\u00eat\u00e9 modificatif (Initial)", - "indexed": true, - "associated_template": [], - "txt_idx": "modif_act_init" - } - }, - { - "pk": 900, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "DAPA_DIAG", - "intented_to": "O", - "label": "BE DAPA Rapport DIAG", - "indexed": false, - "associated_template": [], - "txt_idx": "report_post" - } - }, - { - "pk": 902, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "INRAP_RAP", - "intented_to": "O", - "label": "BE INRAP Rapport Diag autre Op\u00e9rateur", - "indexed": false, - "associated_template": [], - "txt_idx": "post_report_inrap" - } - }, - { - "pk": 901, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "BE_MAIRIE", - "intented_to": "O", - "label": "BE Mairie Rapport DIAG", - "indexed": false, - "associated_template": [], - "txt_idx": "post_report_town" - } - }, - { - "pk": 910, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "", - "intented_to": "T", - "label": "Constat d'\u00e9tat", - "indexed": false, - "associated_template": [ - 1 - ], - "txt_idx": "observation_status" - } - }, - { - "pk": 899, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "(Art. R523-19 du code du patrimoine)\r\n\r\nLe pr\u00e9fet de r\u00e9gion dispose d'un d\u00e9lai de trois mois \u00e0 compter de la r\u00e9ception du rapport de diagnostic complet pour notifier le contenu des prescriptions post\u00e9rieures au diagnostic.\r\nLa date de r\u00e9ception du rapport de diagnostic complet est notifi\u00e9e par le pr\u00e9fet de r\u00e9gion \u00e0 l'autorit\u00e9 qui instruit la demande d'autorisation et \u00e0 l'am\u00e9nageur.\r\nDans le cas o\u00f9 le diagnostic a d\u00e9j\u00e0 \u00e9t\u00e9 r\u00e9alis\u00e9 en application de l'article R. 523-14, le d\u00e9lai de trois mois court \u00e0 compter de la r\u00e9ception du dossier par le pr\u00e9fet de r\u00e9gion dans les conditions pr\u00e9vues aux articles R. 523-9 et R. 523-10 ou de la confirmation par l'am\u00e9nageur de son intention de r\u00e9aliser les am\u00e9nagements, ouvrages ou travaux projet\u00e9s.\r\nA d\u00e9faut de notification dans ce d\u00e9lai, le pr\u00e9fet de r\u00e9gion est r\u00e9put\u00e9 avoir renonc\u00e9 \u00e0 \u00e9dicter de telles prescriptions.", - "available": true, - "code": "CONFIRM", - "intented_to": "O", - "label": "Courrier am\u00e9nageur demande de confirmation de projet ", - "indexed": false, - "associated_template": [], - "txt_idx": "mail_confirm" - } - }, - { - "pk": 886, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Courrier qui accompagne l'arr\u00eat\u00e9 de diagnostic envoy\u00e9 \u00e0 l'am\u00e9nageur", - "available": true, - "code": "COUR_DIAG", - "intented_to": "O", - "label": "Courrier am\u00e9nageur Diagnostic", - "indexed": false, - "associated_template": [], - "txt_idx": "mail_diag" - } - }, - { - "pk": 895, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Suite \u00e0 une demande de l'am\u00e9nageur, si une partie des terrains ne contient pas de vestiges, il est possible de faire une lib\u00e9ration partielle.", - "available": true, - "code": "LIB_PART", - "intented_to": "O", - "label": "Courrier am\u00e9nageur lib\u00e9ration PARTIELLE terrain post DIAG", - "indexed": false, - "associated_template": [], - "txt_idx": "part_free_diag" - } - }, - { - "pk": 879, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "RAS_DIAG", - "intented_to": "O", - "label": "Courrier am\u00e9nageur lib\u00e9ration TOTALE terrain post DIAG", - "indexed": false, - "associated_template": [], - "txt_idx": "RAS_Post_DIAG" - } - }, - { - "pk": 880, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "Lib_Terr", - "intented_to": "O", - "label": "Courrier am\u00e9nageur lib\u00e9ration TOTALE terrain post FOUILLE", - "indexed": false, - "associated_template": [], - "txt_idx": "free_field" - } - }, - { - "pk": 890, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "C_Am_FOUIL", - "intented_to": "O", - "label": "Courrier am\u00e9nageur Prescription de Fouille", - "indexed": false, - "associated_template": [], - "txt_idx": "land_plan_excavation_mail" - } - }, - { - "pk": 878, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "RAP_Amenag", - "intented_to": "O", - "label": "Courrier am\u00e9nageur transmission rapport", - "indexed": false, - "associated_template": [], - "txt_idx": "contractor_post_ope_mail" - } - }, - { - "pk": 892, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "C_COLL_TER", - "intented_to": "O", - "label": "Courrier COLL TERR DIAG", - "indexed": false, - "associated_template": [], - "txt_idx": "terr_service_diag_mail" - } - }, - { - "pk": 877, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "C_PSTI_OK", - "intented_to": "O", - "label": "Courrier d'accord sur PSTI DIAG", - "indexed": false, - "associated_template": [], - "txt_idx": "ok_project_diag" - } - }, - { - "pk": 898, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "MODIF_PSTI", - "intented_to": "O", - "label": "Courrier demande Modif PSTI", - "indexed": false, - "associated_template": [], - "txt_idx": "modif_project" - } - }, - { - "pk": 889, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "DIAG_dejaA", - "intented_to": "F", - "label": "Courrier diag existe deja AMENAGEUR", - "indexed": false, - "associated_template": [], - "txt_idx": "diag_already_land" - } - }, - { - "pk": 888, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "DIAG_EXIST", - "intented_to": "F", - "label": "Courrier diag existe deja S_Instructeur", - "indexed": false, - "associated_template": [], - "txt_idx": "diag_already" - } - }, - { - "pk": 893, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Courrier \u00e0 l'am\u00e9nageur lui indiquant l'intention de prescrire une fouille directement sur un Dossier", - "available": true, - "code": "C_INT_pres", - "intented_to": "F", - "label": "Courrier INTENTION de prescrire une FOUILLE", - "indexed": false, - "associated_template": [], - "txt_idx": "excavation_mail" - } - }, - { - "pk": 903, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "REFUS_RAPP", - "intented_to": "O", - "label": "Courrier Op\u00e9rateur Rapport NON conforme", - "indexed": false, - "associated_template": [], - "txt_idx": "bad_report" - } - }, - { - "pk": 891, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "C_SI_DIAG", - "intented_to": "O", - "label": "Courrier Service Instructeur DIAG", - "indexed": false, - "associated_template": [], - "txt_idx": "town_planning_diag_mail" - } - }, - { - "pk": 894, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "C_SI_Fouil", - "intented_to": "O", - "label": "Courrier Service Instructeur FOUILLE DIRECTE", - "indexed": false, - "associated_template": [], - "txt_idx": "mail_excavation_urbanism" - } - }, - { - "pk": 906, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "FICHE_OPE", - "intented_to": "O", - "label": "FICHE R\u00e9ception et transmission des rapports d\u2019op\u00e9ration", - "indexed": false, - "associated_template": [], - "txt_idx": "OPE_sheetfile" - } - }, - { - "pk": 896, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "PV relatant une visite particuli\u00e8re de contr\u00f4le du SRA lors d'une op\u00e9ration d'arch\u00e9ologie", - "available": true, - "code": "PV_CR", - "intented_to": "O", - "label": "PV CR de Visite", - "indexed": false, - "associated_template": [], - "txt_idx": "PV_CR" - } - }, - { - "pk": 7, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Suite \u00e0 une Saisine (art.8), envoi d'une r\u00e9ponse de non prescription", - "available": true, - "code": "RAS", - "intented_to": "F", - "label": "R\u00e9ponse NON prescription \u00e0 une saisine", - "indexed": false, - "associated_template": [], - "txt_idx": "reply_no_prescription" - } - }, - { - "pk": 883, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "CU_POSITIF", - "intented_to": "F", - "label": "R\u00e9ponse POSITIVE \u00e0 un CU", - "indexed": false, - "associated_template": [], - "txt_idx": "pos_CU" - } - }, - { - "pk": 3, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Suite \u00e0 une demande d'avis, les SRA \u00e9met un courrier signalant sa volont\u00e9 de prescrire un diagnostic ou une fouille sur l'emprise du projet en objet.", - "available": true, - "code": "AVIS_DIAG", - "intented_to": "F", - "label": "R\u00e9ponse POSITIVE \u00e0 une demande d'AVIS", - "indexed": false, - "associated_template": [], - "txt_idx": "pos_advice_reply" - } - }, - { - "pk": 897, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Suite \u00e0 une demande d'avis, les SRA \u00e9met un courrier signalant sa volont\u00e9 de prescrire un diagnostic ou une fouille sur l'emprise du projet en objet.", - "available": true, - "code": "AVIS_DIAG2", - "intented_to": "F", - "label": "R\u00e9ponse POSITIVE \u00e0 une demande d'AVIS (demande de complements)", - "indexed": false, - "associated_template": [], - "txt_idx": "pas_advice_reply_bis" - } - }, - { - "pk": 907, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "AVIS_POS_M", - "intented_to": "F", - "label": "R\u00e9ponse POSITIVE \u00e0 une demande d'AVIS sur \u00e9tude pr\u00e9alable et diagnostic architectural (MH)", - "indexed": false, - "associated_template": [], - "txt_idx": "pos_advice_mh" - } - }, - { - "pk": 874, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "INFO", - "intented_to": "F", - "label": "R\u00e9ponse POSITIVE \u00e0 une demande d'INFO", - "indexed": false, - "associated_template": [], - "txt_idx": "info_pos" - } - }, - { - "pk": 882, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "CU_RAS", - "intented_to": "F", - "label": "R\u00e9ponse RAS \u00e0 un CU", - "indexed": false, - "associated_template": [], - "txt_idx": "CU_ok" - } - }, - { - "pk": 4, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "Suite \u00e0 une demande d'avis, les SRA \u00e9met un courrier signalant sa volont\u00e9 de NE PAS prescrire un diagnostic ou une fouille sur l'emprise du projet en objet.", - "available": true, - "code": "Art_12_RAS", - "intented_to": "F", - "label": "R\u00e9ponse RAS \u00e0 une demande d'AVIS", - "indexed": false, - "associated_template": [], - "txt_idx": "neg_advice_reply" - } - }, - { - "pk": 908, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "AVIS_RAS_M", - "intented_to": "F", - "label": "R\u00e9ponse RAS \u00e0 une demande d'AVIS sur \u00e9tude pr\u00e9alable et diagnostic architectural (MH)", - "indexed": false, - "associated_template": [], - "txt_idx": "neg_advice_MH" - } - }, - { - "pk": 875, - "model": "archaeological_operations.acttype", - "fields": { - "comment": "", - "available": true, - "code": "INFO_RAS", - "intented_to": "F", - "label": "R\u00e9ponse RAS \u00e0 une demande d'INFO", - "indexed": false, - "associated_template": [], - "txt_idx": "info_ras" - } - }, - { - "pk": 35, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 0, - "order": 0, - "label": "Non-renseign\u00e9", - "start_date": 0, - "txt_idx": "not_yet_documented" - } - }, - { - "pk": 40, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 39, - "end_date": 0, - "order": 1, - "label": "Antiquit\u00e9 tardive (M\u00e9d.)", - "start_date": 0, - "txt_idx": "late_antiq_med" - } - }, - { - "pk": 39, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 38, - "end_date": 0, - "order": 1, - "label": "Antiquit\u00e9 m\u00e9diterran\u00e9enne", - "start_date": 0, - "txt_idx": "mediterranean_antiq" - } - }, - { - "pk": 38, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -500, - "order": 1, - "label": "M\u00e9diterran\u00e9en", - "start_date": 500, - "txt_idx": "mediterranean" - } - }, - { - "pk": 37, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 0, - "order": 1, - "label": "Am\u00e9rindien", - "start_date": 0, - "txt_idx": "amerindian" - } - }, - { - "pk": 41, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 39, - "end_date": 0, - "order": 2, - "label": "\u00c9poque archa\u00efque", - "start_date": 0, - "txt_idx": "archaic_epoc" - } - }, - { - "pk": 42, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 39, - "end_date": 0, - "order": 3, - "label": "Bas-Empire (M\u00e9d.)", - "start_date": 0, - "txt_idx": "lower_empire_med" - } - }, - { - "pk": 43, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 39, - "end_date": 0, - "order": 4, - "label": "\u00c9poque classique", - "start_date": 0, - "txt_idx": "classic_epoc" - } - }, - { - "pk": 44, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 39, - "end_date": 0, - "order": 5, - "label": "\u00c9poque hell\u00e9nistique", - "start_date": 0, - "txt_idx": "hellen_epoc" - } - }, - { - "pk": 45, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 39, - "end_date": 0, - "order": 6, - "label": "Haut-Empire (M\u00e9d.)", - "start_date": 0, - "txt_idx": "upper_empire" - } - }, - { - "pk": 34, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 0, - "order": 1000, - "label": "\u00c9poque ind\u00e9termin\u00e9e", - "start_date": 0, - "txt_idx": "indetermined" - } - }, - { - "pk": 31, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 2016, - "order": 2000, - "label": "P\u00e9riode r\u00e9cente", - "start_date": 1492, - "txt_idx": "recent_times" - } - }, - { - "pk": 33, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 31, - "end_date": 2016, - "order": 2800, - "label": "\u00c9poque contemporaine", - "start_date": 1815, - "txt_idx": "contemporan" - } - }, - { - "pk": 32, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 31, - "end_date": 1815, - "order": 2900, - "label": "\u00c9poque moderne", - "start_date": 1492, - "txt_idx": "modern" - } - }, - { - "pk": 27, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 1492, - "order": 3000, - "label": "Moyen \u00c2ge", - "start_date": 476, - "txt_idx": "middle_age" - } - }, - { - "pk": 30, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 27, - "end_date": 1492, - "order": 3700, - "label": "Bas Moyen \u00c2ge", - "start_date": 1204, - "txt_idx": "low_middle_age" - } - }, - { - "pk": 29, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 27, - "end_date": 1204, - "order": 3800, - "label": "Moyen \u00c2ge classique", - "start_date": 987, - "txt_idx": "classic_middle_age" - } - }, - { - "pk": 28, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 27, - "end_date": 987, - "order": 3900, - "label": "Haut Moyen \u00c2ge", - "start_date": 476, - "txt_idx": "high_middle_age" - } - }, - { - "pk": 23, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 476, - "order": 4000, - "label": "Gallo-romain", - "start_date": -40, - "txt_idx": "gallo-roman" - } - }, - { - "pk": 26, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 23, - "end_date": 476, - "order": 4700, - "label": "Bas Empire", - "start_date": 192, - "txt_idx": "low_empire" - } - }, - { - "pk": 25, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 23, - "end_date": 192, - "order": 4800, - "label": "Haut Empire", - "start_date": -27, - "txt_idx": "high-empire" - } - }, - { - "pk": 24, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 23, - "end_date": -27, - "order": 4900, - "label": "R\u00e9publique", - "start_date": -40, - "txt_idx": "republic" - } - }, - { - "pk": 15, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -40, - "order": 5000, - "label": "Protohistoire", - "start_date": -2000, - "txt_idx": "protohistory" - } - }, - { - "pk": 22, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 17, - "end_date": -40, - "order": 5780, - "label": "Deuxi\u00e8me \u00c2ge du Fer", - "start_date": -500, - "txt_idx": "second_iron_age" - } - }, - { - "pk": 21, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 17, - "end_date": -450, - "order": 5790, - "label": "Premier \u00c2ge du Fer", - "start_date": -800, - "txt_idx": "first_iron_age" - } - }, - { - "pk": 17, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 15, - "end_date": -40, - "order": 5800, - "label": "\u00c2ge du Fer", - "start_date": -800, - "txt_idx": "iron_age" - } - }, - { - "pk": 20, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 16, - "end_date": -750, - "order": 5870, - "label": "\u00c2ge du Bronze final", - "start_date": -1200, - "txt_idx": "final_bronze_age" - } - }, - { - "pk": 19, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 16, - "end_date": -1200, - "order": 5880, - "label": "\u00c2ge du Bronze moyen", - "start_date": -1600, - "txt_idx": "middle_bronze_age" - } - }, - { - "pk": 18, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 16, - "end_date": -1600, - "order": 5890, - "label": "\u00c2ge du Bronze ancien", - "start_date": -2000, - "txt_idx": "old_bronze_age" - } - }, - { - "pk": 16, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 15, - "end_date": -750, - "order": 5900, - "label": "\u00c2ge du Bronze", - "start_date": -2000, - "txt_idx": "bronze_age" - } - }, - { - "pk": 10, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -2000, - "order": 6000, - "label": "N\u00e9olithique", - "start_date": -5500, - "txt_idx": "neolithic" - } - }, - { - "pk": 14, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 10, - "end_date": -2000, - "order": 6600, - "label": "N\u00e9olithique final", - "start_date": -2800, - "txt_idx": "final_neolithic" - } - }, - { - "pk": 13, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 10, - "end_date": -2500, - "order": 6700, - "label": "N\u00e9olithique r\u00e9cent", - "start_date": -3200, - "txt_idx": "recent_neolithic" - } - }, - { - "pk": 12, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 10, - "end_date": -3200, - "order": 6800, - "label": "N\u00e9olithique moyen", - "start_date": -4500, - "txt_idx": "middle_neolithic" - } - }, - { - "pk": 11, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 10, - "end_date": -4500, - "order": 6900, - "label": "N\u00e9olithique ancien", - "start_date": -5500, - "txt_idx": "old_neolithic" - } - }, - { - "pk": 6, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -5000, - "order": 7000, - "label": "M\u00e9solithique", - "start_date": -10000, - "txt_idx": "mesolithic" - } - }, - { - "pk": 9, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 6, - "end_date": -5000, - "order": 7700, - "label": "M\u00e9solithique r\u00e9cent", - "start_date": -7000, - "txt_idx": "recent_mesolithic" - } - }, - { - "pk": 8, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": false, - "parent": 6, - "end_date": -7000, - "order": 7800, - "label": "M\u00e9solithique moyen", - "start_date": -8000, - "txt_idx": "middle_mesolithic" - } - }, - { - "pk": 7, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 6, - "end_date": -7000, - "order": 7900, - "label": "M\u00e9solithique ancien", - "start_date": -10000, - "txt_idx": "old_mesolithic" - } - }, - { - "pk": 1, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -10000, - "order": 8000, - "label": "Pal\u00e9olithique", - "start_date": -450000, - "txt_idx": "paleolithic" - } - }, - { - "pk": 5, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 1, - "end_date": -10000, - "order": 8600, - "label": "Pal\u00e9olithique sup\u00e9rieur final", - "start_date": -12000, - "txt_idx": "final_paleolithic" - } - }, - { - "pk": 4, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 1, - "end_date": -12000, - "order": 8700, - "label": "Pal\u00e9olithique sup\u00e9rieur", - "start_date": -35000, - "txt_idx": "late_paleolithic" - } - }, - { - "pk": 3, - "model": "archaeological_operations.period", - "fields": { - "comment": "1200, '', , ),", - "available": true, - "parent": 1, - "end_date": -35000, - "order": 8800, - "label": "Pal\u00e9olithique moyen", - "start_date": -150000, - "txt_idx": "middle_paleolithic" - } - }, - { - "pk": 2, - "model": "archaeological_operations.period", - "fields": { - "comment": "1100, 'Pal\u00e9olithique ancien', , )", - "available": true, - "parent": 1, - "end_date": -150000, - "order": 8900, - "label": "Pal\u00e9olithique ancien", - "start_date": -450000, - "txt_idx": "ancien_paleolithic" - } - }, - { - "pk": 160, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "aile", - "label": "aile" - } - }, - { - "pk": 161, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "aire-de-battage", - "label": "aire de battage" - } - }, - { - "pk": 162, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "amas", - "label": "amas" - } - }, - { - "pk": 163, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "amas-coquillier", - "label": "amas coquillier" - } - }, - { - "pk": 164, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "amas-de-debitage", - "label": "amas de d\u00e9bitage" - } - }, - { - "pk": 165, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "amenagement-indetermine", - "label": "am\u00e9nagement ind\u00e9termin\u00e9" - } - }, - { - "pk": 166, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "anomalie", - "label": "anomalie" - } - }, - { - "pk": 167, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "arc", - "label": "arc" - } - }, - { - "pk": 168, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "arcasse", - "label": "arcasse" - } - }, - { - "pk": 169, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "arche", - "label": "arche" - } - }, - { - "pk": 170, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "aula", - "label": "aula" - } - }, - { - "pk": 171, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "autel", - "label": "autel" - } - }, - { - "pk": 172, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "banquette", - "label": "banquette" - } - }, - { - "pk": 173, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "barbacane", - "label": "barbacane" - } - }, - { - "pk": 174, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "barrot", - "label": "barrot" - } - }, - { - "pk": 175, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "basse-cour", - "label": "basse-cour" - } - }, - { - "pk": 176, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bassin", - "label": "bassin" - } - }, - { - "pk": 177, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bastion", - "label": "bastion" - } - }, - { - "pk": 178, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "batiment", - "label": "b\u00e2timent" - } - }, - { - "pk": 179, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bloc", - "label": "bloc" - } - }, - { - "pk": 180, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bloc-orne", - "label": "bloc orn\u00e9" - } - }, - { - "pk": 181, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "bloc-ouvrage", - "label": "bloc ouvrag\u00e9" - } - }, - { - "pk": 182, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boisage", - "label": "boisage" - } - }, - { - "pk": 183, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "boniferie", - "label": "boniferie" - } - }, - { - "pk": 184, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "borde", - "label": "bord\u00e9" - } - }, - { - "pk": 185, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "borde-a-clin", - "label": "bord\u00e9 \u00e0 clin" - } - }, - { - "pk": 186, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "borde-a-franc-bord", - "label": "bord\u00e9 \u00e0 franc-bord" - } - }, - { - "pk": 187, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "borne", - "label": "borne" - } - }, - { - "pk": 188, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "butte", - "label": "butte" - } - }, - { - "pk": 5, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "cairn", - "label": "cairn" - } - }, - { - "pk": 189, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "calage", - "label": "calage" - } - }, - { - "pk": 190, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "calfatage", - "label": "calfatage" - } - }, - { - "pk": 191, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "calvaire", - "label": "calvaire" - } - }, - { - "pk": 192, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "canalisation", - "label": "canalisation" - } - }, - { - "pk": 193, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cargaison", - "label": "cargaison" - } - }, - { - "pk": 194, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cave", - "label": "cave" - } - }, - { - "pk": 195, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cercueil", - "label": "cercueil" - } - }, - { - "pk": 196, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "charpente", - "label": "charpente" - } - }, - { - "pk": 9, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "castle", - "label": "ch\u00e2teau" - } - }, - { - "pk": 197, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cloitre", - "label": "clo\u00eetre" - } - }, - { - "pk": 198, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cockpit", - "label": "cockpit" - } - }, - { - "pk": 199, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "colonnade", - "label": "colonnade" - } - }, - { - "pk": 200, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "colonne-element-de", - "label": "colonne (\u00e9l\u00e9ment de)" - } - }, - { - "pk": 201, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "construction", - "label": "construction" - } - }, - { - "pk": 202, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coque", - "label": "coque" - } - }, - { - "pk": 203, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coque-borde-premier", - "label": "coque bord\u00e9-premier" - } - }, - { - "pk": 204, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "coque-membrure-premiere", - "label": "coque membrure-premi\u00e8re" - } - }, - { - "pk": 205, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "couple", - "label": "couple" - } - }, - { - "pk": 206, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cour", - "label": "cour" - } - }, - { - "pk": 207, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "courtine", - "label": "courtine" - } - }, - { - "pk": 208, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "croix", - "label": "croix" - } - }, - { - "pk": 209, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "crypte", - "label": "crypte" - } - }, - { - "pk": 210, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cryptoportique", - "label": "cryptoportique" - } - }, - { - "pk": 211, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cuve", - "label": "cuve" - } - }, - { - "pk": 212, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "cuvelage", - "label": "cuvelage" - } - }, - { - "pk": 213, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "dallage", - "label": "dallage" - } - }, - { - "pk": 214, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "demi-lune", - "label": "demi-lune" - } - }, - { - "pk": 215, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "depotoir", - "label": "d\u00e9potoir" - } - }, - { - "pk": 216, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "derive", - "label": "d\u00e9rive" - } - }, - { - "pk": 217, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "doublage", - "label": "doublage" - } - }, - { - "pk": 3, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "church", - "label": "\u00e9glise" - } - }, - { - "pk": 218, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "empierrement", - "label": "empierrement" - } - }, - { - "pk": 219, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "emplanture", - "label": "emplanture" - } - }, - { - "pk": 220, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "empreinte", - "label": "empreinte" - } - }, - { - "pk": 2, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "enclosure", - "label": "enclos" - } - }, - { - "pk": 221, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "enclos", - "label": "enclos" - } - }, - { - "pk": 222, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "enclos-systeme-d", - "label": "enclos (syst\u00e8me d')" - } - }, - { - "pk": 223, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "entree-amenagee", - "label": "entr\u00e9e am\u00e9nag\u00e9e" - } - }, - { - "pk": 224, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "escalier", - "label": "escalier" - } - }, - { - "pk": 225, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "etambot", - "label": "\u00e9tambot" - } - }, - { - "pk": 226, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "etrave", - "label": "\u00e9trave" - } - }, - { - "pk": 227, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "etrave-a-eperon", - "label": "\u00e9trave \u00e0 \u00e9peron" - } - }, - { - "pk": 228, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "etuve", - "label": "\u00e9tuve" - } - }, - { - "pk": 229, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ferrier", - "label": "ferrier" - } - }, - { - "pk": 230, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fondation", - "label": "fondation" - } - }, - { - "pk": 231, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fosse", - "label": "fosse" - } - }, - { - "pk": 6, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "ditch", - "label": "foss\u00e9" - } - }, - { - "pk": 232, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fosses-reseau-de", - "label": "foss\u00e9s (r\u00e9seau de)" - } - }, - { - "pk": 233, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "four", - "label": "four" - } - }, - { - "pk": 234, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "foyer", - "label": "foyer" - } - }, - { - "pk": 235, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "foyer-vidange-de", - "label": "foyer (vidange de)" - } - }, - { - "pk": 236, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "front-de-taille", - "label": "front de taille" - } - }, - { - "pk": 237, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "fuselage", - "label": "fuselage" - } - }, - { - "pk": 238, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "galerie", - "label": "galerie" - } - }, - { - "pk": 239, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "garenne", - "label": "garenne" - } - }, - { - "pk": 240, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "glaciere", - "label": "glaci\u00e8re" - } - }, - { - "pk": 241, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gouvernail", - "label": "gouvernail" - } - }, - { - "pk": 242, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "gradins", - "label": "gradins" - } - }, - { - "pk": 243, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "grange", - "label": "grange" - } - }, - { - "pk": 244, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "grenier", - "label": "grenier" - } - }, - { - "pk": 245, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "helice", - "label": "h\u00e9lice" - } - }, - { - "pk": 246, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "hypocauste", - "label": "hypocauste" - } - }, - { - "pk": 247, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "incineration", - "label": "incin\u00e9ration" - } - }, - { - "pk": 248, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "inhumation", - "label": "inhumation" - } - }, - { - "pk": 249, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "inscription", - "label": "inscription" - } - }, - { - "pk": 250, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "jardin", - "label": "jardin" - } - }, - { - "pk": 251, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "laraire", - "label": "laraire" - } - }, - { - "pk": 252, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "latrines", - "label": "latrines" - } - }, - { - "pk": 253, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "lest", - "label": "lest" - } - }, - { - "pk": 254, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "levee", - "label": "lev\u00e9e" - } - }, - { - "pk": 255, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mat", - "label": "m\u00e2t" - } - }, - { - "pk": 256, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "membrure", - "label": "membrure" - } - }, - { - "pk": 11, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "menhir", - "label": "menhir" - } - }, - { - "pk": 257, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "meule-fixe", - "label": "meule fixe" - } - }, - { - "pk": 258, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mosaique", - "label": "mosa\u00efque" - } - }, - { - "pk": 259, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "moteur", - "label": "moteur" - } - }, - { - "pk": 10, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "motte-castrale", - "label": "motte castrale" - } - }, - { - "pk": 260, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "moule-a-cloches", - "label": "moule \u00e0 cloches" - } - }, - { - "pk": 261, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "mur", - "label": "mur" - } - }, - { - "pk": 263, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "niche", - "label": "niche" - } - }, - { - "pk": 264, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "niveau-doccupation", - "label": "niveau d'occupation" - } - }, - { - "pk": 265, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "oratoire", - "label": "oratoire" - } - }, - { - "pk": 266, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "orniere", - "label": "orni\u00e8re" - } - }, - { - "pk": 267, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "ouvrage-avance", - "label": "ouvrage avanc\u00e9" - } - }, - { - "pk": 268, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "palissade", - "label": "palissade" - } - }, - { - "pk": 269, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "paroi-ornee", - "label": "paroi orn\u00e9e" - } - }, - { - "pk": 270, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pavage", - "label": "pavage" - } - }, - { - "pk": 271, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pieu", - "label": "pieu" - } - }, - { - "pk": 272, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pigeonnier", - "label": "pigeonnier" - } - }, - { - "pk": 273, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pile", - "label": "pile" - } - }, - { - "pk": 274, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plafond", - "label": "plafond" - } - }, - { - "pk": 275, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "plancher", - "label": "plancher" - } - }, - { - "pk": 276, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "polissoir-fixe", - "label": "polissoir fixe" - } - }, - { - "pk": 277, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pont-de-bateau", - "label": "pont de bateau" - } - }, - { - "pk": 278, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "porte", - "label": "porte" - } - }, - { - "pk": 279, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "portique", - "label": "portique" - } - }, - { - "pk": 280, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "preceinte", - "label": "pr\u00e9ceinte" - } - }, - { - "pk": 281, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "pressoir", - "label": "pressoir" - } - }, - { - "pk": 282, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "puits", - "label": "puits" - } - }, - { - "pk": 283, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "purgerie", - "label": "purgerie" - } - }, - { - "pk": 284, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "quille", - "label": "quille" - } - }, - { - "pk": 285, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "recipient-fixe", - "label": "r\u00e9cipient fixe" - } - }, - { - "pk": 286, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "rempart", - "label": "rempart" - } - }, - { - "pk": 287, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sarcophage", - "label": "sarcophage" - } - }, - { - "pk": 288, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "silo", - "label": "silo" - } - }, - { - "pk": 289, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sol-doccupation", - "label": "sol d'occupation" - } - }, - { - "pk": 290, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "sol-orne", - "label": "sol orn\u00e9" - } - }, - { - "pk": 291, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "source-amenagee", - "label": "source am\u00e9nag\u00e9e" - } - }, - { - "pk": 292, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "souterrain", - "label": "souterrain" - } - }, - { - "pk": 293, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "statue", - "label": "statue" - } - }, - { - "pk": 294, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "statue-menhir", - "label": "statue-menhir" - } - }, - { - "pk": 295, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "stele", - "label": "st\u00e8le" - } - }, - { - "pk": 296, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "talus", - "label": "talus" - } - }, - { - "pk": 297, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tour", - "label": "tour" - } - }, - { - "pk": 298, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "trace-agraire", - "label": "trace agraire" - } - }, - { - "pk": 299, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "train-datterrissage", - "label": "train d'atterrissage" - } - }, - { - "pk": 300, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tranchee-dextraction", - "label": "tranch\u00e9e d'extraction" - } - }, - { - "pk": 301, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "trou-de-jauge", - "label": "trou de jauge" - } - }, - { - "pk": 302, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "trou-de-poteau", - "label": "trou de poteau" - } - }, - { - "pk": 303, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "trous-de-poteau-ensemble-de", - "label": "trous de poteau (ensemble de)" - } - }, - { - "pk": 304, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "tunnel", - "label": "tunnel" - } - }, - { - "pk": 305, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "urne", - "label": "urne" - } - }, - { - "pk": 306, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "vaigre", - "label": "vaigre" - } - }, - { - "pk": 307, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "verriere", - "label": "verri\u00e8re" - } - }, - { - "pk": 1, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "villa", - "label": "villa" - } - }, - { - "pk": 308, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "virure", - "label": "virure" - } - }, - { - "pk": 309, - "model": "archaeological_operations.remaintype", - "fields": { - "comment": null, - "available": true, - "txt_idx": "zone-de-rejet", - "label": "zone de rejet" - } - }, - { - "pk": 1, - "model": "archaeological_operations.relationtype", - "fields": { - "comment": "", - "available": true, - "tiny_label": null, - "label": "Comprend", - "symmetrical": false, - "inverse_relation": 2, - "order": 1, - "txt_idx": "has_got" - } - }, - { - "pk": 2, - "model": "archaeological_operations.relationtype", - "fields": { - "comment": "", - "available": true, - "tiny_label": "", - "label": "Comprise dans", - "symmetrical": false, - "inverse_relation": 1, - "order": 1, - "txt_idx": "is_in" - } - }, - { - "pk": 3, - "model": "archaeological_operations.relationtype", - "fields": { - "comment": "", - "available": true, - "tiny_label": "", - "label": "Relation diffuse", - "symmetrical": true, - "inverse_relation": null, - "order": 1, - "txt_idx": "fuzzy_relation" - } - }, - { - "pk": 3, - "model": "archaeological_operations.reportstate", - "fields": { - "comment": "Ce rapport n'a pas encore \u00e9t\u00e9 re\u00e7u.", - "available": true, - "txt_idx": "not_received", - "order": 1, - "label": "Non re\u00e7u" - } - }, - { - "pk": 1, - "model": "archaeological_operations.reportstate", - "fields": { - "comment": "Le rapport a \u00e9t\u00e9 re\u00e7u mais n'est pas encore d\u00e9pouill\u00e9.", - "available": true, - "txt_idx": "received", - "order": 2, - "label": "Re\u00e7u et non d\u00e9pouill\u00e9" - } - }, - { - "pk": 7, - "model": "archaeological_operations.reportstate", - "fields": { - "comment": "Plusieurs rapports ont \u00e9t\u00e9 re\u00e7us mais ne sont pas encore d\u00e9pouill\u00e9s.", - "available": true, - "txt_idx": "received__not_processed", - "order": 3, - "label": "Re\u00e7us et non d\u00e9pouill\u00e9s" - } - }, - { - "pk": 10, - "model": "archaeological_operations.reportstate", - "fields": { - "comment": "Plusieurs rapports ont \u00e9t\u00e9 re\u00e7us mais ne sont que partiellement d\u00e9pouill\u00e9s.", - "available": true, - "txt_idx": "reports_received_partially_processed", - "order": 4, - "label": "Re\u00e7us, partiellement d\u00e9pouill\u00e9s" - } - }, - { - "pk": 9, - "model": "archaeological_operations.reportstate", - "fields": { - "comment": "Le rapport (unique) a \u00e9t\u00e9 re\u00e7u et d\u00e9pouill\u00e9.", - "available": true, - "txt_idx": "one_report_received_and_processed", - "order": 5, - "label": "Re\u00e7u et d\u00e9pouill\u00e9" - } - }, - { - "pk": 8, - "model": "archaeological_operations.reportstate", - "fields": { - "comment": "Tous les rapports ont \u00e9t\u00e9 re\u00e7us mais n'ont pas \u00e9t\u00e9 encore d\u00e9pouill\u00e9s.", - "available": true, - "txt_idx": "received_and_processed", - "order": 6, - "label": "Re\u00e7us et d\u00e9pouill\u00e9s" - } - }, - { - "pk": 4, - "model": "archaeological_operations.reportstate", - "fields": { - "comment": "Il n'existe pas de rapport pour cette op\u00e9ration.", - "available": true, - "txt_idx": "no-report", - "order": 7, - "label": "Rapport inexistant" - } - } -]
\ No newline at end of file +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 de diagnostic", + "txt_idx": "diagnostic_order", + "comment": "Un arr\u00eat\u00e9 prescrivant la r\u00e9alisation d'un diagnostic sur une surface donn\u00e9e, SANS pr\u00e9cision du responsable scientifique, SANS pr\u00e9cision de l'op\u00e9rateur", + "available": true, + "intented_to": "O", + "code": "A_DIAG", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 de prescription de fouille", + "txt_idx": "excavation_order", + "comment": "Un arr\u00eat\u00e9 prescrivant la r\u00e9alisation d'une fouille pr\u00e9ventive sur une surface donn\u00e9e", + "available": true, + "intented_to": "O", + "code": "A_F_PREV", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse POSITIVE \u00e0 une demande d'AVIS", + "txt_idx": "pos_advice_reply", + "comment": "Suite \u00e0 une demande d'avis, les SRA \u00e9met un courrier signalant sa volont\u00e9 de prescrire un diagnostic ou une fouille sur l'emprise du projet en objet.", + "available": true, + "intented_to": "F", + "code": "AVIS_DIAG", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse RAS \u00e0 une demande d'AVIS", + "txt_idx": "neg_advice_reply", + "comment": "Suite \u00e0 une demande d'avis, les SRA \u00e9met un courrier signalant sa volont\u00e9 de NE PAS prescrire un diagnostic ou une fouille sur l'emprise du projet en objet.", + "available": true, + "intented_to": "F", + "code": "Art_12_RAS", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 d'autorisation de fouille pr\u00e9ventive", + "txt_idx": "excavation_autorization_order", + "comment": "Arr\u00eat\u00e9 qui donne l'autorisation \u00e0 un Am\u00e9nageur de faire ex\u00e9cuter par un Op\u00e9rateur agr\u00e9e sous la responsabilit\u00e9 d'un Responsable scientifique, une op\u00e9ration.", + "available": true, + "intented_to": "O", + "code": "AUT_F_PREV", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 d'autorisation de fouille programm\u00e9e", + "txt_idx": "prog_excav_autorization_order", + "comment": "Arr\u00eat\u00e9 donnant l'autorisation \u00e0 une responsable scientifique de fouiller sur un terrain donn\u00e9.", + "available": true, + "intented_to": "O", + "code": "AUT_F_PROG", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse NON prescription \u00e0 une saisine", + "txt_idx": "reply_no_prescription", + "comment": "Suite \u00e0 une Saisine (art.8), envoi d'une r\u00e9ponse de non prescription", + "available": true, + "intented_to": "F", + "code": "RAS", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 de d\u00e9signation de RS", + "txt_idx": "responsible_act", + "comment": "", + "available": true, + "intented_to": "O", + "code": "DESIGN_RS", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 de d\u00e9signation d'op\u00e9rateur", + "txt_idx": "operator_designation_act", + "comment": "D\u00e9signation de l'op\u00e9rateur pour un diagnostic : utile dans le cas o\u00f9 un service territorial ET l'INRAP sont en m\u00eame temps comp\u00e9tents pour un territoire donn\u00e9.", + "available": true, + "intented_to": "O", + "code": "DES_OPE", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 d'autorisation de prospection th\u00e9matique", + "txt_idx": "thematic_survey_act", + "comment": "", + "available": true, + "intented_to": "O", + "code": "", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 INITIAL (d\u00e9finissant les d\u00e9lais de saisine par tranches, Article R523-21)", + "txt_idx": "initial_act", + "comment": "Lorsque des op\u00e9rations sont r\u00e9alis\u00e9es par tranches successives, le calendrier pr\u00e9visionnel de leur r\u00e9alisation est communiqu\u00e9 au pr\u00e9fet de r\u00e9gion qui peut d\u00e9cider de prescrire les mesures pr\u00e9vues \u00e0 l'article R. 523-15 soit pour la totalit\u00e9 du projet, soit lors de l'ex\u00e9cution de chaque tranche. Dans ce dernier cas, il d\u00e9finit par arr\u00eat\u00e9 les d\u00e9lais de sa saisine et la nature des documents \u00e0 fournir.\r\nLes op\u00e9rations de diagnostic sont toutefois conduites pour l'ensemble du projet si la personne qui r\u00e9alise ce projet en fait la demande.\r\n", + "available": true, + "intented_to": "F", + "code": "A_INITIAL", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 modificatif", + "txt_idx": "modif_act_ope", + "comment": "Modification d'un autre arr\u00eat\u00e9 concernant une op\u00e9ration", + "available": true, + "intented_to": "O", + "code": "A_MODIF_SU", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 modificatif (Initial)", + "txt_idx": "modif_act_init", + "comment": "Modification d'un arr\u00eat\u00e9 d\u00e9finissant les d\u00e9lais de saisines (arr\u00eat\u00e9 initial)", + "available": true, + "intented_to": "F", + "code": "", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "AR : Accus\u00e9 de r\u00e9ception dossier", + "txt_idx": "a_receipt", + "comment": "Document attestant de la r\u00e9ception d'un dossier", + "available": true, + "intented_to": "F", + "code": "AR", + "indexed": false, + "associated_template": [ + [ + "accuse-de-reception-dun-dossier" + ] + ] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse POSITIVE \u00e0 une demande d'INFO", + "txt_idx": "info_pos", + "comment": "", + "available": true, + "intented_to": "F", + "code": "INFO", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse RAS \u00e0 une demande d'INFO", + "txt_idx": "info_ras", + "comment": "", + "available": true, + "intented_to": "F", + "code": "INFO_RAS", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 de sondage", + "txt_idx": "sondage_act", + "comment": "", + "available": true, + "intented_to": "O", + "code": "Arr_sond", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier d'accord sur PSTI DIAG", + "txt_idx": "ok_project_diag", + "comment": "", + "available": true, + "intented_to": "O", + "code": "C_PSTI_OK", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier am\u00e9nageur transmission rapport", + "txt_idx": "contractor_post_ope_mail", + "comment": "", + "available": true, + "intented_to": "O", + "code": "RAP_Amenag", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier am\u00e9nageur lib\u00e9ration TOTALE terrain post DIAG", + "txt_idx": "RAS_Post_DIAG", + "comment": "", + "available": true, + "intented_to": "O", + "code": "RAS_DIAG", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier am\u00e9nageur lib\u00e9ration TOTALE terrain post FOUILLE", + "txt_idx": "free_field", + "comment": "", + "available": true, + "intented_to": "O", + "code": "Lib_Terr", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 d'abrogation de DIAG", + "txt_idx": "cancel_act", + "comment": "", + "available": true, + "intented_to": "O", + "code": "ABROG", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse RAS \u00e0 un CU", + "txt_idx": "CU_ok", + "comment": "", + "available": true, + "intented_to": "F", + "code": "CU_RAS", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse POSITIVE \u00e0 un CU", + "txt_idx": "pos_CU", + "comment": "", + "available": true, + "intented_to": "F", + "code": "CU_POSITIF", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 modificatif de la consistance du projet", + "txt_idx": "project_modif_act", + "comment": "", + "available": true, + "intented_to": "O", + "code": "A_MODIF_PR", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 de zonage arch\u00e9ologqiue", + "txt_idx": "archaeological_zoning", + "comment": "", + "available": true, + "intented_to": "F", + "code": "ZONAGE", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier am\u00e9nageur Diagnostic", + "txt_idx": "mail_diag", + "comment": "Courrier qui accompagne l'arr\u00eat\u00e9 de diagnostic envoy\u00e9 \u00e0 l'am\u00e9nageur", + "available": true, + "intented_to": "O", + "code": "COUR_DIAG", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Arr\u00eat\u00e9 d'autorisation de prospection inventaire", + "txt_idx": "general_survey_act", + "comment": "", + "available": true, + "intented_to": "O", + "code": "PI", + "indexed": true, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier diag existe deja S_Instructeur", + "txt_idx": "diag_already", + "comment": "", + "available": true, + "intented_to": "F", + "code": "DIAG_EXIST", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier diag existe deja AMENAGEUR", + "txt_idx": "diag_already_land", + "comment": "", + "available": true, + "intented_to": "F", + "code": "DIAG_dejaA", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier am\u00e9nageur Prescription de Fouille", + "txt_idx": "land_plan_excavation_mail", + "comment": "", + "available": true, + "intented_to": "O", + "code": "C_Am_FOUIL", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier Service Instructeur DIAG", + "txt_idx": "town_planning_diag_mail", + "comment": "", + "available": true, + "intented_to": "O", + "code": "C_SI_DIAG", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier COLL TERR DIAG", + "txt_idx": "terr_service_diag_mail", + "comment": "", + "available": true, + "intented_to": "O", + "code": "C_COLL_TER", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier INTENTION de prescrire une FOUILLE", + "txt_idx": "excavation_mail", + "comment": "Courrier \u00e0 l'am\u00e9nageur lui indiquant l'intention de prescrire une fouille directement sur un Dossier", + "available": true, + "intented_to": "F", + "code": "C_INT_pres", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier Service Instructeur FOUILLE DIRECTE", + "txt_idx": "mail_excavation_urbanism", + "comment": "", + "available": true, + "intented_to": "O", + "code": "C_SI_Fouil", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier am\u00e9nageur lib\u00e9ration PARTIELLE terrain post DIAG", + "txt_idx": "part_free_diag", + "comment": "Suite \u00e0 une demande de l'am\u00e9nageur, si une partie des terrains ne contient pas de vestiges, il est possible de faire une lib\u00e9ration partielle.", + "available": true, + "intented_to": "O", + "code": "LIB_PART", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "PV CR de Visite", + "txt_idx": "PV_CR", + "comment": "PV relatant une visite particuli\u00e8re de contr\u00f4le du SRA lors d'une op\u00e9ration d'arch\u00e9ologie", + "available": true, + "intented_to": "O", + "code": "PV_CR", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse POSITIVE \u00e0 une demande d'AVIS (demande de complements)", + "txt_idx": "pas_advice_reply_bis", + "comment": "Suite \u00e0 une demande d'avis, les SRA \u00e9met un courrier signalant sa volont\u00e9 de prescrire un diagnostic ou une fouille sur l'emprise du projet en objet.", + "available": true, + "intented_to": "F", + "code": "AVIS_DIAG2", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier demande Modif PSTI", + "txt_idx": "modif_project", + "comment": "", + "available": true, + "intented_to": "O", + "code": "MODIF_PSTI", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier am\u00e9nageur demande de confirmation de projet ", + "txt_idx": "mail_confirm", + "comment": "(Art. R523-19 du code du patrimoine)\r\n\r\nLe pr\u00e9fet de r\u00e9gion dispose d'un d\u00e9lai de trois mois \u00e0 compter de la r\u00e9ception du rapport de diagnostic complet pour notifier le contenu des prescriptions post\u00e9rieures au diagnostic.\r\nLa date de r\u00e9ception du rapport de diagnostic complet est notifi\u00e9e par le pr\u00e9fet de r\u00e9gion \u00e0 l'autorit\u00e9 qui instruit la demande d'autorisation et \u00e0 l'am\u00e9nageur.\r\nDans le cas o\u00f9 le diagnostic a d\u00e9j\u00e0 \u00e9t\u00e9 r\u00e9alis\u00e9 en application de l'article R. 523-14, le d\u00e9lai de trois mois court \u00e0 compter de la r\u00e9ception du dossier par le pr\u00e9fet de r\u00e9gion dans les conditions pr\u00e9vues aux articles R. 523-9 et R. 523-10 ou de la confirmation par l'am\u00e9nageur de son intention de r\u00e9aliser les am\u00e9nagements, ouvrages ou travaux projet\u00e9s.\r\nA d\u00e9faut de notification dans ce d\u00e9lai, le pr\u00e9fet de r\u00e9gion est r\u00e9put\u00e9 avoir renonc\u00e9 \u00e0 \u00e9dicter de telles prescriptions.", + "available": true, + "intented_to": "O", + "code": "CONFIRM", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "BE DAPA Rapport DIAG", + "txt_idx": "report_post", + "comment": "", + "available": true, + "intented_to": "O", + "code": "DAPA_DIAG", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "BE Mairie Rapport DIAG", + "txt_idx": "post_report_town", + "comment": "", + "available": true, + "intented_to": "O", + "code": "BE_MAIRIE", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "BE INRAP Rapport Diag autre Op\u00e9rateur", + "txt_idx": "post_report_inrap", + "comment": "", + "available": true, + "intented_to": "O", + "code": "INRAP_RAP", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Courrier Op\u00e9rateur Rapport NON conforme", + "txt_idx": "bad_report", + "comment": "", + "available": true, + "intented_to": "O", + "code": "REFUS_RAPP", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "AR : Rapport DIAG Op\u00e9rateur", + "txt_idx": "AR_operator", + "comment": "", + "available": true, + "intented_to": "O", + "code": "AR_OPER", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "AR : Rapport FOUILLE Op\u00e9rateur", + "txt_idx": "ar_report_excavation", + "comment": "", + "available": true, + "intented_to": "O", + "code": "AR_FOUILLE", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "FICHE R\u00e9ception et transmission des rapports d\u2019op\u00e9ration", + "txt_idx": "OPE_sheetfile", + "comment": "", + "available": true, + "intented_to": "O", + "code": "FICHE_OPE", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse POSITIVE \u00e0 une demande d'AVIS sur \u00e9tude pr\u00e9alable et diagnostic architectural (MH)", + "txt_idx": "pos_advice_mh", + "comment": "", + "available": true, + "intented_to": "F", + "code": "AVIS_POS_M", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "R\u00e9ponse RAS \u00e0 une demande d'AVIS sur \u00e9tude pr\u00e9alable et diagnostic architectural (MH)", + "txt_idx": "neg_advice_MH", + "comment": "", + "available": true, + "intented_to": "F", + "code": "AVIS_RAS_M", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "AR : demande de pr\u00eat", + "txt_idx": "loan_demand_receipt", + "comment": "", + "available": true, + "intented_to": "TF", + "code": "AR_demande", + "indexed": false, + "associated_template": [] + } +}, +{ + "model": "archaeological_operations.acttype", + "fields": { + "label": "Constat d'\u00e9tat", + "txt_idx": "observation_status", + "comment": "", + "available": true, + "intented_to": "T", + "code": "", + "indexed": false, + "associated_template": [ + [ + "document-de-reference" + ] + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Pal\u00e9olithique", + "txt_idx": "paleolithic", + "comment": "", + "available": true, + "order": 8000, + "start_date": -450000, + "end_date": -10000, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Pal\u00e9olithique ancien", + "txt_idx": "ancien_paleolithic", + "comment": "1100, 'Pal\u00e9olithique ancien', , )", + "available": true, + "order": 8900, + "start_date": -450000, + "end_date": -150000, + "parent": [ + "paleolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Pal\u00e9olithique moyen", + "txt_idx": "middle_paleolithic", + "comment": "1200, '', , ),", + "available": true, + "order": 8800, + "start_date": -150000, + "end_date": -35000, + "parent": [ + "paleolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Pal\u00e9olithique sup\u00e9rieur", + "txt_idx": "late_paleolithic", + "comment": "", + "available": true, + "order": 8700, + "start_date": -35000, + "end_date": -12000, + "parent": [ + "paleolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Pal\u00e9olithique sup\u00e9rieur final", + "txt_idx": "final_paleolithic", + "comment": "", + "available": true, + "order": 8600, + "start_date": -12000, + "end_date": -10000, + "parent": [ + "paleolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "M\u00e9solithique", + "txt_idx": "mesolithic", + "comment": "", + "available": true, + "order": 7000, + "start_date": -10000, + "end_date": -5000, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "M\u00e9solithique ancien", + "txt_idx": "old_mesolithic", + "comment": "", + "available": true, + "order": 7900, + "start_date": -10000, + "end_date": -7000, + "parent": [ + "mesolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "M\u00e9solithique moyen", + "txt_idx": "middle_mesolithic", + "comment": "", + "available": false, + "order": 7800, + "start_date": -8000, + "end_date": -7000, + "parent": [ + "mesolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "M\u00e9solithique r\u00e9cent", + "txt_idx": "recent_mesolithic", + "comment": "", + "available": true, + "order": 7700, + "start_date": -7000, + "end_date": -5000, + "parent": [ + "mesolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "N\u00e9olithique", + "txt_idx": "neolithic", + "comment": "", + "available": true, + "order": 6000, + "start_date": -5500, + "end_date": -2000, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "N\u00e9olithique ancien", + "txt_idx": "old_neolithic", + "comment": "", + "available": true, + "order": 6900, + "start_date": -5500, + "end_date": -4500, + "parent": [ + "neolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "N\u00e9olithique moyen", + "txt_idx": "middle_neolithic", + "comment": "", + "available": true, + "order": 6800, + "start_date": -4500, + "end_date": -3200, + "parent": [ + "neolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "N\u00e9olithique r\u00e9cent", + "txt_idx": "recent_neolithic", + "comment": "", + "available": true, + "order": 6700, + "start_date": -3200, + "end_date": -2500, + "parent": [ + "neolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "N\u00e9olithique final", + "txt_idx": "final_neolithic", + "comment": "", + "available": true, + "order": 6600, + "start_date": -2800, + "end_date": -2000, + "parent": [ + "neolithic" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Protohistoire", + "txt_idx": "protohistory", + "comment": "", + "available": true, + "order": 5000, + "start_date": -2000, + "end_date": -40, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c2ge du Bronze", + "txt_idx": "bronze_age", + "comment": "", + "available": true, + "order": 5900, + "start_date": -2000, + "end_date": -750, + "parent": [ + "protohistory" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c2ge du Fer", + "txt_idx": "iron_age", + "comment": "", + "available": true, + "order": 5800, + "start_date": -800, + "end_date": -40, + "parent": [ + "protohistory" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c2ge du Bronze ancien", + "txt_idx": "old_bronze_age", + "comment": "", + "available": true, + "order": 5890, + "start_date": -2000, + "end_date": -1600, + "parent": [ + "bronze_age" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c2ge du Bronze moyen", + "txt_idx": "middle_bronze_age", + "comment": "", + "available": true, + "order": 5880, + "start_date": -1600, + "end_date": -1200, + "parent": [ + "bronze_age" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c2ge du Bronze final", + "txt_idx": "final_bronze_age", + "comment": "", + "available": true, + "order": 5870, + "start_date": -1200, + "end_date": -750, + "parent": [ + "bronze_age" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Premier \u00c2ge du Fer", + "txt_idx": "first_iron_age", + "comment": "", + "available": true, + "order": 5790, + "start_date": -800, + "end_date": -450, + "parent": [ + "iron_age" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Deuxi\u00e8me \u00c2ge du Fer", + "txt_idx": "second_iron_age", + "comment": "", + "available": true, + "order": 5780, + "start_date": -500, + "end_date": -40, + "parent": [ + "iron_age" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Gallo-romain", + "txt_idx": "gallo-roman", + "comment": "", + "available": true, + "order": 4000, + "start_date": -40, + "end_date": 476, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "R\u00e9publique", + "txt_idx": "republic", + "comment": "", + "available": true, + "order": 4900, + "start_date": -40, + "end_date": -27, + "parent": [ + "gallo-roman" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Haut Empire", + "txt_idx": "high-empire", + "comment": "", + "available": true, + "order": 4800, + "start_date": -27, + "end_date": 192, + "parent": [ + "gallo-roman" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Bas Empire", + "txt_idx": "low_empire", + "comment": "", + "available": true, + "order": 4700, + "start_date": 192, + "end_date": 476, + "parent": [ + "gallo-roman" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Moyen \u00c2ge", + "txt_idx": "middle_age", + "comment": "", + "available": true, + "order": 3000, + "start_date": 476, + "end_date": 1492, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Haut Moyen \u00c2ge", + "txt_idx": "high_middle_age", + "comment": "", + "available": true, + "order": 3900, + "start_date": 476, + "end_date": 987, + "parent": [ + "middle_age" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Moyen \u00c2ge classique", + "txt_idx": "classic_middle_age", + "comment": "", + "available": true, + "order": 3800, + "start_date": 987, + "end_date": 1204, + "parent": [ + "middle_age" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Bas Moyen \u00c2ge", + "txt_idx": "low_middle_age", + "comment": "", + "available": true, + "order": 3700, + "start_date": 1204, + "end_date": 1492, + "parent": [ + "middle_age" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "P\u00e9riode r\u00e9cente", + "txt_idx": "recent_times", + "comment": "", + "available": true, + "order": 2000, + "start_date": 1492, + "end_date": 2016, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c9poque moderne", + "txt_idx": "modern", + "comment": "", + "available": true, + "order": 2900, + "start_date": 1492, + "end_date": 1815, + "parent": [ + "recent_times" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c9poque contemporaine", + "txt_idx": "contemporan", + "comment": "", + "available": true, + "order": 2800, + "start_date": 1815, + "end_date": 2016, + "parent": [ + "recent_times" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c9poque ind\u00e9termin\u00e9e", + "txt_idx": "indetermined", + "comment": "", + "available": true, + "order": 1000, + "start_date": 0, + "end_date": 0, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Non-renseign\u00e9", + "txt_idx": "not_yet_documented", + "comment": "", + "available": true, + "order": 0, + "start_date": 0, + "end_date": 0, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Am\u00e9rindien", + "txt_idx": "amerindian", + "comment": "", + "available": true, + "order": 1, + "start_date": 0, + "end_date": 0, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "M\u00e9diterran\u00e9en", + "txt_idx": "mediterranean", + "comment": "", + "available": true, + "order": 1, + "start_date": 500, + "end_date": -500, + "parent": null + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Antiquit\u00e9 m\u00e9diterran\u00e9enne", + "txt_idx": "mediterranean_antiq", + "comment": "", + "available": true, + "order": 1, + "start_date": 0, + "end_date": 0, + "parent": [ + "mediterranean" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Antiquit\u00e9 tardive (M\u00e9d.)", + "txt_idx": "late_antiq_med", + "comment": "", + "available": true, + "order": 1, + "start_date": 0, + "end_date": 0, + "parent": [ + "mediterranean_antiq" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c9poque archa\u00efque", + "txt_idx": "archaic_epoc", + "comment": "", + "available": true, + "order": 2, + "start_date": 0, + "end_date": 0, + "parent": [ + "mediterranean_antiq" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Bas-Empire (M\u00e9d.)", + "txt_idx": "lower_empire_med", + "comment": "", + "available": true, + "order": 3, + "start_date": 0, + "end_date": 0, + "parent": [ + "mediterranean_antiq" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c9poque classique", + "txt_idx": "classic_epoc", + "comment": "", + "available": true, + "order": 4, + "start_date": 0, + "end_date": 0, + "parent": [ + "mediterranean_antiq" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "\u00c9poque hell\u00e9nistique", + "txt_idx": "hellen_epoc", + "comment": "", + "available": true, + "order": 5, + "start_date": 0, + "end_date": 0, + "parent": [ + "mediterranean_antiq" + ] + } +}, +{ + "model": "archaeological_operations.period", + "fields": { + "label": "Haut-Empire (M\u00e9d.)", + "txt_idx": "upper_empire", + "comment": "", + "available": true, + "order": 6, + "start_date": 0, + "end_date": 0, + "parent": [ + "mediterranean_antiq" + ] + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "villa", + "txt_idx": "villa", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "enclos", + "txt_idx": "enclosure", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "\u00e9glise", + "txt_idx": "church", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cairn", + "txt_idx": "cairn", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "foss\u00e9", + "txt_idx": "ditch", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "ch\u00e2teau", + "txt_idx": "castle", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "motte castrale", + "txt_idx": "motte-castrale", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "menhir", + "txt_idx": "menhir", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "aile", + "txt_idx": "aile", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "aire de battage", + "txt_idx": "aire-de-battage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "amas", + "txt_idx": "amas", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "amas coquillier", + "txt_idx": "amas-coquillier", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "amas de d\u00e9bitage", + "txt_idx": "amas-de-debitage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "am\u00e9nagement ind\u00e9termin\u00e9", + "txt_idx": "amenagement-indetermine", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "anomalie", + "txt_idx": "anomalie", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "arc", + "txt_idx": "arc", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "arcasse", + "txt_idx": "arcasse", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "arche", + "txt_idx": "arche", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "aula", + "txt_idx": "aula", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "autel", + "txt_idx": "autel", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "banquette", + "txt_idx": "banquette", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "barbacane", + "txt_idx": "barbacane", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "barrot", + "txt_idx": "barrot", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "basse-cour", + "txt_idx": "basse-cour", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "bassin", + "txt_idx": "bassin", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "bastion", + "txt_idx": "bastion", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "b\u00e2timent", + "txt_idx": "batiment", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "bloc", + "txt_idx": "bloc", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "bloc orn\u00e9", + "txt_idx": "bloc-orne", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "bloc ouvrag\u00e9", + "txt_idx": "bloc-ouvrage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "boisage", + "txt_idx": "boisage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "boniferie", + "txt_idx": "boniferie", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "bord\u00e9", + "txt_idx": "borde", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "bord\u00e9 \u00e0 clin", + "txt_idx": "borde-a-clin", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "bord\u00e9 \u00e0 franc-bord", + "txt_idx": "borde-a-franc-bord", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "borne", + "txt_idx": "borne", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "butte", + "txt_idx": "butte", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "calage", + "txt_idx": "calage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "calfatage", + "txt_idx": "calfatage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "calvaire", + "txt_idx": "calvaire", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "canalisation", + "txt_idx": "canalisation", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cargaison", + "txt_idx": "cargaison", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cave", + "txt_idx": "cave", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cercueil", + "txt_idx": "cercueil", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "charpente", + "txt_idx": "charpente", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "clo\u00eetre", + "txt_idx": "cloitre", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cockpit", + "txt_idx": "cockpit", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "colonnade", + "txt_idx": "colonnade", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "colonne (\u00e9l\u00e9ment de)", + "txt_idx": "colonne-element-de", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "construction", + "txt_idx": "construction", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "coque", + "txt_idx": "coque", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "coque bord\u00e9-premier", + "txt_idx": "coque-borde-premier", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "coque membrure-premi\u00e8re", + "txt_idx": "coque-membrure-premiere", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "couple", + "txt_idx": "couple", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cour", + "txt_idx": "cour", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "courtine", + "txt_idx": "courtine", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "croix", + "txt_idx": "croix", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "crypte", + "txt_idx": "crypte", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cryptoportique", + "txt_idx": "cryptoportique", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cuve", + "txt_idx": "cuve", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "cuvelage", + "txt_idx": "cuvelage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "dallage", + "txt_idx": "dallage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "demi-lune", + "txt_idx": "demi-lune", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "d\u00e9potoir", + "txt_idx": "depotoir", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "d\u00e9rive", + "txt_idx": "derive", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "doublage", + "txt_idx": "doublage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "empierrement", + "txt_idx": "empierrement", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "emplanture", + "txt_idx": "emplanture", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "empreinte", + "txt_idx": "empreinte", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "enclos", + "txt_idx": "enclos", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "enclos (syst\u00e8me d')", + "txt_idx": "enclos-systeme-d", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "entr\u00e9e am\u00e9nag\u00e9e", + "txt_idx": "entree-amenagee", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "escalier", + "txt_idx": "escalier", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "\u00e9tambot", + "txt_idx": "etambot", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "\u00e9trave", + "txt_idx": "etrave", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "\u00e9trave \u00e0 \u00e9peron", + "txt_idx": "etrave-a-eperon", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "\u00e9tuve", + "txt_idx": "etuve", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "ferrier", + "txt_idx": "ferrier", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "fondation", + "txt_idx": "fondation", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "fosse", + "txt_idx": "fosse", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "foss\u00e9s (r\u00e9seau de)", + "txt_idx": "fosses-reseau-de", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "four", + "txt_idx": "four", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "foyer", + "txt_idx": "foyer", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "foyer (vidange de)", + "txt_idx": "foyer-vidange-de", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "front de taille", + "txt_idx": "front-de-taille", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "fuselage", + "txt_idx": "fuselage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "galerie", + "txt_idx": "galerie", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "garenne", + "txt_idx": "garenne", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "glaci\u00e8re", + "txt_idx": "glaciere", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "gouvernail", + "txt_idx": "gouvernail", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "gradins", + "txt_idx": "gradins", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "grange", + "txt_idx": "grange", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "grenier", + "txt_idx": "grenier", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "h\u00e9lice", + "txt_idx": "helice", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "hypocauste", + "txt_idx": "hypocauste", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "incin\u00e9ration", + "txt_idx": "incineration", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "inhumation", + "txt_idx": "inhumation", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "inscription", + "txt_idx": "inscription", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "jardin", + "txt_idx": "jardin", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "laraire", + "txt_idx": "laraire", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "latrines", + "txt_idx": "latrines", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "lest", + "txt_idx": "lest", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "lev\u00e9e", + "txt_idx": "levee", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "m\u00e2t", + "txt_idx": "mat", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "membrure", + "txt_idx": "membrure", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "meule fixe", + "txt_idx": "meule-fixe", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "mosa\u00efque", + "txt_idx": "mosaique", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "moteur", + "txt_idx": "moteur", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "moule \u00e0 cloches", + "txt_idx": "moule-a-cloches", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "mur", + "txt_idx": "mur", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "niche", + "txt_idx": "niche", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "niveau d'occupation", + "txt_idx": "niveau-doccupation", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "oratoire", + "txt_idx": "oratoire", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "orni\u00e8re", + "txt_idx": "orniere", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "ouvrage avanc\u00e9", + "txt_idx": "ouvrage-avance", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "palissade", + "txt_idx": "palissade", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "paroi orn\u00e9e", + "txt_idx": "paroi-ornee", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "pavage", + "txt_idx": "pavage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "pieu", + "txt_idx": "pieu", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "pigeonnier", + "txt_idx": "pigeonnier", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "pile", + "txt_idx": "pile", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "plafond", + "txt_idx": "plafond", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "plancher", + "txt_idx": "plancher", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "polissoir fixe", + "txt_idx": "polissoir-fixe", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "pont de bateau", + "txt_idx": "pont-de-bateau", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "porte", + "txt_idx": "porte", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "portique", + "txt_idx": "portique", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "pr\u00e9ceinte", + "txt_idx": "preceinte", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "pressoir", + "txt_idx": "pressoir", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "puits", + "txt_idx": "puits", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "purgerie", + "txt_idx": "purgerie", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "quille", + "txt_idx": "quille", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "r\u00e9cipient fixe", + "txt_idx": "recipient-fixe", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "rempart", + "txt_idx": "rempart", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "sarcophage", + "txt_idx": "sarcophage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "silo", + "txt_idx": "silo", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "sol d'occupation", + "txt_idx": "sol-doccupation", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "sol orn\u00e9", + "txt_idx": "sol-orne", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "source am\u00e9nag\u00e9e", + "txt_idx": "source-amenagee", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "souterrain", + "txt_idx": "souterrain", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "statue", + "txt_idx": "statue", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "statue-menhir", + "txt_idx": "statue-menhir", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "st\u00e8le", + "txt_idx": "stele", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "talus", + "txt_idx": "talus", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "tour", + "txt_idx": "tour", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "trace agraire", + "txt_idx": "trace-agraire", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "train d'atterrissage", + "txt_idx": "train-datterrissage", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "tranch\u00e9e d'extraction", + "txt_idx": "tranchee-dextraction", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "trou de jauge", + "txt_idx": "trou-de-jauge", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "trou de poteau", + "txt_idx": "trou-de-poteau", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "trous de poteau (ensemble de)", + "txt_idx": "trous-de-poteau-ensemble-de", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "tunnel", + "txt_idx": "tunnel", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "urne", + "txt_idx": "urne", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "vaigre", + "txt_idx": "vaigre", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "verri\u00e8re", + "txt_idx": "verriere", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "virure", + "txt_idx": "virure", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.remaintype", + "fields": { + "label": "zone de rejet", + "txt_idx": "zone-de-rejet", + "comment": null, + "available": true + } +}, +{ + "model": "archaeological_operations.reportstate", + "fields": { + "label": "Re\u00e7u et non d\u00e9pouill\u00e9", + "txt_idx": "received", + "comment": "Le rapport a \u00e9t\u00e9 re\u00e7u mais n'est pas encore d\u00e9pouill\u00e9.", + "available": true, + "order": 2 + } +}, +{ + "model": "archaeological_operations.reportstate", + "fields": { + "label": "Non re\u00e7u", + "txt_idx": "not_received", + "comment": "Ce rapport n'a pas encore \u00e9t\u00e9 re\u00e7u.", + "available": true, + "order": 1 + } +}, +{ + "model": "archaeological_operations.reportstate", + "fields": { + "label": "Rapport inexistant", + "txt_idx": "no-report", + "comment": "Il n'existe pas de rapport pour cette op\u00e9ration.", + "available": true, + "order": 7 + } +}, +{ + "model": "archaeological_operations.reportstate", + "fields": { + "label": "Re\u00e7us et non d\u00e9pouill\u00e9s", + "txt_idx": "received__not_processed", + "comment": "Plusieurs rapports ont \u00e9t\u00e9 re\u00e7us mais ne sont pas encore d\u00e9pouill\u00e9s.", + "available": true, + "order": 3 + } +}, +{ + "model": "archaeological_operations.reportstate", + "fields": { + "label": "Re\u00e7us et d\u00e9pouill\u00e9s", + "txt_idx": "received_and_processed", + "comment": "Tous les rapports ont \u00e9t\u00e9 re\u00e7us mais n'ont pas \u00e9t\u00e9 encore d\u00e9pouill\u00e9s.", + "available": true, + "order": 6 + } +}, +{ + "model": "archaeological_operations.reportstate", + "fields": { + "label": "Re\u00e7u et d\u00e9pouill\u00e9", + "txt_idx": "one_report_received_and_processed", + "comment": "Le rapport (unique) a \u00e9t\u00e9 re\u00e7u et d\u00e9pouill\u00e9.", + "available": true, + "order": 5 + } +}, +{ + "model": "archaeological_operations.reportstate", + "fields": { + "label": "Re\u00e7us, partiellement d\u00e9pouill\u00e9s", + "txt_idx": "reports_received_partially_processed", + "comment": "Plusieurs rapports ont \u00e9t\u00e9 re\u00e7us mais ne sont que partiellement d\u00e9pouill\u00e9s.", + "available": true, + "order": 4 + } +} +] diff --git a/archaeological_operations/fixtures/initial_data_relation_type-fr.json b/archaeological_operations/fixtures/initial_data_relation_type-fr.json new file mode 100644 index 000000000..df507309e --- /dev/null +++ b/archaeological_operations/fixtures/initial_data_relation_type-fr.json @@ -0,0 +1,45 @@ +[ +{ + "model": "archaeological_operations.relationtype", + "fields": { + "label": "Comprend", + "txt_idx": "has_got", + "comment": "", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": null, + "inverse_relation": [ + "is_in" + ] + } +}, +{ + "model": "archaeological_operations.relationtype", + "fields": { + "label": "Comprise dans", + "txt_idx": "is_in", + "comment": "", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "has_got" + ] + } +}, +{ + "model": "archaeological_operations.relationtype", + "fields": { + "label": "Relation diffuse", + "txt_idx": "fuzzy_relation", + "comment": "", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": "", + "inverse_relation": null + } +} +] diff --git a/archaeological_operations/fixtures/initial_data_relation_type_norel-fr.json b/archaeological_operations/fixtures/initial_data_relation_type_norel-fr.json new file mode 100644 index 000000000..ccc780f9a --- /dev/null +++ b/archaeological_operations/fixtures/initial_data_relation_type_norel-fr.json @@ -0,0 +1,41 @@ +[ +{ + "model": "archaeological_operations.relationtype", + "fields": { + "label": "Comprend", + "txt_idx": "has_got", + "comment": "", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": null, + "inverse_relation": null + } +}, +{ + "model": "archaeological_operations.relationtype", + "fields": { + "label": "Comprise dans", + "txt_idx": "is_in", + "comment": "", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_operations.relationtype", + "fields": { + "label": "Relation diffuse", + "txt_idx": "fuzzy_relation", + "comment": "", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": "", + "inverse_relation": null + } +} +] diff --git a/archaeological_operations/fixtures/periods-fr.json b/archaeological_operations/fixtures/periods-fr.json deleted file mode 100644 index 1346cfbba..000000000 --- a/archaeological_operations/fixtures/periods-fr.json +++ /dev/null @@ -1,492 +0,0 @@ -[ - { - "pk": 35, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 0, - "order": 0, - "label": "Non-renseign\u00e9", - "start_date": 0, - "txt_idx": "not_yet_documented" - } - }, - { - "pk": 34, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 0, - "order": 1000, - "label": "\u00c9poque ind\u00e9termin\u00e9e", - "start_date": 0, - "txt_idx": "indetermined" - } - }, - { - "pk": 31, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 2011, - "order": 2000, - "label": "P\u00e9riode r\u00e9cente", - "start_date": 1492, - "txt_idx": "recent_times" - } - }, - { - "pk": 33, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 31, - "end_date": 2011, - "order": 2800, - "label": "\u00c9poque contemporaine", - "start_date": 1815, - "txt_idx": "contemporan" - } - }, - { - "pk": 32, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 31, - "end_date": 1815, - "order": 2900, - "label": "\u00c9poque moderne", - "start_date": 1492, - "txt_idx": "modern" - } - }, - { - "pk": 27, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 1492, - "order": 3000, - "label": "Moyen-\u00e2ge", - "start_date": 476, - "txt_idx": "middle_age" - } - }, - { - "pk": 30, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 27, - "end_date": 1492, - "order": 3700, - "label": "Bas moyen-\u00e2ge", - "start_date": 1204, - "txt_idx": "low_middle_age" - } - }, - { - "pk": 29, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 27, - "end_date": 1204, - "order": 3800, - "label": "Moyen-\u00e2ge classique", - "start_date": 987, - "txt_idx": "classic_middle_age" - } - }, - { - "pk": 28, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 27, - "end_date": 987, - "order": 3900, - "label": "Haut moyen-\u00e2ge", - "start_date": 476, - "txt_idx": "high_middle_age" - } - }, - { - "pk": 23, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": 476, - "order": 4000, - "label": "Gallo-romain", - "start_date": -40, - "txt_idx": "gallo-roman" - } - }, - { - "pk": 26, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 23, - "end_date": 476, - "order": 4700, - "label": "Bas-empire", - "start_date": 192, - "txt_idx": "low_empire" - } - }, - { - "pk": 25, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 23, - "end_date": 192, - "order": 4800, - "label": "Haut-empire", - "start_date": -27, - "txt_idx": "high-empire" - } - }, - { - "pk": 24, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 23, - "end_date": -27, - "order": 4900, - "label": "R\u00e9publique", - "start_date": -40, - "txt_idx": "republic" - } - }, - { - "pk": 15, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -40, - "order": 5000, - "label": "Protohistoire", - "start_date": -2000, - "txt_idx": "protohistory" - } - }, - { - "pk": 22, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 17, - "end_date": -40, - "order": 5780, - "label": "Deuxi\u00e8me \u00c2ge du Fer", - "start_date": -500, - "txt_idx": "second_iron_age" - } - }, - { - "pk": 21, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 17, - "end_date": -450, - "order": 5790, - "label": "Premier \u00c2ge du Fer", - "start_date": -800, - "txt_idx": "first_iron_age" - } - }, - { - "pk": 17, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 15, - "end_date": -40, - "order": 5800, - "label": "\u00c2ge du Fer", - "start_date": -800, - "txt_idx": "iron_age" - } - }, - { - "pk": 20, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 16, - "end_date": -750, - "order": 5870, - "label": "\u00c2ge du Bronze final", - "start_date": -1200, - "txt_idx": "final_bronze_age" - } - }, - { - "pk": 19, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 16, - "end_date": -1200, - "order": 5880, - "label": "\u00c2ge du Bronze moyen", - "start_date": -1600, - "txt_idx": "middle_bronze_age" - } - }, - { - "pk": 18, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 16, - "end_date": -1600, - "order": 5890, - "label": "\u00c2ge du Bronze ancien", - "start_date": -2000, - "txt_idx": "old_bronze_age" - } - }, - { - "pk": 16, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 15, - "end_date": -750, - "order": 5900, - "label": "\u00c2ge du Bronze", - "start_date": -2000, - "txt_idx": "bronze_age" - } - }, - { - "pk": 10, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -2000, - "order": 6000, - "label": "N\u00e9olithique", - "start_date": -5500, - "txt_idx": "neolithic" - } - }, - { - "pk": 14, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 10, - "end_date": -2000, - "order": 6600, - "label": "N\u00e9olithique final", - "start_date": -2800, - "txt_idx": "final_neolithic" - } - }, - { - "pk": 13, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 10, - "end_date": -2500, - "order": 6700, - "label": "N\u00e9olithique r\u00e9cent", - "start_date": -3200, - "txt_idx": "recent_neolithic" - } - }, - { - "pk": 12, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 10, - "end_date": -300, - "order": 6800, - "label": "N\u00e9olithique moyen", - "start_date": -4500, - "txt_idx": "middle_neolithic" - } - }, - { - "pk": 11, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 10, - "end_date": -4500, - "order": 6900, - "label": "N\u00e9olithique ancien", - "start_date": -5500, - "txt_idx": "old_neolithic" - } - }, - { - "pk": 6, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -5000, - "order": 7000, - "label": "M\u00e9solithique", - "start_date": -10000, - "txt_idx": "mesolithic" - } - }, - { - "pk": 9, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 6, - "end_date": -5000, - "order": 7700, - "label": "M\u00e9solithique r\u00e9cent", - "start_date": -7000, - "txt_idx": "recent_mesolithic" - } - }, - { - "pk": 8, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": false, - "parent": 6, - "end_date": 0, - "order": 7800, - "label": "M\u00e9solithique moyen", - "start_date": 0, - "txt_idx": "middle_mesolithic" - } - }, - { - "pk": 7, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 6, - "end_date": -7000, - "order": 7900, - "label": "M\u00e9solithique ancien", - "start_date": -10000, - "txt_idx": "old_mesolithic" - } - }, - { - "pk": 1, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": null, - "end_date": -10000, - "order": 8000, - "label": "Pal\u00e9olithique", - "start_date": -450000, - "txt_idx": "paleolithic" - } - }, - { - "pk": 5, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 1, - "end_date": -10000, - "order": 8600, - "label": "Pal\u00e9olithique sup\u00e9rieur final", - "start_date": -12000, - "txt_idx": "final_paleolithic" - } - }, - { - "pk": 4, - "model": "archaeological_operations.period", - "fields": { - "comment": "", - "available": true, - "parent": 1, - "end_date": -12000, - "order": 8700, - "label": "Pal\u00e9olithique sup\u00e9rieur", - "start_date": -35000, - "txt_idx": "late_paleolithic" - } - }, - { - "pk": 3, - "model": "archaeological_operations.period", - "fields": { - "comment": "1200, '', , ),", - "available": true, - "parent": 1, - "end_date": -35000, - "order": 8800, - "label": "Pal\u00e9olithique moyen", - "start_date": -150000, - "txt_idx": "middle_paleolithic" - } - }, - { - "pk": 2, - "model": "archaeological_operations.period", - "fields": { - "comment": "1100, 'Pal\u00e9olithique ancien', , )", - "available": true, - "parent": 1, - "end_date": -150000, - "order": 8900, - "label": "Pal\u00e9olithique ancien", - "start_date": -450000, - "txt_idx": "ancien_paleolithic" - } - } -] diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index e3e287d24..651cd740f 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -20,6 +20,7 @@ """ Operations forms definitions """ +from collections import OrderedDict import datetime from itertools import groupby @@ -104,7 +105,7 @@ class ParcelForm(forms.Form): prefix_value = kwargs['prefix'] + '-town' if not [k for k in kwargs['data'].keys() if k.startswith(prefix_value) and kwargs['data'][k]]: - kwargs['data'] = None + kwargs['data'] = {} if 'files' in kwargs: kwargs.pop('files') super(ParcelForm, self).__init__(*args, **kwargs) @@ -259,8 +260,8 @@ class ParcelFormSet(FormSet): if not value: continue try: - parcel = models.Parcel.objects.get(pk=value) - except models.Parcel.DoesNotExist: + parcel = models.Parcel.objects.get(pk=int(value)) + except (models.Parcel.DoesNotExist, ValueError): continue ordering_keys[number] = [ parcel.public_domain, parcel.town, parcel.year, @@ -335,7 +336,6 @@ class ParcelFormSet(FormSet): def clean(self): # manage parcel selection - selected_town, parcels = None, [] if self.data.get('_parcel_selection'): parcels = parse_parcels(self.data['_parcel_selection']) selected_town = self.data.get('_town') @@ -417,7 +417,7 @@ class RecordRelationsForm(ManageOldType, forms.Form): raise forms.ValidationError( _(u"You should select a relation type.")) if self.left_record and \ - str(cleaned_data.get('right_record')) == str( + str(cleaned_data.get('right_record', None)) == str( self.left_record.pk): raise forms.ValidationError( _(u"An operation cannot be related to herself.")) @@ -909,11 +909,13 @@ class OperationFormGeneral(ManageOldType, forms.Form): self.fields['record_quality'].choices = \ [('', '--')] + list(models.QUALITY) if 'operation_code' in self.fields: - self.fields.keyOrder = list(self.fields.keyOrder) - self.fields.keyOrder.pop(self.fields.keyOrder.index( - 'operation_code')) - self.fields.keyOrder.insert(self.fields.keyOrder.index('year'), - 'operation_code') + fields = OrderedDict() + ope_code = self.fields.pop('operation_code') + for key, value in self.fields.items(): + if key == 'year': + fields['operation_code'] = ope_code + fields[key] = value + self.fields = fields def clean(self): cleaned_data = self.cleaned_data @@ -976,12 +978,15 @@ class OperationFormModifGeneral(OperationFormGeneral): def __init__(self, *args, **kwargs): super(OperationFormModifGeneral, self).__init__(*args, **kwargs) - self.fields.keyOrder = list(self.fields.keyOrder) - self.fields.keyOrder.pop(self.fields.keyOrder.index('associated_file')) - self.fields.keyOrder.insert(self.fields.keyOrder.index('in_charge'), - 'associated_file') + asso_file = self.fields.pop('associated_file') if not get_current_profile().files: - self.fields.pop('associated_file') + return + fields = OrderedDict() + for key, value in self.fields.items(): + if key == 'in_charge': + fields['associated_file'] = asso_file + fields[key] = value + self.fields = fields OperationFormModifGeneral.associated_models = \ OperationFormGeneral.associated_models.copy() @@ -1039,13 +1044,6 @@ class SelectedTownForm(forms.Form): towns = None if 'data' in kwargs and 'TOWNS' in kwargs['data']: towns = kwargs['data']['TOWNS'] - # clean data if not "real" data - prefix_value = kwargs['prefix'] + '-town' - if not [k for k in kwargs['data'].keys() - if k.startswith(prefix_value) and kwargs['data'][k]]: - kwargs['data'] = None - if 'files' in kwargs: - kwargs.pop('files') super(SelectedTownForm, self).__init__(*args, **kwargs) if towns and towns != -1: self.fields['town'].choices = [('', '--')] + towns @@ -1065,13 +1063,6 @@ class SelectedParcelForm(forms.Form): parcels = None if 'data' in kwargs and 'PARCELS' in kwargs['data']: parcels = kwargs['data']['PARCELS'] - # clean data if not "real" data - prefix_value = kwargs['prefix'] + '-parcel' - if not [k for k in kwargs['data'].keys() - if k.startswith(prefix_value) and kwargs['data'][k]]: - kwargs['data'] = None - if 'files' in kwargs: - kwargs.pop('files') super(SelectedParcelForm, self).__init__(*args, **kwargs) if parcels: self.fields['parcel'].choices = [('', '--')] + parcels @@ -1239,9 +1230,13 @@ class OperationSourceForm(SourceForm): def __init__(self, *args, **kwargs): super(OperationSourceForm, self).__init__(*args, **kwargs) - keyOrder = self.fields.keyOrder - keyOrder.pop(keyOrder.index('index')) - keyOrder.insert(keyOrder.index('source_type') + 1, 'index') + fields = OrderedDict() + idx = self.fields.pop('index') + for key, value in self.fields.items(): + fields[key] = value + if key == 'source_type': + fields['index'] = idx + self.fields = fields def clean(self): # manage unique operation ID @@ -1404,11 +1399,13 @@ class AdministrativeActOpeForm(ManageOldType, forms.Form): class AdministrativeActModifForm(object): def __init__(self, *args, **kwargs): super(AdministrativeActModifForm, self).__init__(*args, **kwargs) - self.fields.keyOrder = list(self.fields.keyOrder) - self.fields.keyOrder.pop(self.fields.keyOrder.index( - 'index')) - self.fields.keyOrder.insert( - self.fields.keyOrder.index("signature_date") + 1, 'index') + fields = OrderedDict() + idx = self.fields.pop('index') + for key, value in self.fields.items(): + fields[key] = value + if key == 'signature_date': + fields['index'] = idx + self.fields = fields def clean(self): # manage unique act ID diff --git a/archaeological_operations/lookups.py b/archaeological_operations/lookups.py new file mode 100644 index 000000000..83cf6fa3a --- /dev/null +++ b/archaeological_operations/lookups.py @@ -0,0 +1,76 @@ +from ajax_select import register, LookupChannel + +from django.db.models import Q +from django.utils.encoding import force_text +from django.utils.html import escape + +from archaeological_operations.models import Operation, ArchaeologicalSite, \ + Parcel + + +@register('operation') +class OperationLookup(LookupChannel): + model = Operation + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(cached_label__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by('cached_label')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.cached_label + + +@register('archaeological_site') +class ArchaeologicalSiteLookup(LookupChannel): + model = ArchaeologicalSite + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(reference__icontains=term) | + Q(name__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by('reference', + 'name')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % unicode(item) + + +@register('parcel') +class ParcelLookup(LookupChannel): + model = Parcel + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(associated_file__cached_label__icontains=term) | + Q(operation__cached_label__icontains=term) | + Q(section__icontains=term) | + Q(parcel_number__icontains=term) | + Q(town__name__icontains=term) + ) + try: + subquery |= Q(year=int(term)) + except ValueError: + pass + query &= subquery + return self.model.objects.filter( + query).order_by('-associated_file__cached_label', + '-operation__cached_label', + 'section', + 'parcel_number')[:20] + + def format_match(self, obj): + return escape(force_text(obj.long_label())) + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.long_label() diff --git a/archaeological_operations/migrations/0001_initial.py b/archaeological_operations/migrations/0001_initial.py index c5b4619ab..65d741aaa 100644 --- a/archaeological_operations/migrations/0001_initial.py +++ b/archaeological_operations/migrations/0001_initial.py @@ -1,655 +1,387 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - depends_on = (('archaeological_files', '0001_initial.py'), ) - - def forwards(self, orm): - # Adding model 'OperationType' - db.create_table('archaeological_operations_operationtype', ( - ('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('archaeological_operations', ['OperationType']) - - # Adding model 'RemainType' - db.create_table('archaeological_operations_remaintype', ( - ('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('archaeological_operations', ['RemainType']) - - # Adding model 'Period' - db.create_table('archaeological_operations_period', ( - ('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)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - ('start_date', self.gf('django.db.models.fields.IntegerField')()), - ('end_date', self.gf('django.db.models.fields.IntegerField')()), - ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.Period'], null=True, blank=True)), - )) - db.send_create_signal('archaeological_operations', ['Period']) - - # Adding model 'HistoricalOperation' - db.create_table('archaeological_operations_historicaloperation', ( - ('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)), - ('start_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('excavation_end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('in_charge_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('year', self.gf('django.db.models.fields.IntegerField')()), - ('operation_code', self.gf('django.db.models.fields.IntegerField')()), - ('associated_file_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('operation_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('cost', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('scheduled_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('optional_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('effective_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('code_patriarche', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('code_dracar', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), - ('fnap_financing', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - ('fnap_cost', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('zoning_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('large_area_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('geoarchaeological_context_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('operator_reference', self.gf('django.db.models.fields.CharField')(max_length=20, null=True, blank=True)), - ('common_name', self.gf('django.db.models.fields.CharField')(max_length=120, null=True, blank=True)), - ('comment', self.gf('django.db.models.fields.TextField')(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('archaeological_operations', ['HistoricalOperation']) - - # Adding model 'Operation' - db.create_table('archaeological_operations_operation', ( - ('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'])), - ('start_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('excavation_end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('in_charge', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), - ('year', self.gf('django.db.models.fields.IntegerField')()), - ('operation_code', self.gf('django.db.models.fields.IntegerField')()), - ('associated_file', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='operations', null=True, to=orm['archaeological_files.File'])), - ('operation_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['archaeological_operations.OperationType'])), - ('surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('cost', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('scheduled_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('optional_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('effective_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('code_patriarche', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('code_dracar', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), - ('fnap_financing', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - ('fnap_cost', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('zoning_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('large_area_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('geoarchaeological_context_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('operator_reference', self.gf('django.db.models.fields.CharField')(max_length=20, null=True, blank=True)), - ('common_name', self.gf('django.db.models.fields.CharField')(max_length=120, null=True, blank=True)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('archaeological_operations', ['Operation']) - - # Adding M2M table for field remains on 'Operation' - db.create_table('archaeological_operations_operation_remains', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('operation', models.ForeignKey(orm['archaeological_operations.operation'], null=False)), - ('remaintype', models.ForeignKey(orm['archaeological_operations.remaintype'], null=False)) - )) - db.create_unique('archaeological_operations_operation_remains', ['operation_id', 'remaintype_id']) - - # Adding M2M table for field towns on 'Operation' - db.create_table('archaeological_operations_operation_towns', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('operation', models.ForeignKey(orm['archaeological_operations.operation'], null=False)), - ('town', models.ForeignKey(orm['ishtar_common.town'], null=False)) - )) - db.create_unique('archaeological_operations_operation_towns', ['operation_id', 'town_id']) - - # Adding M2M table for field periods on 'Operation' - db.create_table('archaeological_operations_operation_periods', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('operation', models.ForeignKey(orm['archaeological_operations.operation'], null=False)), - ('period', models.ForeignKey(orm['archaeological_operations.period'], null=False)) - )) - db.create_unique('archaeological_operations_operation_periods', ['operation_id', 'period_id']) - - # Adding model 'OperationSource' - db.create_table('archaeological_operations_operationsource', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), - ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), - ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('operation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_operations.Operation'])), - ('index', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('archaeological_operations', ['OperationSource']) - - # Adding M2M table for field authors on 'OperationSource' - db.create_table('archaeological_operations_operationsource_authors', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('operationsource', models.ForeignKey(orm['archaeological_operations.operationsource'], null=False)), - ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) - )) - db.create_unique('archaeological_operations_operationsource_authors', ['operationsource_id', 'author_id']) - - # Adding model 'ActType' - db.create_table('archaeological_operations_acttype', ( - ('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)), - ('intented_to', self.gf('django.db.models.fields.CharField')(max_length=1)), - )) - db.send_create_signal('archaeological_operations', ['ActType']) - - # Adding model 'HistoricalAdministrativeAct' - db.create_table('archaeological_operations_historicaladministrativeact', ( - ('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)), - ('act_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('in_charge_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('operator_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('scientific_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('signatory_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('operation_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('associated_file_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('signature_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('act_object', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('ref_sra', self.gf('django.db.models.fields.CharField')(max_length=15)), - ('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('archaeological_operations', ['HistoricalAdministrativeAct']) - - # Adding model 'AdministrativeAct' - db.create_table('archaeological_operations_administrativeact', ( - ('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'])), - ('act_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.ActType'])), - ('in_charge', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), - ('operator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Organization'], null=True, blank=True)), - ('scientific', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), - ('signatory', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), - ('operation', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='administrative_act', null=True, to=orm['archaeological_operations.Operation'])), - ('associated_file', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='administrative_act', null=True, to=orm['archaeological_files.File'])), - ('signature_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('act_object', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('ref_sra', self.gf('django.db.models.fields.CharField')(max_length=15)), - )) - db.send_create_signal('archaeological_operations', ['AdministrativeAct']) - - # Adding model 'Parcel' - db.create_table('archaeological_operations_parcel', ( - ('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'])), - ('history_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), - ('associated_file', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='parcels', null=True, to=orm['archaeological_files.File'])), - ('operation', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='parcels', null=True, to=orm['archaeological_operations.Operation'])), - ('year', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('town', self.gf('django.db.models.fields.related.ForeignKey')(related_name='parcels', to=orm['ishtar_common.Town'])), - ('section', self.gf('django.db.models.fields.CharField')(max_length=4)), - ('parcel_number', self.gf('django.db.models.fields.CharField')(max_length=6)), - )) - db.send_create_signal('archaeological_operations', ['Parcel']) - - # Adding model 'ParcelOwner' - db.create_table('archaeological_operations_parcelowner', ( - ('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'])), - ('history_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), - ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'])), - ('parcel', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.Parcel'])), - ('start_date', self.gf('django.db.models.fields.DateField')()), - ('end_date', self.gf('django.db.models.fields.DateField')()), - )) - db.send_create_signal('archaeological_operations', ['ParcelOwner']) - +from __future__ import unicode_literals - def backwards(self, orm): - # Deleting model 'OperationType' - db.delete_table('archaeological_operations_operationtype') - - # Deleting model 'RemainType' - db.delete_table('archaeological_operations_remaintype') - - # Deleting model 'Period' - db.delete_table('archaeological_operations_period') - - # Deleting model 'HistoricalOperation' - db.delete_table('archaeological_operations_historicaloperation') - - # Deleting model 'Operation' - db.delete_table('archaeological_operations_operation') - - # Removing M2M table for field remains on 'Operation' - db.delete_table('archaeological_operations_operation_remains') - - # Removing M2M table for field towns on 'Operation' - db.delete_table('archaeological_operations_operation_towns') - - # Removing M2M table for field periods on 'Operation' - db.delete_table('archaeological_operations_operation_periods') - - # Deleting model 'OperationSource' - db.delete_table('archaeological_operations_operationsource') - - # Removing M2M table for field authors on 'OperationSource' - db.delete_table('archaeological_operations_operationsource_authors') - - # Deleting model 'ActType' - db.delete_table('archaeological_operations_acttype') - - # Deleting model 'HistoricalAdministrativeAct' - db.delete_table('archaeological_operations_historicaladministrativeact') - - # Deleting model 'AdministrativeAct' - db.delete_table('archaeological_operations_administrativeact') - - # Deleting model 'Parcel' - db.delete_table('archaeological_operations_parcel') - - # Deleting model 'ParcelOwner' - db.delete_table('archaeological_operations_parcelowner') - - - models = { - 'archaeological_files.file': { - 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), - 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'object_name': 'FileType'}, - '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'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'object_name': 'PermitType'}, - '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'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {}), - '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'}) - }, - 'archaeological_operations.acttype': { - 'Meta': {'object_name': 'ActType'}, - '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'}), - 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_operations.administrativeact': { - 'Meta': {'object_name': 'AdministrativeAct'}, - 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), - 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15'}), - 'scientific': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.historicaladministrativeact': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalAdministrativeAct'}, - 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'act_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'associated_file_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'}), - 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15'}), - 'scientific_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'signatory_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.historicaloperation': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOperation'}, - 'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {}), - 'operation_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'year': ('django.db.models.fields.IntegerField', [], {}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'object_name': 'Operation'}, - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operationbydepartment': { - 'Meta': {'object_name': 'OperationByDepartment', 'db_table': "'operation_department'", 'managed': 'False'}, - 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Operation']"}) - }, - 'archaeological_operations.operationsource': { - 'Meta': {'object_name': 'OperationSource'}, - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_operations.Operation']"}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) - }, - 'archaeological_operations.operationtype': { - 'Meta': {'object_name': 'OperationType'}, - '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'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'object_name': 'Parcel'}, - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.parcelowner': { - 'Meta': {'object_name': 'ParcelOwner'}, - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Parcel']"}), - 'start_date': ('django.db.models.fields.DateField', [], {}) - }, - 'archaeological_operations.period': { - 'Meta': {'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'object_name': 'RemainType'}, - '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'}) - }, - '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.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 = ['archaeological_operations'] +from django.db import models, migrations +import datetime +import re +import django.contrib.gis.db.models.fields +import archaeological_operations.models +import django.db.models.deletion +from django.conf import settings +import ishtar_common.models +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='OperationByDepartment', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + 'db_table': 'operation_department', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ActType', + 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')), + ('intented_to', models.CharField(max_length=2, verbose_name='Intended to', choices=[(b'F', 'Archaeological file'), (b'O', 'Operation'), (b'TF', 'Treatment request'), (b'T', 'Treatment')])), + ('code', models.CharField(max_length=10, null=True, verbose_name='Code', blank=True)), + ('indexed', models.BooleanField(default=False, verbose_name='Indexed')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Act type', + 'verbose_name_plural': 'Act types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='AdministrativeAct', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('index', models.IntegerField(null=True, verbose_name='Index', blank=True)), + ('signature_date', models.DateField(null=True, verbose_name='Signature date', blank=True)), + ('year', models.IntegerField(null=True, verbose_name='Year', blank=True)), + ('act_object', models.TextField(max_length=300, null=True, verbose_name='Object', blank=True)), + ('ref_sra', models.CharField(max_length=15, null=True, verbose_name='R\xe9f\xe9rence SRA', blank=True)), + ('departments_label', models.TextField(help_text='Cached values get from associated departments', null=True, verbose_name='Departments', blank=True)), + ('towns_label', models.TextField(help_text='Cached values get from associated towns', null=True, verbose_name='Towns', blank=True)), + ], + options={ + 'ordering': ('year', 'signature_date', 'index', 'act_type'), + 'verbose_name': 'Administrative act', + 'verbose_name_plural': 'Administrative acts', + 'permissions': (('view_administrativeact', 'Peut voir tous les Actes administratifs'), ('view_own_administrativeact', 'Peut voir son propre Acte administratif'), ('add_own_administrativeact', 'Peut ajouter son propre Acte administratif'), ('change_own_administrativeact', 'Peut modifier son propre Acte administratif'), ('delete_own_administrativeact', 'Peut supprimer son propre Acte administratif')), + }, + bases=(models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter), + ), + migrations.CreateModel( + name='ArchaeologicalSite', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('reference', models.CharField(unique=True, max_length=20, verbose_name='Reference')), + ('name', models.CharField(max_length=200, null=True, verbose_name='Name', blank=True)), + ], + options={ + 'verbose_name': 'Archaeological site', + 'verbose_name_plural': 'Archaeological sites', + 'permissions': (('view_archaeologicalsite', 'Peut voir toutes les Entit\xe9s arch\xe9ologiques'), ('view_own_archaeologicalsite', 'Peut voir ses propres Entit\xe9s arch\xe9ologiques'), ('add_own_archaeologicalsite', 'Peut ajouter ses propres Entit\xe9s arch\xe9ologique'), ('change_own_archaeologicalsite', 'Peut modifier sa propre Entit\xe9 arch\xe9ologique'), ('delete_own_archaeologicalsite', 'Peut supprimer ses propres Entit\xe9s arch\xe9ologiques')), + }, + ), + migrations.CreateModel( + name='HistoricalAdministrativeAct', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('index', models.IntegerField(null=True, verbose_name='Index', blank=True)), + ('signature_date', models.DateField(null=True, verbose_name='Signature date', blank=True)), + ('year', models.IntegerField(null=True, verbose_name='Year', blank=True)), + ('act_object', models.TextField(max_length=300, null=True, verbose_name='Object', blank=True)), + ('ref_sra', models.CharField(max_length=15, null=True, verbose_name='R\xe9f\xe9rence SRA', blank=True)), + ('departments_label', models.TextField(help_text='Cached values get from associated departments', null=True, verbose_name='Departments', blank=True)), + ('towns_label', models.TextField(help_text='Cached values get from associated towns', null=True, verbose_name='Towns', 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 Administrative act', + }, + ), + migrations.CreateModel( + name='HistoricalOperation', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('image', models.TextField(max_length=255, null=True, blank=True)), + ('thumbnail', models.TextField(max_length=255, null=True, blank=True)), + ('creation_date', models.DateField(default=datetime.date.today, verbose_name='Creation date')), + ('end_date', models.DateField(null=True, verbose_name='Closing date', blank=True)), + ('start_date', models.DateField(null=True, verbose_name='Start date', blank=True)), + ('excavation_end_date', models.DateField(null=True, verbose_name='Excavation end date', blank=True)), + ('report_delivery_date', models.DateField(null=True, verbose_name='Report delivery date', blank=True)), + ('year', models.IntegerField(null=True, verbose_name='Year', blank=True)), + ('operation_code', models.IntegerField(null=True, verbose_name='Numeric reference', blank=True)), + ('surface', models.IntegerField(null=True, verbose_name='Surface (m2)', blank=True)), + ('cost', models.IntegerField(null=True, verbose_name='Cost (euros)', blank=True)), + ('scheduled_man_days', models.IntegerField(null=True, verbose_name='Scheduled man-days', blank=True)), + ('optional_man_days', models.IntegerField(null=True, verbose_name='Optional man-days', blank=True)), + ('effective_man_days', models.IntegerField(null=True, verbose_name='Effective man-days', blank=True)), + ('old_code', models.CharField(max_length=200, null=True, verbose_name='Old code', blank=True)), + ('code_patriarche', models.TextField(db_index=True, null=True, verbose_name='Code PATRIARCHE', blank=True)), + ('fnap_financing', models.FloatField(null=True, verbose_name='Financement FNAP (%)', blank=True)), + ('fnap_cost', models.IntegerField(null=True, verbose_name='Financement FNAP (\u20ac)', blank=True)), + ('zoning_prescription', models.NullBooleanField(verbose_name='Prescription on zoning')), + ('large_area_prescription', models.NullBooleanField(verbose_name='Prescription on large area')), + ('geoarchaeological_context_prescription', models.NullBooleanField(verbose_name='Prescription on geoarchaeological context')), + ('negative_result', models.NullBooleanField(verbose_name='R\xe9sultat consid\xe9r\xe9 comme n\xe9gatif')), + ('cira_date', models.DateField(null=True, verbose_name='Date avis CIRA', blank=True)), + ('eas_number', models.CharField(max_length=20, null=True, verbose_name="Num\xe9ro de l'EA", blank=True)), + ('operator_reference', models.CharField(max_length=20, null=True, verbose_name='Operator reference', blank=True)), + ('common_name', models.TextField(null=True, verbose_name='Generic name', blank=True)), + ('address', models.TextField(null=True, verbose_name='Address / Locality', blank=True)), + ('comment', models.TextField(null=True, verbose_name='General comment', blank=True)), + ('scientific_documentation_comment', models.TextField(null=True, verbose_name='Comment about scientific documentation', blank=True)), + ('cached_label', models.CharField(max_length=500, null=True, verbose_name='Cached name', blank=True)), + ('virtual_operation', models.BooleanField(default=False, help_text='If checked, it means that this operation have not been officialy registered.', verbose_name='Virtual operation')), + ('record_quality', models.CharField(blank=True, max_length=2, null=True, verbose_name='Record quality', choices=[(b'ND', 'Not documented'), (b'A', 'Arbitrary'), (b'R', 'Reliable')])), + ('abstract', models.TextField(null=True, verbose_name='Abstract', blank=True)), + ('documentation_deadline', models.DateField(null=True, verbose_name='Deadline for submission of the documentation', blank=True)), + ('documentation_received', models.NullBooleanField(verbose_name='Documentation received')), + ('finds_deadline', models.DateField(null=True, verbose_name='Deadline for submission of the finds', blank=True)), + ('finds_received', models.NullBooleanField(verbose_name='Finds received')), + ('point', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, verbose_name='Point', blank=True)), + ('multi_polygon', django.contrib.gis.db.models.fields.MultiPolygonField(srid=4326, null=True, verbose_name='Multi polygon', 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 Operation', + }, + ), + migrations.CreateModel( + name='Operation', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('creation_date', models.DateField(default=datetime.date.today, verbose_name='Creation date')), + ('end_date', models.DateField(null=True, verbose_name='Closing date', blank=True)), + ('start_date', models.DateField(null=True, verbose_name='Start date', blank=True)), + ('excavation_end_date', models.DateField(null=True, verbose_name='Excavation end date', blank=True)), + ('report_delivery_date', models.DateField(null=True, verbose_name='Report delivery date', blank=True)), + ('year', models.IntegerField(null=True, verbose_name='Year', blank=True)), + ('operation_code', models.IntegerField(null=True, verbose_name='Numeric reference', blank=True)), + ('surface', models.IntegerField(null=True, verbose_name='Surface (m2)', blank=True)), + ('cost', models.IntegerField(null=True, verbose_name='Cost (euros)', blank=True)), + ('scheduled_man_days', models.IntegerField(null=True, verbose_name='Scheduled man-days', blank=True)), + ('optional_man_days', models.IntegerField(null=True, verbose_name='Optional man-days', blank=True)), + ('effective_man_days', models.IntegerField(null=True, verbose_name='Effective man-days', blank=True)), + ('old_code', models.CharField(max_length=200, null=True, verbose_name='Old code', blank=True)), + ('code_patriarche', models.TextField(db_index=True, null=True, verbose_name='Code PATRIARCHE', blank=True)), + ('fnap_financing', models.FloatField(null=True, verbose_name='Financement FNAP (%)', blank=True)), + ('fnap_cost', models.IntegerField(null=True, verbose_name='Financement FNAP (\u20ac)', blank=True)), + ('zoning_prescription', models.NullBooleanField(verbose_name='Prescription on zoning')), + ('large_area_prescription', models.NullBooleanField(verbose_name='Prescription on large area')), + ('geoarchaeological_context_prescription', models.NullBooleanField(verbose_name='Prescription on geoarchaeological context')), + ('negative_result', models.NullBooleanField(verbose_name='R\xe9sultat consid\xe9r\xe9 comme n\xe9gatif')), + ('cira_date', models.DateField(null=True, verbose_name='Date avis CIRA', blank=True)), + ('eas_number', models.CharField(max_length=20, null=True, verbose_name="Num\xe9ro de l'EA", blank=True)), + ('operator_reference', models.CharField(max_length=20, null=True, verbose_name='Operator reference', blank=True)), + ('common_name', models.TextField(null=True, verbose_name='Generic name', blank=True)), + ('address', models.TextField(null=True, verbose_name='Address / Locality', blank=True)), + ('comment', models.TextField(null=True, verbose_name='General comment', blank=True)), + ('scientific_documentation_comment', models.TextField(null=True, verbose_name='Comment about scientific documentation', blank=True)), + ('cached_label', models.CharField(max_length=500, null=True, verbose_name='Cached name', blank=True)), + ('virtual_operation', models.BooleanField(default=False, help_text='If checked, it means that this operation have not been officialy registered.', verbose_name='Virtual operation')), + ('record_quality', models.CharField(blank=True, max_length=2, null=True, verbose_name='Record quality', choices=[(b'ND', 'Not documented'), (b'A', 'Arbitrary'), (b'R', 'Reliable')])), + ('abstract', models.TextField(null=True, verbose_name='Abstract', blank=True)), + ('documentation_deadline', models.DateField(null=True, verbose_name='Deadline for submission of the documentation', blank=True)), + ('documentation_received', models.NullBooleanField(verbose_name='Documentation received')), + ('finds_deadline', models.DateField(null=True, verbose_name='Deadline for submission of the finds', blank=True)), + ('finds_received', models.NullBooleanField(verbose_name='Finds received')), + ('point', django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, verbose_name='Point', blank=True)), + ('multi_polygon', django.contrib.gis.db.models.fields.MultiPolygonField(srid=4326, null=True, verbose_name='Multi polygon', blank=True)), + ], + options={ + 'ordering': ('cached_label',), + 'verbose_name': 'Operation', + 'verbose_name_plural': 'Operations', + 'permissions': (('view_operation', 'Peut voir toutes les Op\xe9rations'), ('view_own_operation', 'Peut voir sa propre Op\xe9ration'), ('add_own_operation', 'Peut ajouter sa propre Op\xe9ration'), ('change_own_operation', 'Peut modifier sa propre Op\xe9ration'), ('delete_own_operation', 'Peut supprimer sa propre Op\xe9ration'), ('close_operation', 'Peut clore une Op\xe9ration')), + }, + bases=(archaeological_operations.models.ClosedItem, models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter, ishtar_common.models.ShortMenuItem, ishtar_common.models.DashboardFormItem), + ), + migrations.CreateModel( + name='OperationSource', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('title', models.CharField(max_length=300, verbose_name='Title')), + ('external_id', models.TextField(max_length=300, null=True, verbose_name='External ID', blank=True)), + ('scale', models.CharField(max_length=30, null=True, verbose_name='Scale', blank=True)), + ('associated_url', models.URLField(null=True, verbose_name='Numerical ressource (web address)', blank=True)), + ('receipt_date', models.DateField(null=True, verbose_name='Receipt date', blank=True)), + ('creation_date', models.DateField(null=True, verbose_name='Creation date', blank=True)), + ('receipt_date_in_documentation', models.DateField(null=True, verbose_name='Receipt date in documentation', blank=True)), + ('item_number', models.IntegerField(default=1, verbose_name='Item number')), + ('reference', models.CharField(max_length=100, null=True, verbose_name='Ref.', blank=True)), + ('internal_reference', models.CharField(max_length=100, null=True, verbose_name='Internal ref.', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('additional_information', models.TextField(null=True, verbose_name='Additional information', blank=True)), + ('duplicate', models.BooleanField(default=False, verbose_name='Has a duplicate')), + ('index', models.IntegerField(null=True, verbose_name='Index', blank=True)), + ], + options={ + 'verbose_name': 'Operation documentation', + 'verbose_name_plural': 'Operation documentations', + 'permissions': (('view_operationsource', "Peut voir toutes les Documentations d'op\xe9ration"), ('view_own_operationsource', "Peut voir sa propre Documentation d'op\xe9ration"), ('add_own_operationsource', "Peut ajouter sa propre Documentation d'op\xe9ration"), ('change_own_operationsource', "Peut modifier sa propre Documentation d'op\xe9ration"), ('delete_own_operationsource', "Peut supprimer sa propre Documentation d'op\xe9ration")), + }, + bases=(ishtar_common.models.OwnPerms, models.Model), + ), + migrations.CreateModel( + name='OperationTypeOld', + 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 old', + 'verbose_name_plural': 'Operation types old', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Parcel', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('year', models.IntegerField(null=True, verbose_name='Year', blank=True)), + ('section', models.CharField(max_length=4, null=True, verbose_name='Section', blank=True)), + ('parcel_number', models.CharField(max_length=6, null=True, verbose_name='Parcel number', blank=True)), + ('public_domain', models.BooleanField(default=False, verbose_name='Public domain')), + ('external_id', models.CharField(max_length=100, null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('address', models.TextField(null=True, verbose_name='Address - Locality', blank=True)), + ], + options={ + 'ordering': ('year', 'section', 'parcel_number'), + 'verbose_name': 'Parcel', + 'verbose_name_plural': 'Parcels', + }, + ), + migrations.CreateModel( + name='ParcelOwner', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('start_date', models.DateField(verbose_name='Start date')), + ('end_date', models.DateField(verbose_name='End date')), + ('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)), + ], + options={ + 'verbose_name': 'Parcel owner', + 'verbose_name_plural': 'Parcel owners', + }, + ), + migrations.CreateModel( + name='Period', + 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(verbose_name='Order')), + ('start_date', models.IntegerField(verbose_name='Start date')), + ('end_date', models.IntegerField(verbose_name='End date')), + ('parent', models.ForeignKey(verbose_name='Parent period', blank=True, to='archaeological_operations.Period', null=True)), + ], + options={ + 'ordering': ('order',), + 'verbose_name': 'Type Period', + 'verbose_name_plural': 'Types Period', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='RecordRelations', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('left_record', models.ForeignKey(related_name='right_relations', to='archaeological_operations.Operation')), + ], + options={ + 'ordering': ('left_record', 'relation_type'), + 'verbose_name': 'Operation record relation', + 'verbose_name_plural': 'Operation record relations', + }, + bases=(ishtar_common.models.GeneralRecordRelations, models.Model), + ), + migrations.CreateModel( + name='RelationType', + 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')), + ('symmetrical', models.BooleanField(verbose_name='Symmetrical')), + ('tiny_label', models.CharField(max_length=50, null=True, verbose_name='Tiny label', blank=True)), + ('inverse_relation', models.ForeignKey(verbose_name='Inverse relation', blank=True, to='archaeological_operations.RelationType', null=True)), + ], + options={ + 'ordering': ('order', 'label'), + 'verbose_name': 'Operation relation type', + 'verbose_name_plural': 'Operation relation types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='RemainType', + 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': 'Remain type', + 'verbose_name_plural': 'Remain types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ReportState', + 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(verbose_name='Order')), + ], + options={ + 'ordering': ('order',), + 'verbose_name': 'Type of report state', + 'verbose_name_plural': 'Types of report state', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.AddField( + model_name='recordrelations', + name='relation_type', + field=models.ForeignKey(to='archaeological_operations.RelationType'), + ), + migrations.AddField( + model_name='recordrelations', + name='right_record', + field=models.ForeignKey(related_name='left_relations', to='archaeological_operations.Operation'), + ), + ] diff --git a/archaeological_operations/migrations/0002_auto_20170414_2123.py b/archaeological_operations/migrations/0002_auto_20170414_2123.py new file mode 100644 index 000000000..fc9f93911 --- /dev/null +++ b/archaeological_operations/migrations/0002_auto_20170414_2123.py @@ -0,0 +1,365 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_finds', '0002_auto_20170414_2123'), + ('archaeological_operations', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('ishtar_common', '0001_initial'), + ('archaeological_files', '0002_auto_20170414_2123'), + ] + + operations = [ + migrations.AddField( + model_name='parcelowner', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_operations_parcelowner', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='parcelowner', + name='owner', + field=models.ForeignKey(related_name='parcel_owner', verbose_name='Owner', to='ishtar_common.Person'), + ), + migrations.AddField( + model_name='parcelowner', + name='parcel', + field=models.ForeignKey(related_name='owners', verbose_name='Parcel', to='archaeological_operations.Parcel'), + ), + migrations.AddField( + model_name='parcel', + name='associated_file', + field=models.ForeignKey(related_name='parcels', verbose_name='File', blank=True, to='archaeological_files.File', null=True), + ), + migrations.AddField( + model_name='parcel', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='parcel', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='parcel', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_operations_parcel', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='parcel', + name='operation', + field=models.ForeignKey(related_name='parcels', verbose_name='Operation', blank=True, to='archaeological_operations.Operation', null=True), + ), + migrations.AddField( + model_name='parcel', + name='town', + field=models.ForeignKey(related_name='parcels', verbose_name='Town', to='ishtar_common.Town'), + ), + migrations.AddField( + model_name='operationsource', + name='authors', + field=models.ManyToManyField(related_name='operationsource_related', verbose_name='Authors', to='ishtar_common.Author'), + ), + migrations.AddField( + model_name='operationsource', + name='format_type', + field=models.ForeignKey(verbose_name='Format', blank=True, to='ishtar_common.Format', null=True), + ), + migrations.AddField( + model_name='operationsource', + name='operation', + field=models.ForeignKey(related_name='source', verbose_name='Operation', to='archaeological_operations.Operation'), + ), + migrations.AddField( + model_name='operationsource', + name='source_type', + field=models.ForeignKey(verbose_name='Type', to='ishtar_common.SourceType'), + ), + migrations.AddField( + model_name='operationsource', + name='support_type', + field=models.ForeignKey(verbose_name='Support', blank=True, to='ishtar_common.SupportType', null=True), + ), + migrations.AddField( + model_name='operation', + name='archaeological_sites', + field=models.ManyToManyField(to='archaeological_operations.ArchaeologicalSite', verbose_name='Archaeological sites', blank=True), + ), + migrations.AddField( + model_name='operation', + name='associated_file', + field=models.ForeignKey(related_name='operations', verbose_name='File', blank=True, to='archaeological_files.File', null=True), + ), + migrations.AddField( + model_name='operation', + name='cira_rapporteur', + field=models.ForeignKey(related_name='cira_rapporteur', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Rapporteur CIRA', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='operation', + name='collaborators', + field=models.ManyToManyField(related_name='operation_collaborator', verbose_name='Collaborators', to='ishtar_common.Person', blank=True), + ), + migrations.AddField( + model_name='operation', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='operation', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='operation', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_operations_operation', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='operation', + name='in_charge', + field=models.ForeignKey(related_name='operation_responsability', on_delete=django.db.models.deletion.SET_NULL, verbose_name='In charge', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='operation', + name='operation_type', + field=models.ForeignKey(related_name='+', verbose_name='Operation type', to='ishtar_common.OperationType'), + ), + migrations.AddField( + model_name='operation', + name='operator', + field=models.ForeignKey(related_name='operator', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Operator', blank=True, to='ishtar_common.Organization', null=True), + ), + migrations.AddField( + model_name='operation', + name='periods', + field=models.ManyToManyField(to='archaeological_operations.Period', verbose_name='Periods', blank=True), + ), + migrations.AddField( + model_name='operation', + name='remains', + field=models.ManyToManyField(to='archaeological_operations.RemainType', verbose_name='Remains', blank=True), + ), + migrations.AddField( + model_name='operation', + name='report_processing', + field=models.ForeignKey(verbose_name='Report processing', blank=True, to='archaeological_operations.ReportState', null=True), + ), + migrations.AddField( + model_name='operation', + name='scientist', + field=models.ForeignKey(related_name='operation_scientist_responsability', on_delete=django.db.models.deletion.SET_NULL, verbose_name='In charge scientist', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='operation', + name='towns', + field=models.ManyToManyField(related_name='operations', verbose_name='Towns', to='ishtar_common.Town'), + ), + migrations.AddField( + model_name='historicaloperation', + name='associated_file', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_files.File', null=True), + ), + migrations.AddField( + model_name='historicaloperation', + name='cira_rapporteur', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaloperation', + 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='historicaloperation', + 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='historicaloperation', + 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='historicaloperation', + name='in_charge', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaloperation', + name='operation_type', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.OperationType', null=True), + ), + migrations.AddField( + model_name='historicaloperation', + name='operator', + 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='historicaloperation', + name='report_processing', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_operations.ReportState', null=True), + ), + migrations.AddField( + model_name='historicaloperation', + name='scientist', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='act_type', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_operations.ActType', null=True), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='associated_file', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_files.File', null=True), + ), + migrations.AddField( + model_name='historicaladministrativeact', + 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='historicaladministrativeact', + 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='historicaladministrativeact', + 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='historicaladministrativeact', + name='in_charge', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='operation', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_operations.Operation', null=True), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='operator', + 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='historicaladministrativeact', + name='scientist', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='signatory', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='treatment', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.Treatment', null=True), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='treatment_file', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_finds.TreatmentFile', null=True), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_operations_archaeologicalsite', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='periods', + field=models.ManyToManyField(to='archaeological_operations.Period', verbose_name='Periods', blank=True), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='remains', + field=models.ManyToManyField(to='archaeological_operations.RemainType', verbose_name='Remains', blank=True), + ), + migrations.AddField( + model_name='administrativeact', + name='act_type', + field=models.ForeignKey(verbose_name='Act type', to='archaeological_operations.ActType'), + ), + migrations.AddField( + model_name='administrativeact', + name='associated_file', + field=models.ForeignKey(related_name='administrative_act', verbose_name='Archaeological file', blank=True, to='archaeological_files.File', null=True), + ), + migrations.AddField( + model_name='administrativeact', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='administrativeact', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='administrativeact', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_operations_administrativeact', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='administrativeact', + name='in_charge', + field=models.ForeignKey(related_name='adminact_operation_in_charge', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Person in charge of the operation', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='administrativeact', + name='operation', + field=models.ForeignKey(related_name='administrative_act', verbose_name='Operation', blank=True, to='archaeological_operations.Operation', null=True), + ), + migrations.AddField( + model_name='administrativeact', + name='operator', + field=models.ForeignKey(related_name='adminact_operator', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Archaeological preventive operator', blank=True, to='ishtar_common.Organization', null=True), + ), + migrations.AddField( + model_name='administrativeact', + name='scientist', + field=models.ForeignKey(related_name='adminact_scientist', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Scientist in charge', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='administrativeact', + name='signatory', + field=models.ForeignKey(related_name='signatory', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Signatory', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='administrativeact', + name='treatment', + field=models.ForeignKey(related_name='administrative_act', verbose_name='Treatment', blank=True, to='archaeological_finds.Treatment', null=True), + ), + migrations.AddField( + model_name='administrativeact', + name='treatment_file', + field=models.ForeignKey(related_name='administrative_act', verbose_name='Treatment request', blank=True, to='archaeological_finds.TreatmentFile', null=True), + ), + migrations.AddField( + model_name='acttype', + name='associated_template', + field=models.ManyToManyField(related_name='acttypes', verbose_name='Associated template', to='ishtar_common.DocumentTemplate', blank=True), + ), + ] diff --git a/archaeological_operations/migrations/0003_views.py b/archaeological_operations/migrations/0003_views.py new file mode 100644 index 000000000..1b8dd201f --- /dev/null +++ b/archaeological_operations/migrations/0003_views.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from archaeological_operations.models import OperationByDepartment + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0002_auto_20170414_2123'), + ] + + operations = [ + migrations.RunSQL(OperationByDepartment.CREATE_SQL) + ] diff --git a/archaeological_operations/migrations/0004_auto_20170802_1557.py b/archaeological_operations/migrations/0004_auto_20170802_1557.py new file mode 100644 index 000000000..04b285069 --- /dev/null +++ b/archaeological_operations/migrations/0004_auto_20170802_1557.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0003_views'), + ] + + operations = [ + migrations.AlterModelOptions( + name='administrativeact', + options={'ordering': ('year', 'signature_date', 'index', 'act_type'), 'verbose_name': 'Administrative act', 'verbose_name_plural': 'Administrative acts', 'permissions': (('view_administrativeact', 'Can view all Administrative acts'), ('view_own_administrativeact', 'Can view own Administrative act'), ('add_own_administrativeact', 'Can add own Administrative act'), ('change_own_administrativeact', 'Can change own Administrative act'), ('delete_own_administrativeact', 'Can delete own Administrative act'))}, + ), + migrations.AlterModelOptions( + name='archaeologicalsite', + options={'verbose_name': 'Archaeological site', 'verbose_name_plural': 'Archaeological sites', 'permissions': (('view_archaeologicalsite', 'Can view all Archaeological sites'), ('view_own_archaeologicalsite', 'Can view own Archaeological site'), ('add_own_archaeologicalsite', 'Can add own Archaeological site'), ('change_own_archaeologicalsite', 'Can change own Archaeological site'), ('delete_own_archaeologicalsite', 'Can delete own Archaeological site'))}, + ), + migrations.AlterModelOptions( + name='operation', + options={'ordering': ('cached_label',), 'verbose_name': 'Operation', 'verbose_name_plural': 'Operations', 'permissions': (('view_operation', 'Can view all Operations'), ('view_own_operation', 'Can view own Operation'), ('add_own_operation', 'Can add own Operation'), ('change_own_operation', 'Can change own Operation'), ('delete_own_operation', 'Can delete own Operation'), ('close_operation', 'Can close Operation'))}, + ), + migrations.AlterField( + model_name='operation', + name='code_patriarche', + field=models.TextField(unique=True, null=True, verbose_name='Code PATRIARCHE', blank=True), + ), + ] diff --git a/archaeological_operations/migrations/0005_auto_20170804_1741.py b/archaeological_operations/migrations/0005_auto_20170804_1741.py new file mode 100644 index 000000000..08d110bfc --- /dev/null +++ b/archaeological_operations/migrations/0005_auto_20170804_1741.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0004_auto_20170802_1557'), + ] + + operations = [ + migrations.AlterField( + model_name='operation', + name='archaeological_sites', + field=models.ManyToManyField(related_name='operations', verbose_name='Archaeological sites', to='archaeological_operations.ArchaeologicalSite', blank=True), + ), + ] diff --git a/archaeological_operations/migrations/0006_auto_20170804_2024.py b/archaeological_operations/migrations/0006_auto_20170804_2024.py new file mode 100644 index 000000000..fdf4b9e8b --- /dev/null +++ b/archaeological_operations/migrations/0006_auto_20170804_2024.py @@ -0,0 +1,46 @@ +# -*- 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 = [ + ('archaeological_operations', '0005_auto_20170804_1741'), + ] + + operations = [ + migrations.AlterField( + model_name='acttype', + 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='operationtypeold', + 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='period', + 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='relationtype', + 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='remaintype', + 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='reportstate', + 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/archaeological_operations/migrations/0007_auto_20170826_1152.py b/archaeological_operations/migrations/0007_auto_20170826_1152.py new file mode 100644 index 000000000..4017abf5d --- /dev/null +++ b/archaeological_operations/migrations/0007_auto_20170826_1152.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-26 11:52 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0006_auto_20170804_2024'), + ] + + operations = [ + migrations.AlterField( + model_name='acttype', + 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='operationtypeold', + 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='period', + 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='relationtype', + 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='remaintype', + 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='reportstate', + 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/archaeological_operations/migrations/0008_auto_20170829_1639.py b/archaeological_operations/migrations/0008_auto_20170829_1639.py new file mode 100644 index 000000000..7c5807561 --- /dev/null +++ b/archaeological_operations/migrations/0008_auto_20170829_1639.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-29 16:39 +from __future__ import unicode_literals + +from django.db import migrations, models +import ishtar_common.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0007_auto_20170826_1152'), + ] + + operations = [ + migrations.AlterField( + model_name='operation', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='operation', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='operationsource', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='operationsource', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + ] diff --git a/archaeological_operations/migrations/0068_auto__chg_field_historicaloperation_code_patriarche__chg_field_operati.py b/archaeological_operations/migrations/0068_auto__chg_field_historicaloperation_code_patriarche__chg_field_operati.py deleted file mode 100644 index 02ccdcd59..000000000 --- a/archaeological_operations/migrations/0068_auto__chg_field_historicaloperation_code_patriarche__chg_field_operati.py +++ /dev/null @@ -1,873 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -from archaeological_context_records.models import CRBulkView -from archaeological_finds.models import BFBulkView, FBulkView, FirstBaseFindView - -class Migration(SchemaMigration): - - depends_on = ( - ('archaeological_context_records', '0029_create_bulk_update_view.py'), - ('archaeological_finds', '0085_create_bulk_update_view.py'), - ) - - def forwards(self, orm): - for view in [FBulkView, BFBulkView, FirstBaseFindView, CRBulkView]: - sql = view.DELETE_SQL - db.execute(sql) - - # Changing field 'HistoricalOperation.code_patriarche' - db.alter_column('archaeological_operations_historicaloperation', 'code_patriarche', self.gf('django.db.models.fields.TextField')(null=True)) - - # Changing field 'Operation.code_patriarche' - db.alter_column('archaeological_operations_operation', 'code_patriarche', self.gf('django.db.models.fields.TextField')(unique=True, null=True)) - - for view in [CRBulkView, FirstBaseFindView, BFBulkView, FBulkView]: - sql = view.CREATE_SQL - db.execute(sql) - - def backwards(self, orm): - for view in [FBulkView, BFBulkView, FirstBaseFindView, CRBulkView]: - sql = view.DELETE_SQL - db.execute(sql) - - # Changing field 'HistoricalOperation.code_patriarche' - db.alter_column('archaeological_operations_historicaloperation', 'code_patriarche', self.gf('django.db.models.fields.IntegerField')(null=True)) - - # Changing field 'Operation.code_patriarche' - db.alter_column('archaeological_operations_operation', 'code_patriarche', self.gf('django.db.models.fields.IntegerField')(unique=True, null=True)) - - for view in [CRBulkView, FirstBaseFindView, BFBulkView, FBulkView]: - sql = view.CREATE_SQL - db.execute(sql) - - models = { - 'archaeological_files.file': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - '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'}), - 'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), - 'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), - 'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, - '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'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, - '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'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), - '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'}) - }, - 'archaeological_finds.treatment': { - 'Meta': {'unique_together': "(('year', 'index'),)", 'object_name': 'Treatment'}, - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), - 'goal': ('django.db.models.fields.TextField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_finds_treatment'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'insurance_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']", 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'other_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'quoted_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'realized_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'target_is_basket': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'treatment_state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentState']", 'null': 'True', 'blank': 'True'}), - 'treatment_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_finds.TreatmentType']", 'symmetrical': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_finds.treatmentfile': { - 'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('year', 'index'),)", 'object_name': 'TreatmentFile'}, - 'applicant': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'applicant_organisation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', '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_archaeological_finds_treatmentfile'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentFileType']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_finds.treatmentfiletype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentFileType'}, - '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'}) - }, - 'archaeological_finds.treatmentstate': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentState'}, - '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'}) - }, - 'archaeological_finds.treatmenttype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'downstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - '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'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentType']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'upstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'virtual': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'archaeological_operations.acttype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ActType'}, - 'associated_template': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'acttypes'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.DocumentTemplate']"}), - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'indexed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.administrativeact': { - 'Meta': {'ordering': "('year', 'signature_date', 'index', 'act_type')", 'object_name': 'AdministrativeAct'}, - 'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'departments_label': ('django.db.models.fields.TextField', [], {'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_archaeological_operations_administrativeact'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operation_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'signatory'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), - 'treatment_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.archaeologicalsite': { - 'Meta': {'object_name': 'ArchaeologicalSite'}, - '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_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.historicaladministrativeact': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalAdministrativeAct'}, - 'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'act_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'departments_label': ('django.db.models.fields.TextField', [], {'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'}), - 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'scientist_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'signatory_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'treatment_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.historicaloperation': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOperation'}, - 'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'cira_rapporteur_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'code_patriarche': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), - 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'report_processing_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'scientist_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, - 'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'code_patriarche': ('django.db.models.fields.TextField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'operation_collaborator'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Person']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), - 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), - 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operationbydepartment': { - 'Meta': {'object_name': 'OperationByDepartment', 'db_table': "'operation_department'", 'managed': 'False'}, - 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Operation']"}) - }, - 'archaeological_operations.operationsource': { - 'Meta': {'object_name': 'OperationSource'}, - 'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operationsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}), - 'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_operations.Operation']"}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) - }, - 'archaeological_operations.operationtypeold': { - 'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationTypeOld'}, - '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'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', '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_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.parcelowner': { - 'Meta': {'object_name': 'ParcelOwner'}, - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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_archaeological_operations_parcelowner'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcel_owner'", 'to': "orm['ishtar_common.Person']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owners'", 'to': "orm['archaeological_operations.Parcel']"}), - 'start_date': ('django.db.models.fields.DateField', [], {}) - }, - 'archaeological_operations.period': { - 'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.recordrelations': { - 'Meta': {'ordering': "('left_record', 'relation_type')", 'object_name': 'RecordRelations'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_operations.Operation']"}), - 'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.RelationType']"}), - 'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_operations.Operation']"}) - }, - 'archaeological_operations.relationtype': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, - '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'}), - 'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.RelationType']", 'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, - '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'}) - }, - 'archaeological_operations.reportstate': { - 'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, - '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', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_warehouse.container': { - 'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('index', 'location'),)", 'object_name': 'Container'}, - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cached_location': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), - 'external_id': ('django.db.models.fields.TextField', [], {'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_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_container'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_warehouse.containertype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ContainerType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_warehouse.warehouse': { - 'Meta': {'object_name': 'Warehouse'}, - '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'}), - 'associated_divisions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']", 'symmetrical': 'False', 'through': "orm['archaeological_warehouse.WarehouseDivisionLink']", 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'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'}), - 'external_id': ('django.db.models.fields.TextField', [], {'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_archaeological_warehouse_warehouse'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'warehouse_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - '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'}), - 'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) - }, - 'archaeological_warehouse.warehousedivision': { - 'Meta': {'object_name': 'WarehouseDivision'}, - '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'}) - }, - 'archaeological_warehouse.warehousedivisionlink': { - 'Meta': {'ordering': "('warehouse', 'order')", 'unique_together': "(('warehouse', 'division'),)", 'object_name': 'WarehouseDivisionLink'}, - 'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}), - 'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}) - }, - 'archaeological_warehouse.warehousetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'WarehouseType'}, - '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'}) - }, - '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': {'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.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.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.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.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.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.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.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 = ['archaeological_operations']
\ No newline at end of file diff --git a/archaeological_operations/migrations/0069_auto__chg_field_operationsource_external_id.py b/archaeological_operations/migrations/0069_auto__chg_field_operationsource_external_id.py deleted file mode 100644 index 3ad5be00b..000000000 --- a/archaeological_operations/migrations/0069_auto__chg_field_operationsource_external_id.py +++ /dev/null @@ -1,846 +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): - - # Changing field 'OperationSource.external_id' - db.alter_column('archaeological_operations_operationsource', 'external_id', self.gf('django.db.models.fields.TextField')(max_length=300, null=True)) - - def backwards(self, orm): - - # Changing field 'OperationSource.external_id' - db.alter_column('archaeological_operations_operationsource', 'external_id', self.gf('django.db.models.fields.CharField')(max_length=12, null=True)) - - models = { - 'archaeological_files.file': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - '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'}), - 'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), - 'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), - 'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, - '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'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, - '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'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), - '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'}) - }, - 'archaeological_finds.treatment': { - 'Meta': {'unique_together': "(('year', 'index'),)", 'object_name': 'Treatment'}, - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']", 'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'estimated_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), - 'goal': ('django.db.models.fields.TextField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_finds_treatment'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'insurance_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']", 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'other_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'quoted_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'realized_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'target_is_basket': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'treatment_state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentState']", 'null': 'True', 'blank': 'True'}), - 'treatment_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_finds.TreatmentType']", 'symmetrical': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_finds.treatmentfile': { - 'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('year', 'index'),)", 'object_name': 'TreatmentFile'}, - 'applicant': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'applicant_organisation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', '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_archaeological_finds_treatmentfile'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentFileType']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_finds.treatmentfiletype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentFileType'}, - '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'}) - }, - 'archaeological_finds.treatmentstate': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentState'}, - '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'}) - }, - 'archaeological_finds.treatmenttype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'downstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - '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'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentType']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'upstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'virtual': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'archaeological_operations.acttype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ActType'}, - 'associated_template': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'acttypes'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.DocumentTemplate']"}), - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'indexed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.administrativeact': { - 'Meta': {'ordering': "('year', 'signature_date', 'index', 'act_type')", 'object_name': 'AdministrativeAct'}, - 'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'departments_label': ('django.db.models.fields.TextField', [], {'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_archaeological_operations_administrativeact'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operation_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'signatory'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), - 'treatment_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.archaeologicalsite': { - 'Meta': {'object_name': 'ArchaeologicalSite'}, - '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_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.historicaladministrativeact': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalAdministrativeAct'}, - 'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'act_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'departments_label': ('django.db.models.fields.TextField', [], {'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'}), - 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'scientist_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'signatory_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'treatment_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.historicaloperation': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOperation'}, - 'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'cira_rapporteur_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'code_patriarche': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), - 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'report_processing_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'scientist_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, - 'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'code_patriarche': ('django.db.models.fields.TextField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'operation_collaborator'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Person']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), - 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), - 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operationbydepartment': { - 'Meta': {'object_name': 'OperationByDepartment', 'db_table': "'operation_department'", 'managed': 'False'}, - 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Operation']"}) - }, - 'archaeological_operations.operationsource': { - 'Meta': {'object_name': 'OperationSource'}, - 'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operationsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_operations.Operation']"}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) - }, - 'archaeological_operations.operationtypeold': { - 'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationTypeOld'}, - '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'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', '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_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.parcelowner': { - 'Meta': {'object_name': 'ParcelOwner'}, - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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_archaeological_operations_parcelowner'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcel_owner'", 'to': "orm['ishtar_common.Person']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owners'", 'to': "orm['archaeological_operations.Parcel']"}), - 'start_date': ('django.db.models.fields.DateField', [], {}) - }, - 'archaeological_operations.period': { - 'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.recordrelations': { - 'Meta': {'ordering': "('left_record', 'relation_type')", 'object_name': 'RecordRelations'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_operations.Operation']"}), - 'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.RelationType']"}), - 'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_operations.Operation']"}) - }, - 'archaeological_operations.relationtype': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, - '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'}), - 'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.RelationType']", 'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, - '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'}) - }, - 'archaeological_operations.reportstate': { - 'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, - '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', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_warehouse.container': { - 'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('index', 'location'),)", 'object_name': 'Container'}, - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cached_location': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), - 'external_id': ('django.db.models.fields.TextField', [], {'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_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - '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'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_warehouse_container'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_warehouse.containertype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ContainerType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'volume': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_warehouse.warehouse': { - 'Meta': {'object_name': 'Warehouse'}, - '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'}), - 'associated_divisions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']", 'symmetrical': 'False', 'through': "orm['archaeological_warehouse.WarehouseDivisionLink']", 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'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'}), - 'external_id': ('django.db.models.fields.TextField', [], {'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_archaeological_warehouse_warehouse'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'warehouse_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - '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'}), - 'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) - }, - 'archaeological_warehouse.warehousedivision': { - 'Meta': {'object_name': 'WarehouseDivision'}, - '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'}) - }, - 'archaeological_warehouse.warehousedivisionlink': { - 'Meta': {'ordering': "('warehouse', 'order')", 'unique_together': "(('warehouse', 'division'),)", 'object_name': 'WarehouseDivisionLink'}, - 'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}), - 'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}) - }, - 'archaeological_warehouse.warehousetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'WarehouseType'}, - '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'}) - }, - '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': {'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.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.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.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.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.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.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.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 = ['archaeological_operations']
\ No newline at end of file diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index c4fd0d96e..54ed96cec 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2012-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-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 @@ -24,6 +24,7 @@ from django.conf import settings from django.contrib.gis.db import models from django.core.cache import cache from django.core.urlresolvers import reverse +from django.db import IntegrityError, transaction from django.db.models import Q, Count, Sum, Max, Avg from django.db.models.signals import post_save, m2m_changed, post_delete from django.forms import ValidationError @@ -37,7 +38,7 @@ from ishtar_common.models import GeneralType, BaseHistorizedItem, \ SourceType, Person, Organization, Town, Dashboard, IshtarUser, ValueGetter,\ DocumentTemplate, ShortMenuItem, DashboardFormItem, GeneralRelationType,\ GeneralRecordRelations, post_delete_record_relation, OperationType, \ - get_external_id, ImageModel, post_save_cache + ImageModel, post_save_cache class RemainType(GeneralType): @@ -86,24 +87,24 @@ class ArchaeologicalSite(BaseHistorizedItem): name = models.CharField(_(u"Name"), max_length=200, null=True, blank=True) periods = models.ManyToManyField(Period, verbose_name=_(u"Periods"), - blank=True, null=True) + blank=True) remains = models.ManyToManyField("RemainType", verbose_name=_(u'Remains'), - blank=True, null=True) + blank=True) class Meta: verbose_name = _(u"Archaeological site") verbose_name_plural = _(u"Archaeological sites") permissions = ( ("view_archaeologicalsite", - ugettext(u"Can view all Archaeological sites")), + u"Can view all Archaeological sites"), ("view_own_archaeologicalsite", - ugettext(u"Can view own Archaeological site")), + u"Can view own Archaeological site"), ("add_own_archaeologicalsite", - ugettext(u"Can add own Archaeological site")), + u"Can add own Archaeological site"), ("change_own_archaeologicalsite", - ugettext(u"Can change own Archaeological site")), + u"Can change own Archaeological site"), ("delete_own_archaeologicalsite", - ugettext(u"Can delete own Archaeological site")), + u"Can delete own Archaeological site"), ) def __unicode__(self): @@ -179,7 +180,6 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, SHOW_URL = 'show-operation' TABLE_COLS = ['year', 'towns', 'common_name', 'operation_type', 'start_date', 'excavation_end_date', 'remains'] - IMAGE_PREFIX = 'operations/' SLUG = 'operation' # search parameters @@ -270,7 +270,7 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, on_delete=models.SET_NULL, related_name='operation_responsability') collaborators = models.ManyToManyField( - Person, blank=True, null=True, verbose_name=_(u"Collaborators"), + Person, blank=True, verbose_name=_(u"Collaborators"), related_name='operation_collaborator' ) year = models.IntegerField(_(u"Year"), null=True, blank=True) @@ -284,13 +284,13 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, verbose_name=_(u"Operation type")) surface = models.IntegerField(_(u"Surface (m2)"), blank=True, null=True) remains = models.ManyToManyField("RemainType", verbose_name=_(u'Remains'), - null=True, blank=True) + blank=True) towns = models.ManyToManyField(Town, verbose_name=_(u"Towns"), related_name='operations') cost = models.IntegerField(_(u"Cost (euros)"), blank=True, null=True) # preventive periods = models.ManyToManyField(Period, verbose_name=_(u"Periods"), - null=True, blank=True) + blank=True) # preventive scheduled_man_days = models.IntegerField(_(u"Scheduled man-days"), blank=True, null=True) @@ -343,7 +343,7 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, null=True, blank=True) archaeological_sites = models.ManyToManyField( ArchaeologicalSite, verbose_name=_(u"Archaeological sites"), - null=True, blank=True) + blank=True, related_name='operations') virtual_operation = models.BooleanField( _(u"Virtual operation"), default=False, help_text=_( @@ -372,12 +372,12 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, verbose_name = _(u"Operation") verbose_name_plural = _(u"Operations") permissions = ( - ("view_operation", ugettext(u"Can view all Operations")), - ("view_own_operation", ugettext(u"Can view own Operation")), - ("add_own_operation", ugettext(u"Can add own Operation")), - ("change_own_operation", ugettext(u"Can change own Operation")), - ("delete_own_operation", ugettext(u"Can delete own Operation")), - ("close_operation", ugettext(u"Can close Operation")), + ("view_operation", u"Can view all Operations"), + ("view_own_operation", u"Can view own Operation"), + ("add_own_operation", u"Can add own Operation"), + ("change_own_operation", u"Can change own Operation"), + ("delete_own_operation", u"Can delete own Operation"), + ("close_operation", u"Can close Operation"), ) ordering = ('cached_label',) @@ -479,6 +479,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, self.context_record.model.cached_label_bulk_update(operation_id=self.pk) return True + def _get_base_image_path(self): + return u"operation/{}/{}".format( + self.year, self.reference) + def get_town_label(self): lbl = unicode(_('Intercommunal')) if self.towns.count() == 1: @@ -573,12 +577,12 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, return round(float(self.cost) / self.surface, 2) @classmethod - def get_query_owns(cls, user): + def get_query_owns(cls, ishtaruser): return ( - Q(in_charge=user.ishtaruser.person) | - Q(scientist=user.ishtaruser.person) | - Q(collaborators__pk=user.ishtaruser.person.pk) | - Q(history_creator=user)) & Q(end_date__isnull=True) + Q(in_charge=ishtaruser.person) | + Q(scientist=ishtaruser.person) | + Q(collaborators__pk=ishtaruser.person.pk) | + Q(history_creator=ishtaruser.user_ptr)) & Q(end_date__isnull=True) def is_active(self): return not bool(self.end_date) @@ -812,13 +816,19 @@ def operation_post_save(sender, **kwargs): # manage parcel association for parcel in operation.parcels.all(): parcel.copy_to_file() + + # external id update + for parcel in operation.parcels.all(): + parcel.update_external_id(save=True) + + for cr in operation.context_record.all(): + cr.update_external_id(save=True) + + post_save.connect(operation_post_save, sender=Operation) class RelationType(GeneralRelationType): - inverse_relation = models.ForeignKey( - 'RelationType', verbose_name=_(u"Inverse relation"), blank=True, - null=True) class Meta: verbose_name = _(u"Operation relation type") @@ -839,6 +849,7 @@ class RecordRelations(GeneralRecordRelations, models.Model): verbose_name_plural = _(u"Operation record relations") ordering = ('left_record', 'relation_type') + post_delete.connect(post_delete_record_relation, sender=RecordRelations) @@ -846,6 +857,22 @@ class OperationByDepartment(models.Model): """ Database view for dashboard """ + CREATE_SQL = """ + CREATE VIEW operation_department (id, department_id, operation_id) as + select town."id", town."departement_id", + operation_towns."operation_id" + from ishtar_common_town town + inner join archaeological_operations_operation_towns + operation_towns + on operation_towns."town_id"=town."id" + order by town."departement_id"; + CREATE RULE operation_department_delete + AS ON DELETE TO operation_department DO INSTEAD(); + """ + DELETE_SQL = """ + DROP VIEW operation_department; + """ + operation = models.ForeignKey(Operation, verbose_name=_(u"Operation")) department = models.ForeignKey(Department, verbose_name=_(u"Department"), blank=True, null=True) @@ -908,14 +935,16 @@ class OperationSource(Source): @property def code(self): + if not self.index: + return u"{}-".format(self.operation.code_patriarche or '') return u"{}-{:04d}".format(self.operation.code_patriarche or '', self.index) @classmethod - def get_query_owns(cls, user): - return (Q(operation__in_charge=user.ishtaruser.person) | - Q(operation__scientist=user.ishtaruser.person) | - Q(operation__collaborators__pk=user.ishtaruser.person.pk)) \ + def get_query_owns(cls, ishtaruser): + return (Q(operation__in_charge=ishtaruser.person) | + Q(operation__scientist=ishtaruser.person) | + Q(operation__collaborators__pk=ishtaruser.person.pk)) \ & Q(operation__end_date__isnull=True) @@ -929,7 +958,7 @@ class ActType(GeneralType): choices=TYPE) code = models.CharField(_(u"Code"), max_length=10, blank=True, null=True) associated_template = models.ManyToManyField( - DocumentTemplate, blank=True, null=True, + DocumentTemplate, blank=True, verbose_name=_(u"Associated template"), related_name='acttypes') indexed = models.BooleanField(_(u"Indexed"), default=False) @@ -1064,15 +1093,15 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): verbose_name_plural = _(u"Administrative acts") permissions = ( ("view_administrativeact", - ugettext(u"Can view all Administrative acts")), + u"Can view all Administrative acts"), ("view_own_administrativeact", - ugettext(u"Can view own Administrative act")), + u"Can view own Administrative act"), ("add_own_administrativeact", - ugettext(u"Can add own Administrative act")), + u"Can add own Administrative act"), ("change_own_administrativeact", - ugettext(u"Can change own Administrative act")), + u"Can change own Administrative act"), ("delete_own_administrativeact", - ugettext(u"Can delete own Administrative act")), + u"Can delete own Administrative act"), ) def __unicode__(self): @@ -1228,6 +1257,8 @@ def strip_zero(value): class Parcel(LightHistorizedItem): + EXTERNAL_ID_KEY = 'parcel_external_id' + associated_file = models.ForeignKey( 'archaeological_files.File', related_name='parcels', verbose_name=_(u"File"), @@ -1408,13 +1439,6 @@ def parcel_post_save(sender, **kwargs): parcel.delete() return - if not parcel.external_id or parcel.auto_external_id: - external_id = get_external_id('parcel_external_id', parcel) - if external_id != parcel.external_id: - updated = True - parcel._updated_id = True - parcel.auto_external_id = True - parcel.external_id = external_id if updated: parcel.save() return @@ -1429,12 +1453,22 @@ def parcel_post_save(sender, **kwargs): parcel_id=parcel.id) if parcel.operation and parcel.operation.pk and \ - parcel.town not in list(parcel.operation.towns.all()): - parcel.operation.towns.add(parcel.town) + parcel.town not in list(parcel.operation.towns.all()): + try: + # multiple save can cause multiple add + with transaction.atomic(): + parcel.operation.towns.add(parcel.town) + except IntegrityError: + pass if parcel.associated_file and \ - parcel.associated_file.pk and \ - parcel.town not in list(parcel.associated_file.towns.all()): - parcel.associated_file.towns.add(parcel.town) + parcel.associated_file.pk and \ + parcel.town not in list(parcel.associated_file.towns.all()): + try: + # multiple save can cause multiple add + with transaction.atomic(): + parcel.associated_file.towns.add(parcel.town) + except IntegrityError: + pass if parcel.operation and parcel.associated_file: # parcels are copied between files and operations parcel.copy_to_operation() @@ -1455,7 +1489,15 @@ class ParcelOwner(LightHistorizedItem): verbose_name_plural = _(u"Parcel owners") def __unicode__(self): - return self.owner + settings.JOINT + self.parcel + return "{}{}{}".format(self.owner, settings.JOINT, self.parcel) + + @property + def operation(self): + return self.parcel.operation + + @property + def associated_file(self): + return self.parcel.associated_file class OperationDashboard: diff --git a/archaeological_operations/old_migrations/0001_initial.py b/archaeological_operations/old_migrations/0001_initial.py new file mode 100644 index 000000000..c5b4619ab --- /dev/null +++ b/archaeological_operations/old_migrations/0001_initial.py @@ -0,0 +1,655 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + depends_on = (('archaeological_files', '0001_initial.py'), ) + + def forwards(self, orm): + # Adding model 'OperationType' + db.create_table('archaeological_operations_operationtype', ( + ('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('archaeological_operations', ['OperationType']) + + # Adding model 'RemainType' + db.create_table('archaeological_operations_remaintype', ( + ('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('archaeological_operations', ['RemainType']) + + # Adding model 'Period' + db.create_table('archaeological_operations_period', ( + ('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)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + ('start_date', self.gf('django.db.models.fields.IntegerField')()), + ('end_date', self.gf('django.db.models.fields.IntegerField')()), + ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.Period'], null=True, blank=True)), + )) + db.send_create_signal('archaeological_operations', ['Period']) + + # Adding model 'HistoricalOperation' + db.create_table('archaeological_operations_historicaloperation', ( + ('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)), + ('start_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('excavation_end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('in_charge_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('year', self.gf('django.db.models.fields.IntegerField')()), + ('operation_code', self.gf('django.db.models.fields.IntegerField')()), + ('associated_file_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('operation_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('cost', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('scheduled_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('optional_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('effective_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('code_patriarche', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('code_dracar', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), + ('fnap_financing', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), + ('fnap_cost', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('zoning_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('large_area_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('geoarchaeological_context_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('operator_reference', self.gf('django.db.models.fields.CharField')(max_length=20, null=True, blank=True)), + ('common_name', self.gf('django.db.models.fields.CharField')(max_length=120, null=True, blank=True)), + ('comment', self.gf('django.db.models.fields.TextField')(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('archaeological_operations', ['HistoricalOperation']) + + # Adding model 'Operation' + db.create_table('archaeological_operations_operation', ( + ('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'])), + ('start_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('excavation_end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('in_charge', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), + ('year', self.gf('django.db.models.fields.IntegerField')()), + ('operation_code', self.gf('django.db.models.fields.IntegerField')()), + ('associated_file', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='operations', null=True, to=orm['archaeological_files.File'])), + ('operation_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['archaeological_operations.OperationType'])), + ('surface', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('cost', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('scheduled_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('optional_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('effective_man_days', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('code_patriarche', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('code_dracar', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)), + ('fnap_financing', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), + ('fnap_cost', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('zoning_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('large_area_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('geoarchaeological_context_prescription', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('operator_reference', self.gf('django.db.models.fields.CharField')(max_length=20, null=True, blank=True)), + ('common_name', self.gf('django.db.models.fields.CharField')(max_length=120, null=True, blank=True)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + )) + db.send_create_signal('archaeological_operations', ['Operation']) + + # Adding M2M table for field remains on 'Operation' + db.create_table('archaeological_operations_operation_remains', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('operation', models.ForeignKey(orm['archaeological_operations.operation'], null=False)), + ('remaintype', models.ForeignKey(orm['archaeological_operations.remaintype'], null=False)) + )) + db.create_unique('archaeological_operations_operation_remains', ['operation_id', 'remaintype_id']) + + # Adding M2M table for field towns on 'Operation' + db.create_table('archaeological_operations_operation_towns', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('operation', models.ForeignKey(orm['archaeological_operations.operation'], null=False)), + ('town', models.ForeignKey(orm['ishtar_common.town'], null=False)) + )) + db.create_unique('archaeological_operations_operation_towns', ['operation_id', 'town_id']) + + # Adding M2M table for field periods on 'Operation' + db.create_table('archaeological_operations_operation_periods', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('operation', models.ForeignKey(orm['archaeological_operations.operation'], null=False)), + ('period', models.ForeignKey(orm['archaeological_operations.period'], null=False)) + )) + db.create_unique('archaeological_operations_operation_periods', ['operation_id', 'period_id']) + + # Adding model 'OperationSource' + db.create_table('archaeological_operations_operationsource', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), + ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), + ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('operation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_operations.Operation'])), + ('index', self.gf('django.db.models.fields.IntegerField')()), + )) + db.send_create_signal('archaeological_operations', ['OperationSource']) + + # Adding M2M table for field authors on 'OperationSource' + db.create_table('archaeological_operations_operationsource_authors', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('operationsource', models.ForeignKey(orm['archaeological_operations.operationsource'], null=False)), + ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) + )) + db.create_unique('archaeological_operations_operationsource_authors', ['operationsource_id', 'author_id']) + + # Adding model 'ActType' + db.create_table('archaeological_operations_acttype', ( + ('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)), + ('intented_to', self.gf('django.db.models.fields.CharField')(max_length=1)), + )) + db.send_create_signal('archaeological_operations', ['ActType']) + + # Adding model 'HistoricalAdministrativeAct' + db.create_table('archaeological_operations_historicaladministrativeact', ( + ('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)), + ('act_type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('in_charge_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('operator_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('scientific_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('signatory_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('operation_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('associated_file_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('signature_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('act_object', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('ref_sra', self.gf('django.db.models.fields.CharField')(max_length=15)), + ('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('archaeological_operations', ['HistoricalAdministrativeAct']) + + # Adding model 'AdministrativeAct' + db.create_table('archaeological_operations_administrativeact', ( + ('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'])), + ('act_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.ActType'])), + ('in_charge', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), + ('operator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Organization'], null=True, blank=True)), + ('scientific', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), + ('signatory', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['ishtar_common.Person'])), + ('operation', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='administrative_act', null=True, to=orm['archaeological_operations.Operation'])), + ('associated_file', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='administrative_act', null=True, to=orm['archaeological_files.File'])), + ('signature_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('act_object', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('ref_sra', self.gf('django.db.models.fields.CharField')(max_length=15)), + )) + db.send_create_signal('archaeological_operations', ['AdministrativeAct']) + + # Adding model 'Parcel' + db.create_table('archaeological_operations_parcel', ( + ('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'])), + ('history_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), + ('associated_file', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='parcels', null=True, to=orm['archaeological_files.File'])), + ('operation', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='parcels', null=True, to=orm['archaeological_operations.Operation'])), + ('year', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('town', self.gf('django.db.models.fields.related.ForeignKey')(related_name='parcels', to=orm['ishtar_common.Town'])), + ('section', self.gf('django.db.models.fields.CharField')(max_length=4)), + ('parcel_number', self.gf('django.db.models.fields.CharField')(max_length=6)), + )) + db.send_create_signal('archaeological_operations', ['Parcel']) + + # Adding model 'ParcelOwner' + db.create_table('archaeological_operations_parcelowner', ( + ('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'])), + ('history_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), + ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'])), + ('parcel', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.Parcel'])), + ('start_date', self.gf('django.db.models.fields.DateField')()), + ('end_date', self.gf('django.db.models.fields.DateField')()), + )) + db.send_create_signal('archaeological_operations', ['ParcelOwner']) + + + def backwards(self, orm): + # Deleting model 'OperationType' + db.delete_table('archaeological_operations_operationtype') + + # Deleting model 'RemainType' + db.delete_table('archaeological_operations_remaintype') + + # Deleting model 'Period' + db.delete_table('archaeological_operations_period') + + # Deleting model 'HistoricalOperation' + db.delete_table('archaeological_operations_historicaloperation') + + # Deleting model 'Operation' + db.delete_table('archaeological_operations_operation') + + # Removing M2M table for field remains on 'Operation' + db.delete_table('archaeological_operations_operation_remains') + + # Removing M2M table for field towns on 'Operation' + db.delete_table('archaeological_operations_operation_towns') + + # Removing M2M table for field periods on 'Operation' + db.delete_table('archaeological_operations_operation_periods') + + # Deleting model 'OperationSource' + db.delete_table('archaeological_operations_operationsource') + + # Removing M2M table for field authors on 'OperationSource' + db.delete_table('archaeological_operations_operationsource_authors') + + # Deleting model 'ActType' + db.delete_table('archaeological_operations_acttype') + + # Deleting model 'HistoricalAdministrativeAct' + db.delete_table('archaeological_operations_historicaladministrativeact') + + # Deleting model 'AdministrativeAct' + db.delete_table('archaeological_operations_administrativeact') + + # Deleting model 'Parcel' + db.delete_table('archaeological_operations_parcel') + + # Deleting model 'ParcelOwner' + db.delete_table('archaeological_operations_parcelowner') + + + models = { + 'archaeological_files.file': { + 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), + 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), + 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), + 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), + 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), + 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), + 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) + }, + 'archaeological_files.filetype': { + 'Meta': {'object_name': 'FileType'}, + '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'}) + }, + 'archaeological_files.permittype': { + 'Meta': {'object_name': 'PermitType'}, + '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'}) + }, + 'archaeological_files.saisinetype': { + 'Meta': {'object_name': 'SaisineType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'delay': ('django.db.models.fields.IntegerField', [], {}), + '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'}) + }, + 'archaeological_operations.acttype': { + 'Meta': {'object_name': 'ActType'}, + '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'}), + 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.administrativeact': { + 'Meta': {'object_name': 'AdministrativeAct'}, + 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), + 'operator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), + 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15'}), + 'scientific': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.historicaladministrativeact': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalAdministrativeAct'}, + 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'act_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'associated_file_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'}), + 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15'}), + 'scientific_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'signatory_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.historicaloperation': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOperation'}, + 'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), + 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {}), + 'operation_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), + 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'year': ('django.db.models.fields.IntegerField', [], {}), + 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.operation': { + 'Meta': {'object_name': 'Operation'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'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'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {}), + 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), + 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), + 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), + 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), + 'year': ('django.db.models.fields.IntegerField', [], {}), + 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.operationbydepartment': { + 'Meta': {'object_name': 'OperationByDepartment', 'db_table': "'operation_department'", 'managed': 'False'}, + 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Operation']"}) + }, + 'archaeological_operations.operationsource': { + 'Meta': {'object_name': 'OperationSource'}, + 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'index': ('django.db.models.fields.IntegerField', [], {}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_operations.Operation']"}), + 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) + }, + 'archaeological_operations.operationtype': { + 'Meta': {'object_name': 'OperationType'}, + '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'}) + }, + 'archaeological_operations.parcel': { + 'Meta': {'object_name': 'Parcel'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), + 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6'}), + 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), + 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.parcelowner': { + 'Meta': {'object_name': 'ParcelOwner'}, + 'end_date': ('django.db.models.fields.DateField', [], {}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}), + 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Parcel']"}), + 'start_date': ('django.db.models.fields.DateField', [], {}) + }, + 'archaeological_operations.period': { + 'Meta': {'object_name': 'Period'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.IntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.remaintype': { + 'Meta': {'object_name': 'RemainType'}, + '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'}) + }, + '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.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 = ['archaeological_operations'] diff --git a/archaeological_operations/migrations/0002_views.py b/archaeological_operations/old_migrations/0002_views.py index a9d4e3665..a9d4e3665 100644 --- a/archaeological_operations/migrations/0002_views.py +++ b/archaeological_operations/old_migrations/0002_views.py diff --git a/archaeological_operations/migrations/0003_auto__add_field_operationtype_preventive.py b/archaeological_operations/old_migrations/0003_auto__add_field_operationtype_preventive.py index 4f13d1e9f..4f13d1e9f 100644 --- a/archaeological_operations/migrations/0003_auto__add_field_operationtype_preventive.py +++ b/archaeological_operations/old_migrations/0003_auto__add_field_operationtype_preventive.py diff --git a/archaeological_operations/migrations/0004_auto__chg_field_historicaloperation_year__chg_field_operation_year.py b/archaeological_operations/old_migrations/0004_auto__chg_field_historicaloperation_year__chg_field_operation_year.py index 2747317d3..2747317d3 100644 --- a/archaeological_operations/migrations/0004_auto__chg_field_historicaloperation_year__chg_field_operation_year.py +++ b/archaeological_operations/old_migrations/0004_auto__chg_field_historicaloperation_year__chg_field_operation_year.py diff --git a/archaeological_operations/migrations/0005_auto__chg_field_historicaloperation_operation_code__chg_field_operatio.py b/archaeological_operations/old_migrations/0005_auto__chg_field_historicaloperation_operation_code__chg_field_operatio.py index 5465c9909..5465c9909 100644 --- a/archaeological_operations/migrations/0005_auto__chg_field_historicaloperation_operation_code__chg_field_operatio.py +++ b/archaeological_operations/old_migrations/0005_auto__chg_field_historicaloperation_operation_code__chg_field_operatio.py diff --git a/archaeological_operations/migrations/0006_auto__add_field_operationsource_reference__add_field_operationsource_i.py b/archaeological_operations/old_migrations/0006_auto__add_field_operationsource_reference__add_field_operationsource_i.py index 65a281677..65a281677 100644 --- a/archaeological_operations/migrations/0006_auto__add_field_operationsource_reference__add_field_operationsource_i.py +++ b/archaeological_operations/old_migrations/0006_auto__add_field_operationsource_reference__add_field_operationsource_i.py diff --git a/archaeological_operations/migrations/0007_auto__chg_field_administrativeact_ref_sra__chg_field_historicaladminis.py b/archaeological_operations/old_migrations/0007_auto__chg_field_administrativeact_ref_sra__chg_field_historicaladminis.py index b4b3f9726..b4b3f9726 100644 --- a/archaeological_operations/migrations/0007_auto__chg_field_administrativeact_ref_sra__chg_field_historicaladminis.py +++ b/archaeological_operations/old_migrations/0007_auto__chg_field_administrativeact_ref_sra__chg_field_historicaladminis.py diff --git a/archaeological_operations/migrations/0008_auto__chg_field_operationsource_index__chg_field_operationsource_title.py b/archaeological_operations/old_migrations/0008_auto__chg_field_operationsource_index__chg_field_operationsource_title.py index 5fb8d9ad3..5fb8d9ad3 100644 --- a/archaeological_operations/migrations/0008_auto__chg_field_operationsource_index__chg_field_operationsource_title.py +++ b/archaeological_operations/old_migrations/0008_auto__chg_field_operationsource_index__chg_field_operationsource_title.py diff --git a/archaeological_operations/migrations/0009_auto__add_field_historicaloperation_cached_label__add_field_operation_.py b/archaeological_operations/old_migrations/0009_auto__add_field_historicaloperation_cached_label__add_field_operation_.py index 2a789c5de..2a789c5de 100644 --- a/archaeological_operations/migrations/0009_auto__add_field_historicaloperation_cached_label__add_field_operation_.py +++ b/archaeological_operations/old_migrations/0009_auto__add_field_historicaloperation_cached_label__add_field_operation_.py diff --git a/archaeological_operations/migrations/0010_auto__chg_field_historicaloperation_cached_label__chg_field_operation_.py b/archaeological_operations/old_migrations/0010_auto__chg_field_historicaloperation_cached_label__chg_field_operation_.py index ce6d106be..ce6d106be 100644 --- a/archaeological_operations/migrations/0010_auto__chg_field_historicaloperation_cached_label__chg_field_operation_.py +++ b/archaeological_operations/old_migrations/0010_auto__chg_field_historicaloperation_cached_label__chg_field_operation_.py diff --git a/archaeological_operations/migrations/0011_auto__add_field_historicaloperation_report_delivery_date__add_field_op.py b/archaeological_operations/old_migrations/0011_auto__add_field_historicaloperation_report_delivery_date__add_field_op.py index 78ee2dc3e..78ee2dc3e 100644 --- a/archaeological_operations/migrations/0011_auto__add_field_historicaloperation_report_delivery_date__add_field_op.py +++ b/archaeological_operations/old_migrations/0011_auto__add_field_historicaloperation_report_delivery_date__add_field_op.py diff --git a/archaeological_operations/migrations/0012_auto.py b/archaeological_operations/old_migrations/0012_auto.py index 311f3f3d3..311f3f3d3 100644 --- a/archaeological_operations/migrations/0012_auto.py +++ b/archaeological_operations/old_migrations/0012_auto.py diff --git a/archaeological_operations/migrations/0013_auto__add_field_acttype_code.py b/archaeological_operations/old_migrations/0013_auto__add_field_acttype_code.py index 273c8cd24..273c8cd24 100644 --- a/archaeological_operations/migrations/0013_auto__add_field_acttype_code.py +++ b/archaeological_operations/old_migrations/0013_auto__add_field_acttype_code.py diff --git a/archaeological_operations/migrations/0014_auto__add_archaeologicalsite.py b/archaeological_operations/old_migrations/0014_auto__add_archaeologicalsite.py index 47733dc35..47733dc35 100644 --- a/archaeological_operations/migrations/0014_auto__add_archaeologicalsite.py +++ b/archaeological_operations/old_migrations/0014_auto__add_archaeologicalsite.py diff --git a/archaeological_operations/migrations/0015_auto__add_unique_archaeologicalsite_reference.py b/archaeological_operations/old_migrations/0015_auto__add_unique_archaeologicalsite_reference.py index 3982d3d4d..3982d3d4d 100644 --- a/archaeological_operations/migrations/0015_auto__add_unique_archaeologicalsite_reference.py +++ b/archaeological_operations/old_migrations/0015_auto__add_unique_archaeologicalsite_reference.py diff --git a/archaeological_operations/migrations/0016_auto__add_field_acttype_indexed__add_field_historicaladministrativeact.py b/archaeological_operations/old_migrations/0016_auto__add_field_acttype_indexed__add_field_historicaladministrativeact.py index c5b4ac2ed..c5b4ac2ed 100644 --- a/archaeological_operations/migrations/0016_auto__add_field_acttype_indexed__add_field_historicaladministrativeact.py +++ b/archaeological_operations/old_migrations/0016_auto__add_field_acttype_indexed__add_field_historicaladministrativeact.py diff --git a/archaeological_operations/migrations/0017_rename_in_charge_to_scientist.py b/archaeological_operations/old_migrations/0017_rename_in_charge_to_scientist.py index 30946e383..30946e383 100644 --- a/archaeological_operations/migrations/0017_rename_in_charge_to_scientist.py +++ b/archaeological_operations/old_migrations/0017_rename_in_charge_to_scientist.py diff --git a/archaeological_operations/migrations/0018_auto__add_field_historicaloperation_in_charge_id__add_field_operation_.py b/archaeological_operations/old_migrations/0018_auto__add_field_historicaloperation_in_charge_id__add_field_operation_.py index d5cf3c4bd..d5cf3c4bd 100644 --- a/archaeological_operations/migrations/0018_auto__add_field_historicaloperation_in_charge_id__add_field_operation_.py +++ b/archaeological_operations/old_migrations/0018_auto__add_field_historicaloperation_in_charge_id__add_field_operation_.py diff --git a/archaeological_operations/migrations/0019_auto__add_field_historicaloperation_operator_id__add_field_operation_o.py b/archaeological_operations/old_migrations/0019_auto__add_field_historicaloperation_operator_id__add_field_operation_o.py index 375ac67df..375ac67df 100644 --- a/archaeological_operations/migrations/0019_auto__add_field_historicaloperation_operator_id__add_field_operation_o.py +++ b/archaeological_operations/old_migrations/0019_auto__add_field_historicaloperation_operator_id__add_field_operation_o.py diff --git a/archaeological_operations/migrations/0020_auto__add_field_parcel_history_creator__add_field_historicaloperation_.py b/archaeological_operations/old_migrations/0020_auto__add_field_parcel_history_creator__add_field_historicaloperation_.py index 4614eba32..4614eba32 100644 --- a/archaeological_operations/migrations/0020_auto__add_field_parcel_history_creator__add_field_historicaloperation_.py +++ b/archaeological_operations/old_migrations/0020_auto__add_field_parcel_history_creator__add_field_historicaloperation_.py diff --git a/archaeological_operations/migrations/0021_init_history_creator.py b/archaeological_operations/old_migrations/0021_init_history_creator.py index 5d0f7c780..5d0f7c780 100644 --- a/archaeological_operations/migrations/0021_init_history_creator.py +++ b/archaeological_operations/old_migrations/0021_init_history_creator.py diff --git a/archaeological_operations/migrations/0022_auto__add_field_operationtype_order.py b/archaeological_operations/old_migrations/0022_auto__add_field_operationtype_order.py index 379711ec9..379711ec9 100644 --- a/archaeological_operations/migrations/0022_auto__add_field_operationtype_order.py +++ b/archaeological_operations/old_migrations/0022_auto__add_field_operationtype_order.py diff --git a/archaeological_operations/migrations/0023_add_year_administrativact.py b/archaeological_operations/old_migrations/0023_add_year_administrativact.py index bf1712db4..bf1712db4 100644 --- a/archaeological_operations/migrations/0023_add_year_administrativact.py +++ b/archaeological_operations/old_migrations/0023_add_year_administrativact.py diff --git a/archaeological_operations/migrations/0024_reinit_history_creator.py b/archaeological_operations/old_migrations/0024_reinit_history_creator.py index 8a6b1f819..8a6b1f819 100644 --- a/archaeological_operations/migrations/0024_reinit_history_creator.py +++ b/archaeological_operations/old_migrations/0024_reinit_history_creator.py diff --git a/archaeological_operations/migrations/0025_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py b/archaeological_operations/old_migrations/0025_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py index b30bfc1d5..b30bfc1d5 100644 --- a/archaeological_operations/migrations/0025_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py +++ b/archaeological_operations/old_migrations/0025_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py diff --git a/archaeological_operations/migrations/0026_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py b/archaeological_operations/old_migrations/0026_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py index 0f75dd757..0f75dd757 100644 --- a/archaeological_operations/migrations/0026_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py +++ b/archaeological_operations/old_migrations/0026_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py diff --git a/archaeological_operations/migrations/0027_auto__add_field_historicaloperation_creation_date__add_field_operation.py b/archaeological_operations/old_migrations/0027_auto__add_field_historicaloperation_creation_date__add_field_operation.py index 2a21c1569..2a21c1569 100644 --- a/archaeological_operations/migrations/0027_auto__add_field_historicaloperation_creation_date__add_field_operation.py +++ b/archaeological_operations/old_migrations/0027_auto__add_field_historicaloperation_creation_date__add_field_operation.py diff --git a/archaeological_operations/migrations/0028_init_creation_date.py b/archaeological_operations/old_migrations/0028_init_creation_date.py index 0136fb217..0136fb217 100644 --- a/archaeological_operations/migrations/0028_init_creation_date.py +++ b/archaeological_operations/old_migrations/0028_init_creation_date.py diff --git a/archaeological_operations/migrations/0029_auto__chg_field_historicaloperation_creation_date__chg_field_operation.py b/archaeological_operations/old_migrations/0029_auto__chg_field_historicaloperation_creation_date__chg_field_operation.py index d5b36444a..d5b36444a 100644 --- a/archaeological_operations/migrations/0029_auto__chg_field_historicaloperation_creation_date__chg_field_operation.py +++ b/archaeological_operations/old_migrations/0029_auto__chg_field_historicaloperation_creation_date__chg_field_operation.py diff --git a/archaeological_operations/migrations/0030_auto__chg_field_parcel_history_creator__chg_field_parcel_history_modif.py b/archaeological_operations/old_migrations/0030_auto__chg_field_parcel_history_creator__chg_field_parcel_history_modif.py index 07e168a33..07e168a33 100644 --- a/archaeological_operations/migrations/0030_auto__chg_field_parcel_history_creator__chg_field_parcel_history_modif.py +++ b/archaeological_operations/old_migrations/0030_auto__chg_field_parcel_history_creator__chg_field_parcel_history_modif.py diff --git a/archaeological_operations/migrations/0031_auto__add_field_parcel_address.py b/archaeological_operations/old_migrations/0031_auto__add_field_parcel_address.py index 05554006c..05554006c 100644 --- a/archaeological_operations/migrations/0031_auto__add_field_parcel_address.py +++ b/archaeological_operations/old_migrations/0031_auto__add_field_parcel_address.py diff --git a/archaeological_operations/migrations/0032_auto__add_field_operationsource_support_type__add_field_operationsourc.py b/archaeological_operations/old_migrations/0032_auto__add_field_operationsource_support_type__add_field_operationsourc.py index 3a4932c86..3a4932c86 100644 --- a/archaeological_operations/migrations/0032_auto__add_field_operationsource_support_type__add_field_operationsourc.py +++ b/archaeological_operations/old_migrations/0032_auto__add_field_operationsource_support_type__add_field_operationsourc.py diff --git a/archaeological_operations/migrations/0033_auto__add_field_parcel_external_id.py b/archaeological_operations/old_migrations/0033_auto__add_field_parcel_external_id.py index 1d0e2f4ab..1d0e2f4ab 100644 --- a/archaeological_operations/migrations/0033_auto__add_field_parcel_external_id.py +++ b/archaeological_operations/old_migrations/0033_auto__add_field_parcel_external_id.py diff --git a/archaeological_operations/migrations/0034_auto__add_field_operationsource_external_id.py b/archaeological_operations/old_migrations/0034_auto__add_field_operationsource_external_id.py index 6c982967a..6c982967a 100644 --- a/archaeological_operations/migrations/0034_auto__add_field_operationsource_external_id.py +++ b/archaeological_operations/old_migrations/0034_auto__add_field_operationsource_external_id.py diff --git a/archaeological_operations/migrations/0035_auto.py b/archaeological_operations/old_migrations/0035_auto.py index 5fde976e9..5fde976e9 100644 --- a/archaeological_operations/migrations/0035_auto.py +++ b/archaeological_operations/old_migrations/0035_auto.py diff --git a/archaeological_operations/migrations/0036_auto.py b/archaeological_operations/old_migrations/0036_auto.py index af1df3887..af1df3887 100644 --- a/archaeological_operations/migrations/0036_auto.py +++ b/archaeological_operations/old_migrations/0036_auto.py diff --git a/archaeological_operations/migrations/0037_auto__chg_field_parcel_parcel_number__chg_field_operationtype_txt_idx_.py b/archaeological_operations/old_migrations/0037_auto__chg_field_parcel_parcel_number__chg_field_operationtype_txt_idx_.py index aa023a7eb..aa023a7eb 100644 --- a/archaeological_operations/migrations/0037_auto__chg_field_parcel_parcel_number__chg_field_operationtype_txt_idx_.py +++ b/archaeological_operations/old_migrations/0037_auto__chg_field_parcel_parcel_number__chg_field_operationtype_txt_idx_.py diff --git a/archaeological_operations/migrations/0038_auto__add_unique_operation_code_patriarche.py b/archaeological_operations/old_migrations/0038_auto__add_unique_operation_code_patriarche.py index 738aa011d..738aa011d 100644 --- a/archaeological_operations/migrations/0038_auto__add_unique_operation_code_patriarche.py +++ b/archaeological_operations/old_migrations/0038_auto__add_unique_operation_code_patriarche.py diff --git a/archaeological_operations/migrations/0039_auto__add_recordrelations__add_relationtype.py b/archaeological_operations/old_migrations/0039_auto__add_recordrelations__add_relationtype.py index ba75d27ad..ba75d27ad 100644 --- a/archaeological_operations/migrations/0039_auto__add_recordrelations__add_relationtype.py +++ b/archaeological_operations/old_migrations/0039_auto__add_recordrelations__add_relationtype.py diff --git a/archaeological_operations/migrations/0040_auto__chg_field_parcel_external_id.py b/archaeological_operations/old_migrations/0040_auto__chg_field_parcel_external_id.py index ebdb74ebd..ebdb74ebd 100644 --- a/archaeological_operations/migrations/0040_auto__chg_field_parcel_external_id.py +++ b/archaeological_operations/old_migrations/0040_auto__chg_field_parcel_external_id.py diff --git a/archaeological_operations/migrations/0041_rename_ope_type_2_ope_type_old.py b/archaeological_operations/old_migrations/0041_rename_ope_type_2_ope_type_old.py index f50ae07ad..f50ae07ad 100644 --- a/archaeological_operations/migrations/0041_rename_ope_type_2_ope_type_old.py +++ b/archaeological_operations/old_migrations/0041_rename_ope_type_2_ope_type_old.py diff --git a/archaeological_operations/migrations/0042_rename_ope_type_2_ope_type_old_2.py b/archaeological_operations/old_migrations/0042_rename_ope_type_2_ope_type_old_2.py index dc2b6e1a6..dc2b6e1a6 100644 --- a/archaeological_operations/migrations/0042_rename_ope_type_2_ope_type_old_2.py +++ b/archaeological_operations/old_migrations/0042_rename_ope_type_2_ope_type_old_2.py diff --git a/archaeological_operations/migrations/0043_auto__add_field_historicaladministrativeact_departments_label__add_fie.py b/archaeological_operations/old_migrations/0043_auto__add_field_historicaladministrativeact_departments_label__add_fie.py index 30a5a6073..30a5a6073 100644 --- a/archaeological_operations/migrations/0043_auto__add_field_historicaladministrativeact_departments_label__add_fie.py +++ b/archaeological_operations/old_migrations/0043_auto__add_field_historicaladministrativeact_departments_label__add_fie.py diff --git a/archaeological_operations/migrations/0044_auto__add_field_historicaloperation_virtual_operation__add_field_histo.py b/archaeological_operations/old_migrations/0044_auto__add_field_historicaloperation_virtual_operation__add_field_histo.py index 0c18442ad..0c18442ad 100644 --- a/archaeological_operations/migrations/0044_auto__add_field_historicaloperation_virtual_operation__add_field_histo.py +++ b/archaeological_operations/old_migrations/0044_auto__add_field_historicaloperation_virtual_operation__add_field_histo.py diff --git a/archaeological_operations/migrations/0045_auto__chg_field_historicaloperation_common_name__chg_field_operation_c.py b/archaeological_operations/old_migrations/0045_auto__chg_field_historicaloperation_common_name__chg_field_operation_c.py index fd907b595..fd907b595 100644 --- a/archaeological_operations/migrations/0045_auto__chg_field_historicaloperation_common_name__chg_field_operation_c.py +++ b/archaeological_operations/old_migrations/0045_auto__chg_field_historicaloperation_common_name__chg_field_operation_c.py diff --git a/archaeological_operations/migrations/0046_auto__add_reportstate__add_field_historicaloperation_report_processing.py b/archaeological_operations/old_migrations/0046_auto__add_reportstate__add_field_historicaloperation_report_processing.py index dc45a5485..dc45a5485 100644 --- a/archaeological_operations/migrations/0046_auto__add_reportstate__add_field_historicaloperation_report_processing.py +++ b/archaeological_operations/old_migrations/0046_auto__add_reportstate__add_field_historicaloperation_report_processing.py diff --git a/archaeological_operations/migrations/0047_auto__add_field_operationsource_duplicate__chg_field_operationsource_i.py b/archaeological_operations/old_migrations/0047_auto__add_field_operationsource_duplicate__chg_field_operationsource_i.py index c31f53436..c31f53436 100644 --- a/archaeological_operations/migrations/0047_auto__add_field_operationsource_duplicate__chg_field_operationsource_i.py +++ b/archaeological_operations/old_migrations/0047_auto__add_field_operationsource_duplicate__chg_field_operationsource_i.py diff --git a/archaeological_operations/migrations/0048_auto__add_field_operationsource_receipt_date_in_documentation.py b/archaeological_operations/old_migrations/0048_auto__add_field_operationsource_receipt_date_in_documentation.py index 90a2fc415..90a2fc415 100644 --- a/archaeological_operations/migrations/0048_auto__add_field_operationsource_receipt_date_in_documentation.py +++ b/archaeological_operations/old_migrations/0048_auto__add_field_operationsource_receipt_date_in_documentation.py diff --git a/archaeological_operations/migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py b/archaeological_operations/old_migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py index 3bdc0e750..3bdc0e750 100644 --- a/archaeological_operations/migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py +++ b/archaeological_operations/old_migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py diff --git a/archaeological_operations/migrations/0050_auto__chg_field_historicaloperation_code_dracar__chg_field_operation_c.py b/archaeological_operations/old_migrations/0050_auto__chg_field_historicaloperation_code_dracar__chg_field_operation_c.py index 0ce1008ce..0ce1008ce 100644 --- a/archaeological_operations/migrations/0050_auto__chg_field_historicaloperation_code_dracar__chg_field_operation_c.py +++ b/archaeological_operations/old_migrations/0050_auto__chg_field_historicaloperation_code_dracar__chg_field_operation_c.py diff --git a/archaeological_operations/migrations/0051_auto__add_field_historicaloperation_point__add_field_historicaloperati.py b/archaeological_operations/old_migrations/0051_auto__add_field_historicaloperation_point__add_field_historicaloperati.py index 3157e0d54..3157e0d54 100644 --- a/archaeological_operations/migrations/0051_auto__add_field_historicaloperation_point__add_field_historicaloperati.py +++ b/archaeological_operations/old_migrations/0051_auto__add_field_historicaloperation_point__add_field_historicaloperati.py diff --git a/archaeological_operations/migrations/0052_auto__add_field_relationtype_short_label.py b/archaeological_operations/old_migrations/0052_auto__add_field_relationtype_short_label.py index 8e39337a3..8e39337a3 100644 --- a/archaeological_operations/migrations/0052_auto__add_field_relationtype_short_label.py +++ b/archaeological_operations/old_migrations/0052_auto__add_field_relationtype_short_label.py diff --git a/archaeological_operations/migrations/0053_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py b/archaeological_operations/old_migrations/0053_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py index b3edcfa72..b3edcfa72 100644 --- a/archaeological_operations/migrations/0053_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py +++ b/archaeological_operations/old_migrations/0053_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py diff --git a/archaeological_operations/migrations/0054_auto__add_field_parcel_auto_external_id.py b/archaeological_operations/old_migrations/0054_auto__add_field_parcel_auto_external_id.py index e2c0b2340..e2c0b2340 100644 --- a/archaeological_operations/migrations/0054_auto__add_field_parcel_auto_external_id.py +++ b/archaeological_operations/old_migrations/0054_auto__add_field_parcel_auto_external_id.py diff --git a/archaeological_operations/migrations/0055_auto__add_field_parcel_public_domain.py b/archaeological_operations/old_migrations/0055_auto__add_field_parcel_public_domain.py index 90b5b533d..90b5b533d 100644 --- a/archaeological_operations/migrations/0055_auto__add_field_parcel_public_domain.py +++ b/archaeological_operations/old_migrations/0055_auto__add_field_parcel_public_domain.py diff --git a/archaeological_operations/migrations/0056_auto__chg_field_parcel_section.py b/archaeological_operations/old_migrations/0056_auto__chg_field_parcel_section.py index c5c954f45..c5c954f45 100644 --- a/archaeological_operations/migrations/0056_auto__chg_field_parcel_section.py +++ b/archaeological_operations/old_migrations/0056_auto__chg_field_parcel_section.py diff --git a/archaeological_operations/migrations/0057_rename_code_dracar_to_old_code.py b/archaeological_operations/old_migrations/0057_rename_code_dracar_to_old_code.py index 57100315e..57100315e 100644 --- a/archaeological_operations/migrations/0057_rename_code_dracar_to_old_code.py +++ b/archaeological_operations/old_migrations/0057_rename_code_dracar_to_old_code.py diff --git a/archaeological_operations/migrations/0058_auto__add_field_operationsource_image__add_field_operationsource_thumb.py b/archaeological_operations/old_migrations/0058_auto__add_field_operationsource_image__add_field_operationsource_thumb.py index 9dc794c86..9dc794c86 100644 --- a/archaeological_operations/migrations/0058_auto__add_field_operationsource_image__add_field_operationsource_thumb.py +++ b/archaeological_operations/old_migrations/0058_auto__add_field_operationsource_image__add_field_operationsource_thumb.py diff --git a/archaeological_operations/migrations/0059_auto__add_field_historicaloperation_documentation_deadline__add_field_.py b/archaeological_operations/old_migrations/0059_auto__add_field_historicaloperation_documentation_deadline__add_field_.py index 17a1cc7db..17a1cc7db 100644 --- a/archaeological_operations/migrations/0059_auto__add_field_historicaloperation_documentation_deadline__add_field_.py +++ b/archaeological_operations/old_migrations/0059_auto__add_field_historicaloperation_documentation_deadline__add_field_.py diff --git a/archaeological_operations/migrations/0060_auto__add_field_historicaloperation_scientific_documentation_comment__.py b/archaeological_operations/old_migrations/0060_auto__add_field_historicaloperation_scientific_documentation_comment__.py index 76f3e6ac4..76f3e6ac4 100644 --- a/archaeological_operations/migrations/0060_auto__add_field_historicaloperation_scientific_documentation_comment__.py +++ b/archaeological_operations/old_migrations/0060_auto__add_field_historicaloperation_scientific_documentation_comment__.py diff --git a/archaeological_operations/migrations/0061_regenerate_cached_label.py b/archaeological_operations/old_migrations/0061_regenerate_cached_label.py index 91beb8138..91beb8138 100644 --- a/archaeological_operations/migrations/0061_regenerate_cached_label.py +++ b/archaeological_operations/old_migrations/0061_regenerate_cached_label.py diff --git a/archaeological_operations/migrations/0062_auto__chg_field_operationsource_image__chg_field_operationsource_thumb.py b/archaeological_operations/old_migrations/0062_auto__chg_field_operationsource_image__chg_field_operationsource_thumb.py index 528a6533b..528a6533b 100644 --- a/archaeological_operations/migrations/0062_auto__chg_field_operationsource_image__chg_field_operationsource_thumb.py +++ b/archaeological_operations/old_migrations/0062_auto__chg_field_operationsource_image__chg_field_operationsource_thumb.py diff --git a/archaeological_operations/migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py b/archaeological_operations/old_migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py index 9ceffa8a3..9ceffa8a3 100644 --- a/archaeological_operations/migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py +++ b/archaeological_operations/old_migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py diff --git a/archaeological_operations/migrations/0064_fix_old_operationtype.py b/archaeological_operations/old_migrations/0064_fix_old_operationtype.py index 4ea054f65..4ea054f65 100644 --- a/archaeological_operations/migrations/0064_fix_old_operationtype.py +++ b/archaeological_operations/old_migrations/0064_fix_old_operationtype.py diff --git a/archaeological_operations/migrations/0065_auto__add_field_historicaloperation_address__add_field_operation_addre.py b/archaeological_operations/old_migrations/0065_auto__add_field_historicaloperation_address__add_field_operation_addre.py index 8626cfcf4..8626cfcf4 100644 --- a/archaeological_operations/migrations/0065_auto__add_field_historicaloperation_address__add_field_operation_addre.py +++ b/archaeological_operations/old_migrations/0065_auto__add_field_historicaloperation_address__add_field_operation_addre.py diff --git a/archaeological_operations/migrations/0066_regenerate_cached_label.py b/archaeological_operations/old_migrations/0066_regenerate_cached_label.py index 0475b0065..0475b0065 100644 --- a/archaeological_operations/migrations/0066_regenerate_cached_label.py +++ b/archaeological_operations/old_migrations/0066_regenerate_cached_label.py diff --git a/archaeological_operations/migrations/0067_auto.py b/archaeological_operations/old_migrations/0067_auto.py index f09437198..f09437198 100644 --- a/archaeological_operations/migrations/0067_auto.py +++ b/archaeological_operations/old_migrations/0067_auto.py diff --git a/archaeological_operations/old_migrations/__init__.py b/archaeological_operations/old_migrations/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archaeological_operations/old_migrations/__init__.py diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index a475667b1..0d6908374 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -19,12 +19,16 @@ import json import datetime +import StringIO +import zipfile from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse +from django.db.models import Q from django.test.client import Client +from django.contrib.auth.models import User from django.contrib.auth.models import Permission import models @@ -32,7 +36,9 @@ from archaeological_operations import views from ishtar_common.models import OrganizationType, Organization, ItemKey, \ ImporterType, IshtarUser, TargetKey, ImporterModel, IshtarSiteProfile, \ - Town, ImporterColumn, Person, Author, SourceType, AuthorType + Town, ImporterColumn, Person, Author, SourceType, AuthorType, \ + DocumentTemplate, PersonType, TargetKeyGroup +from archaeological_files.models import File, FileType from archaeological_context_records.models import Unit from ishtar_common import forms_common @@ -45,11 +51,46 @@ OPERATION_TOWNS_FIXTURES = \ FILE_FIXTURES = OPERATION_FIXTURES + [ settings.ROOT_PATH + - '../archaeological_files/fixtures/initial_data.json'] + '../archaeological_files/fixtures/initial_data-fr.json'] FILE_TOWNS_FIXTURES = OPERATION_TOWNS_FIXTURES + [ settings.ROOT_PATH + - '../archaeological_files/fixtures/initial_data.json'] + '../archaeological_files/fixtures/initial_data-fr.json'] + + +class FileInit(object): + def login_as_superuser(self): + self.client.login(username='username', password='tralala') + + def create_file(self): + self.extra_models, self.model_list = {}, [] + self.user, created = User.objects.get_or_create(username='username', + is_superuser=True) + self.user.set_password('tralala') + self.user.save() + self.o_user, created = User.objects.get_or_create(username='ousername') + person_type, created = PersonType.objects.get_or_create( + label=u'Test ' u'person type', txt_idx='test_person', + available=True) + self.extra_models['person_type'] = person_type + self.model_list.append(person_type) + + person = models.Person(surname='Surname', name='Name', + history_modifier=self.o_user) + person.save() + self.extra_models['person'] = person + self.model_list.append(person) + + file_type, created = FileType.objects.get_or_create( + label=u'Test file type', txt_idx='test_file', available=True) + self.extra_models['file_type'] = file_type + self.model_list.append(file_type) + + dct = {'year': 2010, 'numeric_reference': 1000, 'file_type': file_type, + 'internal_reference': u'UNIT_testÉ ?', 'in_charge': person, + 'history_modifier': self.o_user, 'total_surface': 10000} + self.item = File(**dct) + self.item.save() class ImportTest(object): @@ -74,14 +115,24 @@ class ImportTest(object): 'rb') file_dict = {'imported_file': SimpleUploadedFile( mcc_operation_file.name, mcc_operation_file.read())} + group, c = TargetKeyGroup.objects.get_or_create(name="My group") post_dict = {'importer_type': mcc_operation.pk, 'skip_lines': 1, - "encoding": 'utf-8'} - form = forms_common.NewImportForm(data=post_dict, files=file_dict) + "encoding": 'utf-8', "name": 'init_ope_import', + "associated_group": group.pk} + form = forms_common.NewImportForm(data=post_dict, files=file_dict, + user=self.user) form.is_valid() return mcc_operation, form def init_ope_targetkey(self, imp): # doing manually connections + q = Q(importer=imp) | Q(user=imp.user) + if imp.associated_group: + q |= Q(group=imp.associated_group) + for ik in ItemKey.objects.filter(q).all(): + ik.delete() + + # target for this import target = TargetKey.objects.filter( target__target='operation_type').order_by('-pk').all()[0] target.value = models.OperationType.objects.get( @@ -90,22 +141,61 @@ class ImportTest(object): target.associated_import = imp target.save() - target2 = TargetKey.objects.get(key='gallo-romain', - associated_import=imp) + # target for all users + tgs = list(TargetKey.objects.filter(key='gallo-romain').all()) + for tg in tgs[1:]: + tg.delete() + target2 = tgs[0] gallo = models.Period.objects.get(txt_idx='gallo-roman') target2.value = gallo.pk target2.is_set = True - target2.associated_import = imp + target2.associated_import = None + target2.associated_group = None + target2.associated_user = None target2.save() - target3 = TargetKey.objects.get(key='age-du-fer', - associated_import=imp) + # target for this user + tgs = list(TargetKey.objects.filter(key='age-du-fer').all()) + for tg in tgs[1:]: + tg.delete() + target3 = tgs[0] iron = models.Period.objects.get(txt_idx='iron_age') target3.value = iron.pk target3.is_set = True - target3.associated_import = imp + target3.associated_import = None + target3.associated_user = self.ishtar_user + target3.associated_group = None target3.save() - return [target, target2, target3] + + # target for another user + username, password, user = create_user() + another_user = IshtarUser.objects.get(pk=user.pk) + tgs = list(TargetKey.objects.filter(key='neolithik').all()) + for tg in tgs[1:]: + tg.delete() + target4 = tgs[0] + neo = models.Period.objects.get(txt_idx='neolithic') + target4.value = neo.pk + target4.is_set = True + target4.associated_import = None + target4.associated_group = None + target4.associated_user = another_user + target4.save() + + # target for the current group + tgs = list(TargetKey.objects.filter(key='moderne').all()) + for tg in tgs[1:]: + tg.delete() + target5 = tgs[0] + modern = models.Period.objects.get(txt_idx='modern') + target5.value = modern.pk + target5.is_set = True + target5.associated_import = None + target5.associated_user = None + target5.associated_group = imp.associated_group + target5.save() + + return [target, target2, target3, target4, target5] def init_ope(self): importer, form = self.init_ope_import() @@ -124,8 +214,9 @@ class ImportTest(object): file_dict = {'imported_file': SimpleUploadedFile(mcc_file.name, mcc_file.read())} post_dict = {'importer_type': mcc_parcel.pk, 'skip_lines': 1, - "encoding": 'utf-8'} - form = forms_common.NewImportForm(data=post_dict, files=file_dict) + "encoding": 'utf-8', "name": 'init_parcel_import'} + form = forms_common.NewImportForm(data=post_dict, files=file_dict, + user=self.user) form.is_valid() return mcc_parcel, form @@ -145,8 +236,9 @@ class ImportTest(object): file_dict = {'imported_file': SimpleUploadedFile(mcc_file.name, mcc_file.read())} post_dict = {'importer_type': mcc.pk, 'skip_lines': 1, - "encoding": 'utf-8'} - form = forms_common.NewImportForm(data=post_dict, files=file_dict) + "encoding": 'utf-8', "name": 'init_context_record_import'} + form = forms_common.NewImportForm(data=post_dict, files=file_dict, + user=self.user) form.is_valid() return mcc, form @@ -169,8 +261,11 @@ class ImportOperationTest(ImportTest, TestCase): fixtures = OPERATION_TOWNS_FIXTURES def test_mcc_import_operation(self): - first_ope_nb = models.Operation.objects.count() + create_user() # create it before import to have a relevant person + # number first_person_nb = Person.objects.count() + first_ope_nb = models.Operation.objects.count() + importer, form = self.init_ope_import() self.assertTrue(form.is_valid()) impt = form.save(self.ishtar_user) @@ -198,10 +293,13 @@ class ImportOperationTest(ImportTest, TestCase): self.assertEqual(last_ope.name, u"Oppìdum de Paris") self.assertEqual(last_ope.code_patriarche, '4200') self.assertEqual(last_ope.operation_type.txt_idx, 'prog_excavation') - self.assertEqual(last_ope.periods.count(), 2) + + self.assertEqual(last_ope.periods.count(), 3) periods = [period.txt_idx for period in last_ope.periods.all()] self.assertIn('iron_age', periods) self.assertIn('gallo-roman', periods) + # target key set for another user + self.assertNotIn('neolithic', periods) # a second importation will be not possible: no two same patriarche # code @@ -213,7 +311,7 @@ class ImportOperationTest(ImportTest, TestCase): self.init_ope_import('MCC-operations-example-bad-encoding.csv') def test_keys_limitation(self): - # each key association is associated to the import + # each key association associated to the import init_ope_number = models.Operation.objects.count() importer, form = self.init_ope_import() impt = form.save(self.ishtar_user) @@ -222,16 +320,32 @@ class ImportOperationTest(ImportTest, TestCase): importer, form = self.init_ope_import() other_imp = form.save(self.ishtar_user) - # associate with another import - for ik in ItemKey.objects.filter(importer=impt).all(): - ik.importer = other_imp - ik.save() + + # re-associate with another import + q = Q(importer=impt) | Q(user=impt.user) + if impt.associated_group: + q |= Q(group=impt.associated_group) + for ik in ItemKey.objects.filter(q).all(): + ik.delete() + + q = Q(associated_import=impt) | Q(associated_user=impt.user) + if impt.associated_group: + q |= Q(associated_group=impt.associated_group) + for tg in TargetKey.objects.filter(q).all(): + tg.associated_user = None + tg.associated_group = None + tg.associated_import = other_imp + tg.save() impt.importation() current_ope_nb = models.Operation.objects.count() # no new operation self.assertEqual(current_ope_nb, init_ope_number) + for tg in TargetKey.objects.filter(associated_import=other_imp).all(): + tg.associated_import = impt + tg.save() + def test_bad_configuration(self): importer, form = self.init_ope_import() col = ImporterColumn.objects.get(importer_type=importer, col_number=1) @@ -247,7 +361,8 @@ class ImportOperationTest(ImportTest, TestCase): self.assertEqual(len(impt.errors), 2) self.assertTrue( "Importer configuration error" in impt.errors[0]['error'] or - "Erreur de configuration de l\'importeur" in impt.errors[0]['error'] + "Erreur de configuration de l\'importeur" in + impt.errors[0]['error'] ) def test_model_limitation(self): @@ -575,7 +690,9 @@ def create_orga(user): def create_operation(user, orga=None, values={}): - dct = {'year': 2010, 'operation_type_id': 1, + operation_type = models.OperationType.objects.get( + txt_idx="arch_diagnostic") + dct = {'year': 2010, 'operation_type_id': operation_type.pk, 'history_modifier': user} dct.update(values) if orga: @@ -587,11 +704,13 @@ def create_operation(user, orga=None, values={}): class OperationInitTest(object): def create_user(self): username, password, self.user = create_user() + return self.user def get_default_user(self): - if not hasattr(self, 'user') or not self.user: - self.create_user() - return self.user + q = User.objects.filter(is_superuser=False) + if q.count(): + return q.all()[0] + return self.create_user() def create_orgas(self, user=None): if not user: @@ -864,16 +983,37 @@ class OperationTest(TestCase, OperationInitTest): def test_show(self): operation = self.operations[0] + source = models.OperationSource.objects.create( + operation=operation, title="Source title", + source_type=models.SourceType.objects.all()[0] + ) c = Client() + response = c.get(reverse('show-operation', kwargs={'pk': operation.pk})) self.assertEqual(response.status_code, 200) # empty content when not allowed self.assertEqual(response.content, "") + response = c.get(reverse('show-operationsource', + kwargs={'pk': source.pk})) + self.assertEqual(response.status_code, 200) + # empty content when not allowed + self.assertEqual(response.content, "") c.login(username=self.username, password=self.password) response = c.get(reverse('show-operation', kwargs={'pk': operation.pk})) self.assertEqual(response.status_code, 200) self.assertIn('class="sheet"', response.content) + response = c.get(reverse('show-operationsource', + kwargs={'pk': source.pk})) + self.assertEqual(response.status_code, 200) + self.assertIn('class="sheet"', response.content) + + response = c.get(reverse('show-operation', kwargs={'pk': operation.pk, + 'type': 'odt'})) + self.assertEqual(response.status_code, 200) + f = StringIO.StringIO(response.content) + z = zipfile.ZipFile(f) + self.assertIsNone(z.testzip()) class OperationSearchTest(TestCase, OperationInitTest): @@ -978,9 +1118,28 @@ class OperationSearchTest(TestCase, OperationInitTest): self.assertTrue(json.loads(response.content)['total'] == 1) +class DashboardTest(TestCase, OperationInitTest): + fixtures = FILE_FIXTURES + + def setUp(self): + IshtarSiteProfile.objects.get_or_create( + slug='default', active=True) + self.username, self.password, self.user = create_superuser() + self.orgas = self.create_orgas(self.user) + self.operations = self.create_operation(self.user, self.orgas[0]) + + def test_dashboard(self): + url = 'dashboard-operation' + c = Client() + c.login(username=self.username, password=self.password) + + response = c.get(reverse(url)) + self.assertEqual(response.status_code, 200) + + def create_administrativact(user, operation): act_type, created = models.ActType.objects.get_or_create( - txt_idx='act_type') + txt_idx='act_type_O', intented_to='O') dct = {'history_modifier': user, 'act_type': act_type, 'operation': operation, @@ -996,7 +1155,7 @@ class RegisterTest(TestCase, OperationInitTest): def setUp(self): self.username, self.password, self.user = create_superuser() self.operations = self.create_operation(self.user) - self.act_types, self.operations = create_administrativact( + self.act_types, self.admin_acts = create_administrativact( self.user, self.operations[0]) def testSearch(self): @@ -1010,6 +1169,70 @@ class RegisterTest(TestCase, OperationInitTest): response = c.get(reverse('get-administrativeact'), {'indexed': '2'}) self.assertTrue(json.loads(response.content)['total'] == 1) + def test_document_generation(self): + tpl = open( + settings.ROOT_PATH + + '../archaeological_operations/tests/document_reference.odt', + 'rb') + template = SimpleUploadedFile(tpl.name, tpl.read()) + doc = DocumentTemplate.objects.create( + name="Test", + associated_object_name=DocumentTemplate.CLASSNAMES[0][0], + available=True, + template=template + ) + self.act_types[0].associated_template.add(doc) + + c = Client() + data = {'pk': self.admin_acts[0].pk, 'document_template': doc.pk} + response = c.post(reverse('operation-administrativeact-document'), data) + # no result when no authentication + self.assertEqual(response.content, "") + c.login(username=self.username, password=self.password) + response = c.post(reverse('operation-administrativeact-document'), data) + try: + f = StringIO.StringIO(response.content) + z = zipfile.ZipFile(f) + self.assertIsNone(z.testzip()) + content = z.open('content.xml') + self.assertIn('2014-05-12', content.read()) + finally: + content.close() + z.close() + f.close() + + def test_document_migration(self): + fe = FileInit() + fe.create_file() + + from archaeological_files.tests import create_administrativact as ca_fle + ca_fle(self.user, fe.item) + + tpl = open( + settings.ROOT_PATH + + '../ishtar_common/tests/old.odt', + 'rb') + template = SimpleUploadedFile(tpl.name, tpl.read()) + doc = DocumentTemplate.objects.create( + name="Old", + associated_object_name=DocumentTemplate.CLASSNAMES[0][0], + available=True, + template=template + ) + self.act_types[0].associated_template.add(doc) + + doc.convert_from_v1() + with open(doc.template.path) as f: + try: + z = zipfile.ZipFile(f) + self.assertIsNone(z.testzip()) + c = z.open('content.xml') + content = c.read() + self.assertIn('{{ adminact_operator_id }}', content) + finally: + c.close() + z.close() + class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase): fixtures = FILE_FIXTURES @@ -1020,31 +1243,48 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase): FormData( "Create a preventive diag", form_datas={ - 'filechoice-operation_creation': {}, - 'general-operation_creation': { - 'operation_type': 1, # preventive diag + 'filechoice': {}, + 'general': { + 'code_patriarche': 'codeope1', + 'operation_type': None, 'year': 2016}, - 'townsgeneral-operation_creation': [], - 'parcelsgeneral-operation_creation': [], + 'townsgeneral': [], + 'parcelsgeneral': [], }, ignored=('towns-operation_creation', 'parcels-operation_creation', - 'preventive-operation_creation',) + 'preventive-operation_creation') ), FormData( "Create another preventive diag with same parcel name", form_datas={ - 'filechoice-operation_creation': {}, - 'general-operation_creation': { - 'operation_type': 1, # preventive diag + 'filechoice': {}, + 'general': { + 'code_patriarche': 'codeope2', + 'operation_type': None, 'year': 2016}, - 'townsgeneral-operation_creation': [], - 'parcelsgeneral-operation_creation': [], + 'townsgeneral': [], + 'parcelsgeneral': [], }, ignored=('towns-operation_creation', 'parcels-operation_creation', - 'preventive-operation_creation',) - ) + 'preventive-operation_creation') + ), + FormData( + "Create an operation related to a file", + form_datas={ + 'filechoice': {}, + 'general': { + 'code_patriarche': 'codeope3', + 'operation_type': None, + 'year': 2016}, + 'towns': [], + 'parcels': [], + }, + ignored=('townsgeneral-operation_creation', + 'parcelsgeneral-operation_creation', + 'preventive-operation_creation') + ), ] def pre_wizard(self): @@ -1053,31 +1293,59 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase): profile.files = True profile.save() - if 'townsgeneral-operation_creation' not in \ + if 'townsgeneral' not in \ self.form_datas[0].form_datas: return super(OperationWizardCreationTest, self).pre_wizard() town = self.create_towns()[0] town_data = {'town': town.pk} self.form_datas[0].form_datas[ - 'townsgeneral-operation_creation'].append(town_data) + 'townsgeneral'].append(town_data) self.form_datas[1].form_datas[ - 'townsgeneral-operation_creation'].append(town_data) + 'townsgeneral'].append(town_data) parcel_data = { 'town': town.pk, 'year': 2017, 'section': 'S', 'parcel_number': '42'} self.form_datas[0].form_datas[ - 'parcelsgeneral-operation_creation'].append(parcel_data) + 'parcelsgeneral'].append(parcel_data) self.form_datas[1].form_datas[ - 'parcelsgeneral-operation_creation'].append(parcel_data) + 'parcelsgeneral'].append(parcel_data) + + FI = FileInit() + FI.create_file() + file = FI.item + file.towns.add(town) + parcel = models.Parcel.objects.create( + town=town, year=2017, section='G', parcel_number='43' + ) + file.parcels.add(parcel) + self.form_datas[2].set('filechoice', 'associated_file', file.pk) + self.form_datas[2].append('towns', town_data) + self.form_datas[2].append('parcels', {'parcel': parcel.pk}) + + # diagnostic + ope_type = models.OperationType.objects.get(txt_idx='arch_diagnostic') + self.form_datas[0].set('general', 'operation_type', ope_type.pk) + self.form_datas[1].set('general', 'operation_type', ope_type.pk) + self.form_datas[2].set('general', 'operation_type', ope_type.pk) + self.operation_number = models.Operation.objects.count() self.parcel_number = models.Parcel.objects.count() super(OperationWizardCreationTest, self).pre_wizard() def post_wizard(self): self.assertEqual(models.Operation.objects.count(), - self.operation_number + 2) + self.operation_number + 3) + operations = models.Operation.objects.order_by("-pk").all()[:3] + + parcel_ids = [] + for operation in operations: + for parcel in operation.parcels.all(): + parcel_ids.append(parcel.external_id) + self.assertEqual(list(sorted(parcel_ids)), + ['codeope1-12345-S42', 'codeope2-12345-S42', + 'codeope3-12345-G43']) self.assertEqual(models.Parcel.objects.count(), - self.parcel_number + 2) + self.parcel_number + 3) class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): @@ -1099,36 +1367,37 @@ class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): FormData( "Update an operation", form_datas={ - 'selec-operation_modification': {}, - 'general-operation_modification': { + 'selec': {}, + 'general': { 'operation_type': 2, 'year': 2017}, - 'townsgeneral-operation_modification': [], - 'parcelsgeneral-operation_modification': [], + 'townsgeneral': [], + 'parcelsgeneral': [], }, ignored=base_ignored_steps ), FormData( "Operation: try to remove a parcel with attached context record", form_datas={ - 'selec-operation_modification': {}, - 'general-operation_modification': { + 'selec': {}, + 'general': { + 'code_patriarche': "codeope42", 'operation_type': 2, 'year': 2017}, - 'townsgeneral-operation_modification': [], - 'parcelsgeneral-operation_modification': [], + 'townsgeneral': [], + 'parcelsgeneral': [], }, ignored=base_ignored_steps ), FormData( "Operation: remove a parcel with no attached context record", form_datas={ - 'selec-operation_modification': {}, - 'general-operation_modification': { + 'selec': {}, + 'general': { 'operation_type': 2, 'year': 2017}, - 'townsgeneral-operation_modification': [], - 'parcelsgeneral-operation_modification': [], + 'townsgeneral': [], + 'parcelsgeneral': [], }, ignored=base_ignored_steps ), @@ -1148,33 +1417,40 @@ class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): 'history_modifier': self.get_default_user()} self.cr = ContextRecord.objects.create(**cr_data) + # diagnostic + self.ope_type = models.OperationType.objects.get( + txt_idx='prev_excavation') + self.form_datas[0].set('general', 'operation_type', self.ope_type.pk) + self.form_datas[1].set('general', 'operation_type', self.ope_type.pk) + self.form_datas[2].set('general', 'operation_type', self.ope_type.pk) + data = self.form_datas[0].form_datas data2 = self.form_datas[1].form_datas data3 = self.form_datas[2].form_datas - data['selec-operation_modification']['pk'] = operation.pk - data2['selec-operation_modification']['pk'] = operation.pk - data3['selec-operation_modification']['pk'] = operation.pk + data['selec']['pk'] = operation.pk + data2['selec']['pk'] = operation.pk + data3['selec']['pk'] = operation.pk town = self.create_towns( datas={'numero_insee': '67890', 'name': 'Twin Peaks'})[-1] towns = [{'town': town.pk}, {'town': init_town.pk}] - data['townsgeneral-operation_modification'] = towns - data2['townsgeneral-operation_modification'] = towns - data3['townsgeneral-operation_modification'] = towns + data['townsgeneral'] = towns + data2['townsgeneral'] = towns + data3['townsgeneral'] = towns parcel_data = { 'town': town.pk, 'year': 2017, 'section': 'S', 'parcel_number': '42'} - data['parcelsgeneral-operation_modification'].append(parcel_data) - data2['parcelsgeneral-operation_modification'].append(parcel_data) - data3['parcelsgeneral-operation_modification'].append(parcel_data) + data['parcelsgeneral'].append(parcel_data) + data2['parcelsgeneral'].append(parcel_data) + data3['parcelsgeneral'].append(parcel_data) parcel_data_2 = { 'town': init_parcel.town.pk, 'year': init_parcel.year or '', 'section': init_parcel.section, 'parcel_number': init_parcel.parcel_number} - data['parcelsgeneral-operation_modification'].append(parcel_data_2) + data['parcelsgeneral'].append(parcel_data_2) # no init parcel for data2 and data3 self.operation_number = models.Operation.objects.count() @@ -1185,7 +1461,8 @@ class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): test_object.operation_number) operation = models.Operation.objects.get( pk=test_object.operations[0].pk) - test_object.assertEqual(operation.operation_type.pk, 2) + test_object.assertEqual(operation.operation_type.pk, + self.ope_type.pk) test_object.assertEqual(operation.year, 2017) test_object.assertEqual(models.Parcel.objects.count(), test_object.parcel_number + 1) @@ -1197,7 +1474,8 @@ class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): test_object.operation_number) operation = models.Operation.objects.get( pk=test_object.operations[0].pk) - test_object.assertEqual(operation.operation_type.pk, 2) + test_object.assertEqual(operation.operation_type.pk, + self.ope_type.pk) test_object.assertEqual(operation.year, 2017) test_object.assertEqual(models.Parcel.objects.count(), test_object.parcel_number + 1) @@ -1205,6 +1483,10 @@ class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): # the init parcel is not detached from the operation test_object.assertEqual(operation.parcels.count(), test_object.parcel_number + 1) + # update teh external id on update + cr = ContextRecord.objects.get(pk=self.cr.pk) + test_object.assertEqual(cr.external_id, + "codeope42-12345-A1-Context record") def pre_third_wizard(test_object): parcel_nb = models.Parcel.objects.count() @@ -1217,7 +1499,8 @@ class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): test_object.operation_number) operation = models.Operation.objects.get( pk=test_object.operations[0].pk) - test_object.assertEqual(operation.operation_type.pk, 2) + test_object.assertEqual(operation.operation_type.pk, + self.ope_type.pk) test_object.assertEqual(operation.year, 2017) # with no attach the parcel is deleted test_object.assertEqual(operation.parcels.count(), @@ -1247,7 +1530,7 @@ class OperationWizardDeleteTest(OperationWizardCreationTest): ] def pass_test(self): - if not settings.SOUTH_TESTS_MIGRATE: + if not settings.TEST_VIEWS: # with no migration the views are not created return True @@ -1378,4 +1661,4 @@ class OperationSourceWizardModificationTest(WizardTest, OperationInitTest, def post_wizard(self): source = models.OperationSource.objects.get(pk=self.source.pk) - self.assertEqual(source.authors.count(), 0)
\ No newline at end of file + self.assertEqual(source.authors.count(), 0) diff --git a/archaeological_operations/tests/MCC-operations-example.csv b/archaeological_operations/tests/MCC-operations-example.csv index 3b9801c33..bb8fc3084 100644 --- a/archaeological_operations/tests/MCC-operations-example.csv +++ b/archaeological_operations/tests/MCC-operations-example.csv @@ -1,3 +1,3 @@ code OA,region,type operation,intitule operation,operateur,responsable operation,date debut terrain,date fin terrain,chronologie generale,identifiant document georeferencement,notice scientifique 4201,Bourgogne,Fouille programmée,Oppìdum de Paris 2,L'opérateur,,2000/01/31,2002/12/31,Age du Fer,, -4200,Bourgogne,Fouille programmée,Oppìdum de Paris,L'opérateur,Jean Sui-Resp'on Sablé,2000/01/22,2002/12/31,Age du Fer & Gallo-Romain,, +4200,Bourgogne,Fouille programmée,Oppìdum de Paris,L'opérateur,Jean Sui-Resp'on Sablé,2000/01/22,2002/12/31,Age du Fer & Gallo-Romain & Néolithik & Moderne,, diff --git a/archaeological_operations/tests/document_reference.odt b/archaeological_operations/tests/document_reference.odt Binary files differnew file mode 100755 index 000000000..0097e8b15 --- /dev/null +++ b/archaeological_operations/tests/document_reference.odt diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py index bc6bc4bee..08687ae14 100644 --- a/archaeological_operations/urls.py +++ b/archaeological_operations/urls.py @@ -17,17 +17,16 @@ # See the file COPYING for details. -from django.conf.urls.defaults import * +from django.conf.urls import url from ishtar_common.wizards import check_rights -import views -import models +from archaeological_operations import views +from archaeological_operations import models # be carreful: each check_rights must be relevant with ishtar_menu # forms -urlpatterns = patterns( - '', +urlpatterns = [ url(r'operation_administrativeactop_search/(?P<step>.+)?$', check_rights(['change_administrativeact'])( views.operation_administrativeactop_search_wizard), @@ -90,73 +89,72 @@ urlpatterns = patterns( check_rights(['view_administrativeact', 'view_own_administrativeact'])( views.administrativact_register_wizard), name='administrativact_register'), -) -urlpatterns += patterns( - 'archaeological_operations.views', - url(r'autocomplete-operation/$', 'autocomplete_operation', + url(r'autocomplete-operation/$', views.autocomplete_operation, name='autocomplete-operation'), url(r'get-operation/own/(?P<type>.+)?$', - 'get_operation', name='get-own-operation', + views.get_operation, name='get-own-operation', kwargs={'force_own': True}), - url(r'get-operation/(?P<type>.+)?$', 'get_operation', + url(r'get-operation/(?P<type>.+)?$', views.get_operation, name='get-operation'), url(r'get-operation-full/own/(?P<type>.+)?$', - 'get_operation', name='get-own-operation-full', + views.get_operation, name='get-own-operation-full', kwargs={'full': True, 'force_own': True}), - url(r'get-operation-full/(?P<type>.+)?$', 'get_operation', + url(r'get-operation-full/(?P<type>.+)?$', views.get_operation, name='get-operation-full', kwargs={'full': True}), url(r'get-operation-shortcut/(?P<type>.+)?$', - 'get_operation', name='get-operation-shortcut', + views.get_operation, name='get-operation-shortcut', kwargs={'full': 'shortcut'}), url(r'get-available-operation-code/(?P<year>.+)?$', - 'get_available_operation_code', name='get_available_operation_code'), + views.get_available_operation_code, + name='get_available_operation_code'), url(r'revert-operation/(?P<pk>.+)/(?P<date>.+)$', - 'revert_operation', name='revert-operation'), + views.revert_operation, name='revert-operation'), url(r'show-operation(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_operation', name=models.Operation.SHOW_URL), + views.show_operation, name=models.Operation.SHOW_URL), url(r'show-historized-operation/(?P<pk>.+)?/(?P<date>.+)?$', - 'show_operation', name='show-historized-operation'), + views.show_operation, name='show-historized-operation'), url(r'get-administrativeactop/(?P<type>.+)?$', - 'get_administrativeactop', name='get-administrativeactop'), + views.get_administrativeactop, name='get-administrativeactop'), url(r'get-administrativeact/(?P<type>.+)?$', - 'get_administrativeact', name='get-administrativeact'), + views.get_administrativeact, name='get-administrativeact'), url(r'get-administrativeact-full/(?P<type>.+)?$', - 'get_administrativeact', name='get-administrativeact-full', + views.get_administrativeact, name='get-administrativeact-full', kwargs={'full': True}), url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_administrativeact', name='show-administrativeact'), + views.show_administrativeact, name='show-administrativeact'), # allow specialization for operations url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_administrativeact', name='show-administrativeactop'), + views.show_administrativeact, name='show-administrativeactop'), # allow specialization for files, treatment, treatment request url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_administrativeact', name='show-administrativeactfile'), + views.show_administrativeact, name='show-administrativeactfile'), url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_administrativeact', name='show-administrativeacttreatment'), + views.show_administrativeact, name='show-administrativeacttreatment'), url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_administrativeact', name='show-administrativeacttreatmentfile'), + views.show_administrativeact, + name='show-administrativeacttreatmentfile'), url(r'generatedoc-administrativeactop/(?P<pk>.+)?/(?P<template_pk>.+)?$', - 'generatedoc_administrativeactop', + views.generatedoc_administrativeactop, name='generatedoc-administrativeactop'), url(r'show-operationsource(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_operationsource', name=models.OperationSource.SHOW_URL), + views.show_operationsource, name=models.OperationSource.SHOW_URL), url(r'get-operationsource/(?P<type>.+)?$', - 'get_operationsource', name='get-operationsource'), + views.get_operationsource, name='get-operationsource'), url(r'get-operationsource-full/(?P<type>.+)?$', - 'get_operationsource', name='get-operationsource-full', + views.get_operationsource, name='get-operationsource-full', kwargs={'full': True}), - url(r'dashboard_operation/$', 'dashboard_operation', + url(r'dashboard_operation/$', views.dashboard_operation, name='dashboard-operation'), url(r'autocomplete-archaeologicalsite/$', - 'autocomplete_archaeologicalsite', + views.autocomplete_archaeologicalsite, name='autocomplete-archaeologicalsite'), url(r'new-archaeologicalsite/(?:(?P<parent_name>[^/]+)/)?' r'(?:(?P<limits>[^/]+)/)?$', - 'new_archaeologicalsite', name='new-archaeologicalsite'), - url(r'autocomplete-patriarche/$', 'autocomplete_patriarche', + views.new_archaeologicalsite, name='new-archaeologicalsite'), + url(r'autocomplete-patriarche/$', views.autocomplete_patriarche, name='autocomplete-patriarche'), url(r'operation_administrativeact_document/$', - 'administrativeactfile_document', + views.administrativeactfile_document, name='operation-administrativeact-document'), -) +] diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 6a1340e70..1fecce9cd 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -22,7 +22,7 @@ import json from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponse -from django.shortcuts import render_to_response, redirect +from django.shortcuts import render, redirect from django.utils.translation import ugettext_lazy as _, pgettext_lazy from ishtar_common.views import get_item, show_item, revert_item, new_item @@ -43,9 +43,9 @@ def autocomplete_patriarche(request, non_closed=True): models.Operation) and not request.user.ishtaruser.has_right( 'operation_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(' '): @@ -58,7 +58,7 @@ def autocomplete_patriarche(request, non_closed=True): data = json.dumps([{'id': operation.code_patriarche, 'value': operation.code_patriarche} for operation in operations]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def autocomplete_archaeologicalsite(request): @@ -68,9 +68,9 @@ def autocomplete_archaeologicalsite(request): and not request.user.has_perm( 'archaeological_operations.view_own_archaeologicalsite', models.ArchaeologicalSite)): - 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(' '): @@ -82,7 +82,7 @@ def autocomplete_archaeologicalsite(request): data = json.dumps([{'id': site.pk, 'value': unicode(site)[:60]} for site in sites]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') new_archaeologicalsite = new_item(models.ArchaeologicalSite, ArchaeologicalSiteForm, many=True) @@ -96,9 +96,9 @@ def autocomplete_operation(request, non_closed=True): 'ishtar_common.view_own_operation', models.Operation) and not request.user.ishtaruser.has_right( 'operation_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(' '): @@ -123,7 +123,7 @@ def autocomplete_operation(request, non_closed=True): operations = models.Operation.objects.filter(query)[:limit] data = json.dumps([{'id': operation.pk, 'value': unicode(operation)} for operation in operations]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def get_available_operation_code(request, year=None): @@ -131,10 +131,10 @@ def get_available_operation_code(request, year=None): 'ishtar_common.view_operation', models.Operation)\ and not request.user.has_perm( 'ishtar_common.view_own_operation', models.Operation): - return HttpResponse(mimetype='text/plain') + return HttpResponse(content_type='text/plain') data = json.dumps({'id': models.Operation.get_available_operation_code(year)}) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') get_operation = get_item(models.Operation, 'get_operation', 'operation') @@ -160,8 +160,7 @@ def dashboard_operation(request, *args, **kwargs): Operation dashboard """ dct = {'dashboard': models.OperationDashboard()} - return render_to_response('ishtar/dashboards/dashboard_operation.html', - dct, context_instance=RequestContext(request)) + return render(request, 'ishtar/dashboards/dashboard_operation.html', dct) operation_search_wizard = SearchWizard.as_view( [('general-operation_search', OperationFormSelection)], @@ -413,7 +412,7 @@ def generatedoc_administrativeactop(request, pk, template_pk=None): 'ishtar_common.view_operation', models.Operation) and not request.user.has_perm( 'ishtar_common.view_own_operation', models.Operation)): - return HttpResponse(mimetype='text/plain') + return HttpResponse(content_type='text/plain') try: act_file = models.AdministrativeAct.objects.get(pk=pk) doc = act_file.publish(template_pk) @@ -427,11 +426,11 @@ def generatedoc_administrativeactop(request, pk, template_pk=None): mimetype = 'text/csv' if ext in MIMES: mimetype = MIMES[ext] - response = HttpResponse(open(doc), mimetype=mimetype) + response = HttpResponse(open(doc), content_type=mimetype) response['Content-Disposition'] = 'attachment; filename=%s' % \ doc_name return response - return HttpResponse(mimetype='text/plain') + return HttpResponse(content_type='text/plain') def administrativeactfile_document( @@ -453,6 +452,10 @@ def administrativeactfile_document( AdministrativeActTreatmentFileFormSelection search_form = AdministrativeActTreatmentFileFormSelection document_type = 'TF' + + if not request.user.has_perm('view_administrativeact', + models.AdministrativeAct): + return HttpResponse(content_type='text/plain') dct = {} if request.POST: dct['search_form'] = search_form(request.POST) @@ -478,8 +481,7 @@ def administrativeactfile_document( dct['search_form'] = search_form() dct['template_form'] = DocumentGenerationAdminActForm( document_type=document_type) - return render_to_response('ishtar/administrativeact_document.html', dct, - context_instance=RequestContext(request)) + return render(request, 'ishtar/administrativeact_document.html', dct) def reset_wizards(request): diff --git a/archaeological_operations/widgets.py b/archaeological_operations/widgets.py index bb219ab76..3a587e4fd 100644 --- a/archaeological_operations/widgets.py +++ b/archaeological_operations/widgets.py @@ -19,7 +19,8 @@ from django import forms from django.forms import widgets -from django.template import Context, loader +from django.forms.utils import flatatt +from django.template import loader from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ @@ -57,14 +58,14 @@ class SelectParcelWidget(widgets.TextInput): class OAWidget(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 = widgets.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, 'id': attrs['id'], "safe_id": attrs['id'].replace('-', '_')} t = loader.get_template('ishtar/blocks/OAWidget.html') - rendered = t.render(Context(dct)) + rendered = t.render(dct) return mark_safe(rendered) diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 07206cc18..fffe34ca7 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -23,8 +23,7 @@ from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db.models import Max -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render from django.utils.translation import ugettext_lazy as _ from ishtar_common.forms import reverse_lazy @@ -250,7 +249,7 @@ class OperationWizard(Wizard): post_data = request.POST.copy() # add all parcel from available in the archaeological file - if not post_data.get('add_all_parcels'): + if not post_data.get('add_all_parcels', None): return super(OperationWizard, self).post(*args, **kwargs) file = self.get_current_file() @@ -430,8 +429,7 @@ class OperationAdministrativeActWizard(OperationWizard): self.request.session[self.current_obj_slug] = unicode(admact.pk) self.request.session[self.get_object_name(admact)] = unicode(admact.pk) - res = render_to_response('ishtar/wizard/wizard_done.html', dct, - context_instance=RequestContext(self.request)) + res = render(self.request, 'ishtar/wizard/wizard_done.html', dct) return res @@ -458,9 +456,8 @@ class AdministrativeActDeletionWizard(ClosingWizard): def done(self, form_list, **kwargs): obj = self.get_current_object() obj.delete() - 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', {}) def is_preventive(form_name, model, type_key='operation_type', key=''): @@ -506,7 +503,7 @@ def has_associated_file(form_name, file_key='associated_file', negate=False): 'step_data'][form_name][form_name + '-' + file_key] if type(file_id) in (list, tuple): file_id = file_id[0] - file_id = int(file_id) + int(file_id) return not negate except ValueError: return negate diff --git a/archaeological_warehouse/__init__.py b/archaeological_warehouse/__init__.py index e69de29bb..7a5abf267 100644 --- a/archaeological_warehouse/__init__.py +++ b/archaeological_warehouse/__init__.py @@ -0,0 +1 @@ +default_app_config = 'ishtar_common.apps.ArchaeologicalWarehouseConfig' diff --git a/archaeological_warehouse/admin.py b/archaeological_warehouse/admin.py index 911809d0f..deaffde94 100644 --- a/archaeological_warehouse/admin.py +++ b/archaeological_warehouse/admin.py @@ -17,8 +17,11 @@ # See the file COPYING for details. +from ajax_select import make_ajax_form + from django.contrib import admin +from ishtar_common.apps import admin_site from ishtar_common.admin import HistorizedObjectAdmin, GeneralTypeAdmin import models @@ -29,8 +32,15 @@ class WarehouseAdmin(HistorizedObjectAdmin): list_filter = ('warehouse_type',) search_fields = ('name', 'town') model = models.Warehouse + form = make_ajax_form(model, { + 'town': 'town', + 'person_in_charge': 'person' + }) + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports' + ] -admin.site.register(models.Warehouse, WarehouseAdmin) +admin_site.register(models.Warehouse, WarehouseAdmin) class ContainerTypeAdmin(admin.ModelAdmin): @@ -38,16 +48,24 @@ class ContainerTypeAdmin(admin.ModelAdmin): 'volume') model = models.ContainerType -admin.site.register(models.ContainerType, ContainerTypeAdmin) +admin_site.register(models.ContainerType, ContainerTypeAdmin) -class ContainerAdmin(admin.ModelAdmin): +class ContainerAdmin(HistorizedObjectAdmin): list_display = ('reference', 'location', 'container_type',) list_filter = ("container_type",) model = models.Container + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports', 'history_date' + ] + form = make_ajax_form(model, { + 'location': 'warehouse', + 'responsible': 'warehouse' + }) + -admin.site.register(models.Container, ContainerAdmin) +admin_site.register(models.Container, ContainerAdmin) general_models = [models.WarehouseType, models.WarehouseDivision] for model in general_models: - admin.site.register(model, GeneralTypeAdmin) + admin_site.register(model, GeneralTypeAdmin) diff --git a/archaeological_warehouse/fixtures/initial_data-fr.json b/archaeological_warehouse/fixtures/initial_data-fr.json index d67f8b0a1..9800f1c9b 100644 --- a/archaeological_warehouse/fixtures/initial_data-fr.json +++ b/archaeological_warehouse/fixtures/initial_data-fr.json @@ -1,272 +1,248 @@ [ - { - "pk": 8, - "model": "archaeological_warehouse.containertype", - "fields": { - "comment": "Bac norme Europe plein 20002 - 200X150X118", - "available": true, - "reference": "20002", - "label": "Bac norme Europe plein 20002", - "volume": 3.0, - "width": 150, - "length": 200, - "height": 118, - "txt_idx": "20002" - } - }, - { - "pk": 4, - "model": "archaeological_warehouse.containertype", - "fields": { - "comment": "Caisse Alibert grise standard, a pr\u00e9ciser et d\u00e9cliner en fonction des mod\u00e8les.", - "available": true, - "reference": "a pr\u00e9ciser", - "label": "Caisse Alibert standard", - "volume": 0.0, - "width": 0, - "length": null, - "height": 0, - "txt_idx": "stand_alibert_bin" - } - }, - { - "pk": 5, - "model": "archaeological_warehouse.containertype", - "fields": { - "comment": "", - "available": true, - "reference": "Curver UNIBOX 20 L", - "label": "Curver UNIBOX 20 L", - "volume": 25.0, - "width": 350, - "length": null, - "height": 165, - "txt_idx": "curver_unibox_20" - } - }, - { - "pk": 6, - "model": "archaeological_warehouse.containertype", - "fields": { - "comment": "", - "available": true, - "reference": "Curver UNIBOX 29 L", - "label": "Curver UNIBOX 29 L", - "volume": 37.0, - "width": 355, - "length": null, - "height": 245, - "txt_idx": "curver_unibox_29" - } - }, - { - "pk": 7, - "model": "archaeological_warehouse.containertype", - "fields": { - "comment": "", - "available": true, - "reference": "Curver UNIBOX 48 L", - "label": "Curver UNIBOX 48 L", - "volume": 63.0, - "width": 432, - "length": null, - "height": 280, - "txt_idx": "curver_unibox_48" - } - }, - { - "pk": 9, - "model": "archaeological_warehouse.containertype", - "fields": { - "comment": "Bo\u00eetes herm\u00e9tiques Miflex 8L", - "available": true, - "reference": "Miflex 8L", - "label": "Miflex 8L", - "volume": null, - "width": 21, - "length": 29, - "height": 15, - "txt_idx": "Miflex_8L" - } - }, - { - "pk": 6, - "model": "archaeological_warehouse.warehousetype", - "fields": { - "comment": "Pour le stockage de documents papier, rapports la plupart du temps.", - "available": true, - "txt_idx": "library", - "label": "Biblioth\u00e8que" - } - }, - { - "pk": 2, - "model": "archaeological_warehouse.warehousetype", - "fields": { - "comment": "Ce d\u00e9p\u00f4t est un centre de conservation et d'\u00e9tude. Il est d'ordinaire en convention avec l'\u00c9tat.", - "available": true, - "txt_idx": "cce", - "label": "CCE" - } - }, - { - "pk": 7, - "model": "archaeological_warehouse.warehousetype", - "fields": { - "comment": "Lieu de stockage de documents vari\u00e9s, photos, relev\u00e9s, jusqu'aux rapports.", - "available": true, - "txt_idx": "documentation_center", - "label": "Centre de documentation" - } - }, - { - "pk": 4, - "model": "archaeological_warehouse.warehousetype", - "fields": { - "comment": "Ce d\u00e9p\u00f4t poss\u00e8de une convention avec l'\u00c9tat pour conserver du mobilier qui est sous sa garde.", - "available": true, - "txt_idx": "conventioned_warehouse", - "label": "D\u00e9p\u00f4t conventionn\u00e9" - } - }, - { - "pk": 5, - "model": "archaeological_warehouse.warehousetype", - "fields": { - "comment": "Ce d\u00e9p\u00f4t est sous la responsabilit\u00e9 directe de l'\u00c9tat. Il peut en \u00eatre locataire ou propri\u00e9taire.", - "available": true, - "txt_idx": "state_warehouse", - "label": "D\u00e9p\u00f4t de l'\u00c9tat" - } - }, - { - "pk": 3, - "model": "archaeological_warehouse.warehousetype", - "fields": { - "comment": "Mobilier pr\u00e9sent dans un lieu de mani\u00e8re ill\u00e9gale : pas de convention, voire de responsabilit\u00e9 exprim\u00e9e...", - "available": true, - "txt_idx": "illegal_warehouse", - "label": "D\u00e9p\u00f4t non conventionn\u00e9" - } - }, - { - "pk": 1, - "model": "archaeological_warehouse.warehousetype", - "fields": { - "comment": "Le mobilier arch\u00e9ologique reste dans ce d\u00e9p\u00f4t le temps d'un traitement puis part ailleurs...", - "available": true, - "txt_idx": "restoration_laboratory", - "label": "Laboratoire de restauration" - } - }, - { - "pk": 8, - "model": "archaeological_warehouse.warehousetype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "museum", - "label": "Mus\u00e9e" - } - }, - { - "pk": 1, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "building", - "label": "B\u00e2timent" - } - }, - { - "pk": 2, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "floor", - "label": "\u00c9tage" - } - }, - { - "pk": 3, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "room", - "label": "Salle" - } - }, - { - "pk": 4, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "span", - "label": "Trav\u00e9e" - } - }, - { - "pk": 5, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "shelf", - "label": "\u00c9tag\u00e8re" - } - }, - { - "pk": 6, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "place", - "label": "Lieu dans la salle" - } - }, - { - "pk": 7, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "alley", - "label": "All\u00e9e" - } - }, - { - "pk": 8, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "rank", - "label": "Rang" - } - }, - { - "pk": 9, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "space", - "label": "Espace" - } - }, - { - "pk": 10, - "model": "archaeological_warehouse.warehousedivision", - "fields": { - "comment": "", - "available": true, - "txt_idx": "level", - "label": "Niveau" - } +{ + "model": "archaeological_warehouse.containertype", + "fields": { + "label": "Caisse Alibert standard", + "txt_idx": "stand_alibert_bin", + "comment": "Caisse Alibert grise standard, a pr\u00e9ciser et d\u00e9cliner en fonction des mod\u00e8les.", + "available": true, + "length": null, + "width": 0, + "height": 0, + "volume": 0.0, + "reference": "a pr\u00e9ciser" } -]
\ No newline at end of file +}, +{ + "model": "archaeological_warehouse.containertype", + "fields": { + "label": "Curver UNIBOX 20 L", + "txt_idx": "curver_unibox_20", + "comment": "", + "available": true, + "length": null, + "width": 350, + "height": 165, + "volume": 25.0, + "reference": "Curver UNIBOX 20 L" + } +}, +{ + "model": "archaeological_warehouse.containertype", + "fields": { + "label": "Curver UNIBOX 29 L", + "txt_idx": "curver_unibox_29", + "comment": "", + "available": true, + "length": null, + "width": 355, + "height": 245, + "volume": 37.0, + "reference": "Curver UNIBOX 29 L" + } +}, +{ + "model": "archaeological_warehouse.containertype", + "fields": { + "label": "Curver UNIBOX 48 L", + "txt_idx": "curver_unibox_48", + "comment": "", + "available": true, + "length": null, + "width": 432, + "height": 280, + "volume": 63.0, + "reference": "Curver UNIBOX 48 L" + } +}, +{ + "model": "archaeological_warehouse.containertype", + "fields": { + "label": "Bac norme Europe plein 20002", + "txt_idx": "20002", + "comment": "Bac norme Europe plein 20002 - 200X150X118", + "available": true, + "length": 200, + "width": 150, + "height": 118, + "volume": 3.0, + "reference": "20002" + } +}, +{ + "model": "archaeological_warehouse.containertype", + "fields": { + "label": "Miflex 8L", + "txt_idx": "Miflex_8L", + "comment": "Bo\u00eetes herm\u00e9tiques Miflex 8L", + "available": true, + "length": 29, + "width": 21, + "height": 15, + "volume": null, + "reference": "Miflex 8L" + } +}, +{ + "model": "archaeological_warehouse.warehousetype", + "fields": { + "label": "Laboratoire de restauration", + "txt_idx": "restoration_laboratory", + "comment": "Le mobilier arch\u00e9ologique reste dans ce d\u00e9p\u00f4t le temps d'un traitement puis part ailleurs...", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousetype", + "fields": { + "label": "CCE", + "txt_idx": "cce", + "comment": "Ce d\u00e9p\u00f4t est un centre de conservation et d'\u00e9tude. Il est d'ordinaire en convention avec l'\u00c9tat.", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousetype", + "fields": { + "label": "D\u00e9p\u00f4t non conventionn\u00e9", + "txt_idx": "illegal_warehouse", + "comment": "Mobilier pr\u00e9sent dans un lieu de mani\u00e8re ill\u00e9gale : pas de convention, voire de responsabilit\u00e9 exprim\u00e9e...", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousetype", + "fields": { + "label": "D\u00e9p\u00f4t conventionn\u00e9", + "txt_idx": "conventioned_warehouse", + "comment": "Ce d\u00e9p\u00f4t poss\u00e8de une convention avec l'\u00c9tat pour conserver du mobilier qui est sous sa garde.", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousetype", + "fields": { + "label": "D\u00e9p\u00f4t de l'\u00c9tat", + "txt_idx": "state_warehouse", + "comment": "Ce d\u00e9p\u00f4t est sous la responsabilit\u00e9 directe de l'\u00c9tat. Il peut en \u00eatre locataire ou propri\u00e9taire.", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousetype", + "fields": { + "label": "Biblioth\u00e8que", + "txt_idx": "library", + "comment": "Pour le stockage de documents papier, rapports la plupart du temps.", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousetype", + "fields": { + "label": "Centre de documentation", + "txt_idx": "documentation_center", + "comment": "Lieu de stockage de documents vari\u00e9s, photos, relev\u00e9s, jusqu'aux rapports.", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousetype", + "fields": { + "label": "Mus\u00e9e", + "txt_idx": "museum", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "B\u00e2timent", + "txt_idx": "building", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "\u00c9tage", + "txt_idx": "floor", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "Salle", + "txt_idx": "room", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "Trav\u00e9e", + "txt_idx": "span", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "\u00c9tag\u00e8re", + "txt_idx": "shelf", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "Lieu dans la salle", + "txt_idx": "place", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "All\u00e9e", + "txt_idx": "alley", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "Rang", + "txt_idx": "rank", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "Espace", + "txt_idx": "space", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_warehouse.warehousedivision", + "fields": { + "label": "Niveau", + "txt_idx": "level", + "comment": "", + "available": true + } +} +] diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index 94e31b759..f020864ff 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/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 @@ -17,6 +17,8 @@ # See the file COPYING for details. +from collections import OrderedDict + from django import forms from django.conf import settings from django.forms.formsets import formset_factory @@ -212,9 +214,13 @@ class ContainerModifyForm(ContainerForm): def __init__(self, *args, **kwargs): super(ContainerModifyForm, self).__init__(*args, **kwargs) - self.fields.keyOrder.pop(self.fields.keyOrder.index('index')) - self.fields.keyOrder.insert( - self.fields.keyOrder.index("location") + 1, 'index') + fields = OrderedDict() + idx = self.fields.pop('index') + for key, value in self.fields.items(): + fields[key] = value + if key == 'location': + fields['index'] = idx + self.fields = fields def clean(self): # manage unique ID diff --git a/archaeological_warehouse/lookups.py b/archaeological_warehouse/lookups.py new file mode 100644 index 000000000..57d3a892d --- /dev/null +++ b/archaeological_warehouse/lookups.py @@ -0,0 +1,49 @@ +from ajax_select import register, LookupChannel + +from django.db.models import Q +from django.utils.encoding import force_text +from django.utils.html import escape + +from archaeological_warehouse import models + + +@register('container') +class ContainerLookup(LookupChannel): + model = models.Container + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(reference__icontains=term) | + Q(container_type__label__icontains=term) | + Q(cached_label__icontains=term) | + Q(responsible__name__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by( + 'cached_label')[:20] + + def format_match(self, obj): + return escape(force_text(obj.cached_label)) + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.cached_label + + +@register('warehouse') +class WarehouseLookup(LookupChannel): + model = models.Warehouse + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(warehouse_type__label=term) | + Q(name__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by('name')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.name diff --git a/archaeological_warehouse/migrations/0001_initial.py b/archaeological_warehouse/migrations/0001_initial.py index 6c3b14e75..13abc0afa 100644 --- a/archaeological_warehouse/migrations/0001_initial.py +++ b/archaeological_warehouse/migrations/0001_initial.py @@ -1,229 +1,182 @@ # -*- 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 'WarehouseType' - db.create_table('archaeological_warehouse_warehousetype', ( - ('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('archaeological_warehouse', ['WarehouseType']) - - # Adding model 'Warehouse' - db.create_table('archaeological_warehouse_warehouse', ( - ('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=40)), - ('warehouse_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.WarehouseType'])), - ('person_in_charge', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'], null=True, blank=True)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('archaeological_warehouse', ['Warehouse']) - - # Adding model 'ContainerType' - db.create_table('archaeological_warehouse_containertype', ( - ('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)), - ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('height', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('volume', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('reference', self.gf('django.db.models.fields.CharField')(max_length=30)), - )) - db.send_create_signal('archaeological_warehouse', ['ContainerType']) +from __future__ import unicode_literals - # Adding model 'Container' - db.create_table('archaeological_warehouse_container', ( - ('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'])), - ('history_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), - ('location', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.Warehouse'])), - ('container_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.ContainerType'])), - ('reference', self.gf('django.db.models.fields.CharField')(max_length=40)), - ('comment', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('archaeological_warehouse', ['Container']) - - - def backwards(self, orm): - # Deleting model 'WarehouseType' - db.delete_table('archaeological_warehouse_warehousetype') - - # Deleting model 'Warehouse' - db.delete_table('archaeological_warehouse_warehouse') - - # Deleting model 'ContainerType' - db.delete_table('archaeological_warehouse_containertype') +from django.db import models, migrations +import datetime +import django.core.validators +import django.db.models.deletion +from django.conf import settings +import re +import ishtar_common.models - # Deleting model 'Container' - db.delete_table('archaeological_warehouse_container') +class Migration(migrations.Migration): - models = { - 'archaeological_warehouse.container': { - 'Meta': {'object_name': 'Container'}, - 'comment': ('django.db.models.fields.TextField', [], {}), - 'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}) - }, - 'archaeological_warehouse.containertype': { - 'Meta': {'object_name': 'ContainerType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'volume': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_warehouse.warehouse': { - 'Meta': {'object_name': 'Warehouse'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('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': '40'}), - 'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']", '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'}), - 'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) - }, - 'archaeological_warehouse.warehousetype': { - 'Meta': {'object_name': 'WarehouseType'}, - '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'}) - }, - '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.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.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']"}) - } - } + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - complete_apps = ['archaeological_warehouse']
\ No newline at end of file + operations = [ + migrations.CreateModel( + name='Collection', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('name', models.CharField(max_length=200, null=True, verbose_name='Name', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ], + options={ + 'ordering': ('name',), + 'verbose_name': 'Collection', + 'verbose_name_plural': 'Collection', + }, + ), + migrations.CreateModel( + name='Container', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('reference', models.CharField(max_length=40, verbose_name='Container ref.')), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('cached_label', models.CharField(max_length=500, null=True, verbose_name='Localisation', blank=True)), + ('cached_location', models.CharField(max_length=500, null=True, verbose_name='Cached location', blank=True)), + ('index', models.IntegerField(default=0, verbose_name='ID')), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ], + options={ + 'ordering': ('cached_label',), + 'verbose_name': 'Container', + 'verbose_name_plural': 'Containers', + }, + ), + migrations.CreateModel( + name='ContainerLocalisation', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('reference', models.CharField(default=b'', max_length=200, verbose_name='Reference')), + ], + options={ + 'ordering': ('container', 'division__order'), + 'verbose_name': 'Container localisation', + 'verbose_name_plural': 'Container localisations', + }, + ), + migrations.CreateModel( + name='ContainerType', + 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')), + ('length', models.IntegerField(null=True, verbose_name='Length (mm)', blank=True)), + ('width', models.IntegerField(null=True, verbose_name='Width (mm)', blank=True)), + ('height', models.IntegerField(null=True, verbose_name='Height (mm)', blank=True)), + ('volume', models.FloatField(null=True, verbose_name='Volume (l)', blank=True)), + ('reference', models.CharField(max_length=30, verbose_name='Ref.')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Container type', + 'verbose_name_plural': 'Container types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Warehouse', + 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')), + ('name', models.CharField(max_length=200, verbose_name='Name')), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ], + options={ + 'verbose_name': 'Warehouse', + 'verbose_name_plural': 'Warehouses', + 'permissions': (('view_warehouse', 'Peut voir tous les D\xe9p\xf4ts'), ('view_own_warehouse', 'Peut voir son propre D\xe9p\xf4t'), ('add_own_warehouse', 'Peut ajouter son propre D\xe9p\xf4t'), ('change_own_warehouse', 'Peut modifier son propre D\xe9p\xf4t'), ('delete_own_warehouse', 'Peut supprimer son propre D\xe9p\xf4t')), + }, + bases=(models.Model, ishtar_common.models.DashboardFormItem, ishtar_common.models.OwnPerms), + ), + migrations.CreateModel( + name='WarehouseDivision', + 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': 'Warehouse division type', + 'verbose_name_plural': 'Warehouse division types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='WarehouseDivisionLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('order', models.IntegerField(default=10, verbose_name='Order')), + ('division', models.ForeignKey(to='archaeological_warehouse.WarehouseDivision')), + ('warehouse', models.ForeignKey(to='archaeological_warehouse.Warehouse')), + ], + options={ + 'ordering': ('warehouse', 'order'), + }, + ), + migrations.CreateModel( + name='WarehouseType', + 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': 'Warehouse type', + 'verbose_name_plural': 'Warehouse types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.AddField( + model_name='warehouse', + name='associated_divisions', + field=models.ManyToManyField(to='archaeological_warehouse.WarehouseDivision', verbose_name='Divisions', through='archaeological_warehouse.WarehouseDivisionLink', blank=True), + ), + migrations.AddField( + model_name='warehouse', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='warehouse', + name='history_modifier', + field=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), + ), + ] diff --git a/archaeological_warehouse/migrations/0002_auto_20170414_2123.py b/archaeological_warehouse/migrations/0002_auto_20170414_2123.py new file mode 100644 index 000000000..5b9c92785 --- /dev/null +++ b/archaeological_warehouse/migrations/0002_auto_20170414_2123.py @@ -0,0 +1,105 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_warehouse', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('ishtar_common', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='warehouse', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_warehouse_warehouse', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='warehouse', + name='person_in_charge', + field=models.ForeignKey(related_name='warehouse_in_charge', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Person in charge', blank=True, to='ishtar_common.Person', null=True), + ), + migrations.AddField( + model_name='warehouse', + name='warehouse_type', + field=models.ForeignKey(verbose_name='Warehouse type', to='archaeological_warehouse.WarehouseType'), + ), + migrations.AddField( + model_name='containerlocalisation', + name='container', + field=models.ForeignKey(related_name='division', verbose_name='Container', to='archaeological_warehouse.Container'), + ), + migrations.AddField( + model_name='containerlocalisation', + name='division', + field=models.ForeignKey(verbose_name='Division', to='archaeological_warehouse.WarehouseDivisionLink'), + ), + migrations.AddField( + model_name='container', + name='container_type', + field=models.ForeignKey(verbose_name='Container type', to='archaeological_warehouse.ContainerType'), + ), + migrations.AddField( + model_name='container', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='container', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='container', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_warehouse_container', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='container', + name='location', + field=models.ForeignKey(related_name='containers', verbose_name='Location (warehouse)', to='archaeological_warehouse.Warehouse'), + ), + migrations.AddField( + model_name='container', + name='responsible', + field=models.ForeignKey(related_name='owned_containers', verbose_name='Responsible warehouse', to='archaeological_warehouse.Warehouse'), + ), + migrations.AddField( + model_name='collection', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='collection', + name='history_modifier', + field=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), + ), + migrations.AddField( + model_name='collection', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_warehouse_collection', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='collection', + name='warehouse', + field=models.ForeignKey(related_name='collections', verbose_name='Warehouse', to='archaeological_warehouse.Warehouse'), + ), + migrations.AlterUniqueTogether( + name='warehousedivisionlink', + unique_together=set([('warehouse', 'division')]), + ), + migrations.AlterUniqueTogether( + name='containerlocalisation', + unique_together=set([('container', 'division')]), + ), + migrations.AlterUniqueTogether( + name='container', + unique_together=set([('index', 'location')]), + ), + ] diff --git a/archaeological_warehouse/migrations/0003_auto_20170802_1557.py b/archaeological_warehouse/migrations/0003_auto_20170802_1557.py new file mode 100644 index 000000000..90d67bc46 --- /dev/null +++ b/archaeological_warehouse/migrations/0003_auto_20170802_1557.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_warehouse', '0002_auto_20170414_2123'), + ] + + operations = [ + migrations.AlterModelOptions( + name='warehouse', + options={'verbose_name': 'Warehouse', 'verbose_name_plural': 'Warehouses', 'permissions': (('view_warehouse', 'Can view all Warehouses'), ('view_own_warehouse', 'Can view own Warehouse'), ('add_own_warehouse', 'Can add own Warehouse'), ('change_own_warehouse', 'Can change own Warehouse'), ('delete_own_warehouse', 'Can delete own Warehouse'))}, + ), + ] diff --git a/archaeological_warehouse/migrations/0004_auto_20170804_2024.py b/archaeological_warehouse/migrations/0004_auto_20170804_2024.py new file mode 100644 index 000000000..e585da67c --- /dev/null +++ b/archaeological_warehouse/migrations/0004_auto_20170804_2024.py @@ -0,0 +1,31 @@ +# -*- 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 = [ + ('archaeological_warehouse', '0003_auto_20170802_1557'), + ] + + operations = [ + migrations.AlterField( + model_name='containertype', + 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='warehousedivision', + 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='warehousetype', + 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/archaeological_warehouse/migrations/0005_auto_20170826_1152.py b/archaeological_warehouse/migrations/0005_auto_20170826_1152.py new file mode 100644 index 000000000..036345796 --- /dev/null +++ b/archaeological_warehouse/migrations/0005_auto_20170826_1152.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-26 11:52 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_warehouse', '0004_auto_20170804_2024'), + ] + + operations = [ + migrations.AlterField( + model_name='containertype', + 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='warehousedivision', + 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='warehousetype', + 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/archaeological_warehouse/migrations/0006_auto_20170829_1639.py b/archaeological_warehouse/migrations/0006_auto_20170829_1639.py new file mode 100644 index 000000000..0d22d1571 --- /dev/null +++ b/archaeological_warehouse/migrations/0006_auto_20170829_1639.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-29 16:39 +from __future__ import unicode_literals + +from django.db import migrations, models +import ishtar_common.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_warehouse', '0005_auto_20170826_1152'), + ] + + operations = [ + migrations.AlterField( + model_name='container', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='container', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + ] diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 96814339c..1804d70d6 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -21,10 +21,10 @@ import datetime from django.conf import settings from django.contrib.gis.db import models -from django.db.models import Q, Count +from django.db.models import Q from django.db.models.signals import post_save, post_delete from django.template.defaultfilters import slugify -from django.utils.translation import ugettext_lazy as _, ugettext +from django.utils.translation import ugettext_lazy as _ from ishtar_common.utils import cached_label_changed @@ -65,11 +65,11 @@ class Warehouse(Address, DashboardFormItem, OwnPerms): verbose_name = _(u"Warehouse") verbose_name_plural = _(u"Warehouses") permissions = ( - ("view_warehouse", ugettext(u"Can view all Warehouses")), - ("view_own_warehouse", ugettext(u"Can view own Warehouse")), - ("add_own_warehouse", ugettext(u"Can add own Warehouse")), - ("change_own_warehouse", ugettext(u"Can change own Warehouse")), - ("delete_own_warehouse", ugettext(u"Can delete own Warehouse")), + ("view_warehouse", u"Can view all Warehouses"), + ("view_own_warehouse", u"Can view own Warehouse"), + ("add_own_warehouse", u"Can add own Warehouse"), + ("change_own_warehouse", u"Can change own Warehouse"), + ("delete_own_warehouse", u"Can delete own Warehouse"), ) def __unicode__(self): @@ -81,8 +81,8 @@ class Warehouse(Address, DashboardFormItem, OwnPerms): slugify(unicode(self)) @classmethod - def get_query_owns(cls, user): - return Q(person_in_charge__ishtaruser=user.ishtaruser) + def get_query_owns(cls, ishtaruser): + return Q(person_in_charge__ishtaruser=ishtaruser) @property def number_of_finds(self): @@ -310,10 +310,10 @@ class Container(LightHistorizedItem, ImageModel): return cached_label @classmethod - def get_query_owns(cls, user): - return Q(history_creator=user) | \ - Q(location__person_in_charge__ishtaruser=user.ishtaruser) | \ - Q(responsible__person_in_charge__ishtaruser=user.ishtaruser) + def get_query_owns(cls, ishtaruser): + return Q(history_creator=ishtaruser.user_ptr) | \ + Q(location__person_in_charge__ishtaruser=ishtaruser) | \ + Q(responsible__person_in_charge__ishtaruser=ishtaruser) @property def associated_filename(self): @@ -328,6 +328,43 @@ class Container(LightHistorizedItem, ImageModel): def precise_location(self): return self.location.name + u" - " + self.divisions_lbl + def get_localisations(self): + """ + Get precise localisation of the container in the warehouse. + + :return: tuple of strings with localisations + """ + return tuple(( + loca.reference + for loca in ContainerLocalisation.objects.filter( + container=self).order_by('division__order') + )) + + def set_localisation(self, place, value): + """ + Set the reference for the localisation number "place" (starting from 0) + :param place: the number of the localisation + :param value: the reference to be set + :return: the container location object or None if the place does not + exist + """ + q = WarehouseDivisionLink.objects.filter( + warehouse=self.location).order_by('order') + for idx, division_link in enumerate(q.all()): + if idx == place: + break + else: + return + dct = {'container': self, 'division': division_link} + if not value: + if ContainerLocalisation.objects.filter(**dct).count(): + c = ContainerLocalisation.objects.filter(**dct).all()[0] + c.delete() + return + dct['defaults'] = {'reference': value} + obj, created = ContainerLocalisation.objects.update_or_create(**dct) + return obj + @property def divisions_lbl(self): locas = [ diff --git a/archaeological_warehouse/old_migrations/0001_initial.py b/archaeological_warehouse/old_migrations/0001_initial.py new file mode 100644 index 000000000..6c3b14e75 --- /dev/null +++ b/archaeological_warehouse/old_migrations/0001_initial.py @@ -0,0 +1,229 @@ +# -*- 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 'WarehouseType' + db.create_table('archaeological_warehouse_warehousetype', ( + ('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('archaeological_warehouse', ['WarehouseType']) + + # Adding model 'Warehouse' + db.create_table('archaeological_warehouse_warehouse', ( + ('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=40)), + ('warehouse_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.WarehouseType'])), + ('person_in_charge', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.Person'], null=True, blank=True)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + )) + db.send_create_signal('archaeological_warehouse', ['Warehouse']) + + # Adding model 'ContainerType' + db.create_table('archaeological_warehouse_containertype', ( + ('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)), + ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('height', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('volume', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('reference', self.gf('django.db.models.fields.CharField')(max_length=30)), + )) + db.send_create_signal('archaeological_warehouse', ['ContainerType']) + + # Adding model 'Container' + db.create_table('archaeological_warehouse_container', ( + ('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'])), + ('history_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), + ('location', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.Warehouse'])), + ('container_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_warehouse.ContainerType'])), + ('reference', self.gf('django.db.models.fields.CharField')(max_length=40)), + ('comment', self.gf('django.db.models.fields.TextField')()), + )) + db.send_create_signal('archaeological_warehouse', ['Container']) + + + def backwards(self, orm): + # Deleting model 'WarehouseType' + db.delete_table('archaeological_warehouse_warehousetype') + + # Deleting model 'Warehouse' + db.delete_table('archaeological_warehouse_warehouse') + + # Deleting model 'ContainerType' + db.delete_table('archaeological_warehouse_containertype') + + # Deleting model 'Container' + db.delete_table('archaeological_warehouse_container') + + + models = { + 'archaeological_warehouse.container': { + 'Meta': {'object_name': 'Container'}, + 'comment': ('django.db.models.fields.TextField', [], {}), + 'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}), + 'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}) + }, + 'archaeological_warehouse.containertype': { + 'Meta': {'object_name': 'ContainerType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'volume': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_warehouse.warehouse': { + 'Meta': {'object_name': 'Warehouse'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('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': '40'}), + 'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']", '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'}), + 'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) + }, + 'archaeological_warehouse.warehousetype': { + 'Meta': {'object_name': 'WarehouseType'}, + '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'}) + }, + '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.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.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 = ['archaeological_warehouse']
\ No newline at end of file diff --git a/archaeological_warehouse/migrations/0002_auto__add_field_warehouse_history_creator__add_field_container_history.py b/archaeological_warehouse/old_migrations/0002_auto__add_field_warehouse_history_creator__add_field_container_history.py index 75bd47a45..75bd47a45 100644 --- a/archaeological_warehouse/migrations/0002_auto__add_field_warehouse_history_creator__add_field_container_history.py +++ b/archaeological_warehouse/old_migrations/0002_auto__add_field_warehouse_history_creator__add_field_container_history.py diff --git a/archaeological_warehouse/migrations/0003_auto__add_field_warehouse_email.py b/archaeological_warehouse/old_migrations/0003_auto__add_field_warehouse_email.py index bcfabba98..bcfabba98 100644 --- a/archaeological_warehouse/migrations/0003_auto__add_field_warehouse_email.py +++ b/archaeological_warehouse/old_migrations/0003_auto__add_field_warehouse_email.py diff --git a/archaeological_warehouse/migrations/0004_auto__chg_field_warehouse_history_creator__chg_field_warehouse_person_.py b/archaeological_warehouse/old_migrations/0004_auto__chg_field_warehouse_history_creator__chg_field_warehouse_person_.py index 66d7c4926..66d7c4926 100644 --- a/archaeological_warehouse/migrations/0004_auto__chg_field_warehouse_history_creator__chg_field_warehouse_person_.py +++ b/archaeological_warehouse/old_migrations/0004_auto__chg_field_warehouse_history_creator__chg_field_warehouse_person_.py diff --git a/archaeological_warehouse/migrations/0005_auto__chg_field_warehouse_town.py b/archaeological_warehouse/old_migrations/0005_auto__chg_field_warehouse_town.py index c8f67c425..c8f67c425 100644 --- a/archaeological_warehouse/migrations/0005_auto__chg_field_warehouse_town.py +++ b/archaeological_warehouse/old_migrations/0005_auto__chg_field_warehouse_town.py diff --git a/archaeological_warehouse/migrations/0006_auto.py b/archaeological_warehouse/old_migrations/0006_auto.py index fae8058d6..fae8058d6 100644 --- a/archaeological_warehouse/migrations/0006_auto.py +++ b/archaeological_warehouse/old_migrations/0006_auto.py diff --git a/archaeological_warehouse/migrations/0007_auto__chg_field_warehousetype_txt_idx__chg_field_containertype_txt_idx.py b/archaeological_warehouse/old_migrations/0007_auto__chg_field_warehousetype_txt_idx__chg_field_containertype_txt_idx.py index a823623b9..a823623b9 100644 --- a/archaeological_warehouse/migrations/0007_auto__chg_field_warehousetype_txt_idx__chg_field_containertype_txt_idx.py +++ b/archaeological_warehouse/old_migrations/0007_auto__chg_field_warehousetype_txt_idx__chg_field_containertype_txt_idx.py diff --git a/archaeological_warehouse/migrations/0008_auto__add_field_warehouse_alt_address__add_field_warehouse_alt_address.py b/archaeological_warehouse/old_migrations/0008_auto__add_field_warehouse_alt_address__add_field_warehouse_alt_address.py index b543a501e..b543a501e 100644 --- a/archaeological_warehouse/migrations/0008_auto__add_field_warehouse_alt_address__add_field_warehouse_alt_address.py +++ b/archaeological_warehouse/old_migrations/0008_auto__add_field_warehouse_alt_address__add_field_warehouse_alt_address.py diff --git a/archaeological_warehouse/migrations/0009_auto__chg_field_warehouse_phone_desc3__chg_field_warehouse_phone_desc2.py b/archaeological_warehouse/old_migrations/0009_auto__chg_field_warehouse_phone_desc3__chg_field_warehouse_phone_desc2.py index 008faea54..008faea54 100644 --- a/archaeological_warehouse/migrations/0009_auto__chg_field_warehouse_phone_desc3__chg_field_warehouse_phone_desc2.py +++ b/archaeological_warehouse/old_migrations/0009_auto__chg_field_warehouse_phone_desc3__chg_field_warehouse_phone_desc2.py diff --git a/archaeological_warehouse/migrations/0010_auto__add_warehousedivisionlink__add_warehousedivision__chg_field_ware.py b/archaeological_warehouse/old_migrations/0010_auto__add_warehousedivisionlink__add_warehousedivision__chg_field_ware.py index 306ebe290..306ebe290 100644 --- a/archaeological_warehouse/migrations/0010_auto__add_warehousedivisionlink__add_warehousedivision__chg_field_ware.py +++ b/archaeological_warehouse/old_migrations/0010_auto__add_warehousedivisionlink__add_warehousedivision__chg_field_ware.py diff --git a/archaeological_warehouse/migrations/0011_auto__add_containerlocalisation__add_unique_containerlocalisation_cont.py b/archaeological_warehouse/old_migrations/0011_auto__add_containerlocalisation__add_unique_containerlocalisation_cont.py index 0b63f4d5b..0b63f4d5b 100644 --- a/archaeological_warehouse/migrations/0011_auto__add_containerlocalisation__add_unique_containerlocalisation_cont.py +++ b/archaeological_warehouse/old_migrations/0011_auto__add_containerlocalisation__add_unique_containerlocalisation_cont.py diff --git a/archaeological_warehouse/migrations/0012_auto__add_field_container_cached_label.py b/archaeological_warehouse/old_migrations/0012_auto__add_field_container_cached_label.py index 2ffeaa231..2ffeaa231 100644 --- a/archaeological_warehouse/migrations/0012_auto__add_field_container_cached_label.py +++ b/archaeological_warehouse/old_migrations/0012_auto__add_field_container_cached_label.py diff --git a/archaeological_warehouse/migrations/0013_auto__add_collection.py b/archaeological_warehouse/old_migrations/0013_auto__add_collection.py index 52c7e841e..52c7e841e 100644 --- a/archaeological_warehouse/migrations/0013_auto__add_collection.py +++ b/archaeological_warehouse/old_migrations/0013_auto__add_collection.py diff --git a/archaeological_warehouse/migrations/0014_auto__add_field_container_cached_location__add_field_container_index.py b/archaeological_warehouse/old_migrations/0014_auto__add_field_container_cached_location__add_field_container_index.py index 4e267e1ac..4e267e1ac 100644 --- a/archaeological_warehouse/migrations/0014_auto__add_field_container_cached_location__add_field_container_index.py +++ b/archaeological_warehouse/old_migrations/0014_auto__add_field_container_cached_location__add_field_container_index.py diff --git a/archaeological_warehouse/migrations/0015_auto_increment_existing_indexes.py b/archaeological_warehouse/old_migrations/0015_auto_increment_existing_indexes.py index 138c2165d..138c2165d 100644 --- a/archaeological_warehouse/migrations/0015_auto_increment_existing_indexes.py +++ b/archaeological_warehouse/old_migrations/0015_auto_increment_existing_indexes.py diff --git a/archaeological_warehouse/migrations/0016_auto__add_unique_container_index_location.py b/archaeological_warehouse/old_migrations/0016_auto__add_unique_container_index_location.py index 055497078..055497078 100644 --- a/archaeological_warehouse/migrations/0016_auto__add_unique_container_index_location.py +++ b/archaeological_warehouse/old_migrations/0016_auto__add_unique_container_index_location.py diff --git a/archaeological_warehouse/migrations/0017_auto__chg_field_container_comment.py b/archaeological_warehouse/old_migrations/0017_auto__chg_field_container_comment.py index bb6d2585e..bb6d2585e 100644 --- a/archaeological_warehouse/migrations/0017_auto__chg_field_container_comment.py +++ b/archaeological_warehouse/old_migrations/0017_auto__chg_field_container_comment.py diff --git a/archaeological_warehouse/migrations/0018_generate_cache_lbl_for_containers.py b/archaeological_warehouse/old_migrations/0018_generate_cache_lbl_for_containers.py index 2e3e62c23..2e3e62c23 100644 --- a/archaeological_warehouse/migrations/0018_generate_cache_lbl_for_containers.py +++ b/archaeological_warehouse/old_migrations/0018_generate_cache_lbl_for_containers.py diff --git a/archaeological_warehouse/migrations/0019_auto__add_field_container_responsible.py b/archaeological_warehouse/old_migrations/0019_auto__add_field_container_responsible.py index 21612d227..21612d227 100644 --- a/archaeological_warehouse/migrations/0019_auto__add_field_container_responsible.py +++ b/archaeological_warehouse/old_migrations/0019_auto__add_field_container_responsible.py diff --git a/archaeological_warehouse/migrations/0020_generate_cache_lbl_for_containers.py b/archaeological_warehouse/old_migrations/0020_generate_cache_lbl_for_containers.py index 4c6e08dbe..4c6e08dbe 100644 --- a/archaeological_warehouse/migrations/0020_generate_cache_lbl_for_containers.py +++ b/archaeological_warehouse/old_migrations/0020_generate_cache_lbl_for_containers.py diff --git a/archaeological_warehouse/migrations/0021_auto__chg_field_container_responsible.py b/archaeological_warehouse/old_migrations/0021_auto__chg_field_container_responsible.py index 65df3991b..65df3991b 100644 --- a/archaeological_warehouse/migrations/0021_auto__chg_field_container_responsible.py +++ b/archaeological_warehouse/old_migrations/0021_auto__chg_field_container_responsible.py diff --git a/archaeological_warehouse/migrations/0022_auto__chg_field_containertype_volume.py b/archaeological_warehouse/old_migrations/0022_auto__chg_field_containertype_volume.py index 4c0d67711..4c0d67711 100644 --- a/archaeological_warehouse/migrations/0022_auto__chg_field_containertype_volume.py +++ b/archaeological_warehouse/old_migrations/0022_auto__chg_field_containertype_volume.py diff --git a/archaeological_warehouse/migrations/0023_auto__add_field_container_external_id__add_field_container_auto_extern.py b/archaeological_warehouse/old_migrations/0023_auto__add_field_container_external_id__add_field_container_auto_extern.py index 05fd10ffd..05fd10ffd 100644 --- a/archaeological_warehouse/migrations/0023_auto__add_field_container_external_id__add_field_container_auto_extern.py +++ b/archaeological_warehouse/old_migrations/0023_auto__add_field_container_external_id__add_field_container_auto_extern.py diff --git a/archaeological_warehouse/migrations/0024_generate_cache_lbl_for_containers.py b/archaeological_warehouse/old_migrations/0024_generate_cache_lbl_for_containers.py index 51449c167..51449c167 100644 --- a/archaeological_warehouse/migrations/0024_generate_cache_lbl_for_containers.py +++ b/archaeological_warehouse/old_migrations/0024_generate_cache_lbl_for_containers.py diff --git a/archaeological_warehouse/migrations/0025_auto__add_field_container_image__add_field_container_thumbnail.py b/archaeological_warehouse/old_migrations/0025_auto__add_field_container_image__add_field_container_thumbnail.py index cc1f02807..cc1f02807 100644 --- a/archaeological_warehouse/migrations/0025_auto__add_field_container_image__add_field_container_thumbnail.py +++ b/archaeological_warehouse/old_migrations/0025_auto__add_field_container_image__add_field_container_thumbnail.py diff --git a/archaeological_warehouse/migrations/0026_generate_cache_lbl_for_containers.py b/archaeological_warehouse/old_migrations/0026_generate_cache_lbl_for_containers.py index 85df1bf21..85df1bf21 100644 --- a/archaeological_warehouse/migrations/0026_generate_cache_lbl_for_containers.py +++ b/archaeological_warehouse/old_migrations/0026_generate_cache_lbl_for_containers.py diff --git a/archaeological_warehouse/old_migrations/__init__.py b/archaeological_warehouse/old_migrations/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archaeological_warehouse/old_migrations/__init__.py diff --git a/archaeological_warehouse/templates/ishtar/wizard/wizard_containerlocalisation.html b/archaeological_warehouse/templates/ishtar/wizard/wizard_containerlocalisation.html index 41be02748..4d0a63c17 100644 --- a/archaeological_warehouse/templates/ishtar/wizard/wizard_containerlocalisation.html +++ b/archaeological_warehouse/templates/ishtar/wizard/wizard_containerlocalisation.html @@ -1,6 +1,5 @@ {% extends "ishtar/wizard/default_wizard.html" %} {% load i18n %} -{% load url from future %} {% block form_head %} {% if not wizard.form.fields %} <p class="alert"> diff --git a/archaeological_warehouse/templates/ishtar/wizard/wizard_warehouse_divisions.html b/archaeological_warehouse/templates/ishtar/wizard/wizard_warehouse_divisions.html index 83dbfc0fe..cceabb4a0 100644 --- a/archaeological_warehouse/templates/ishtar/wizard/wizard_warehouse_divisions.html +++ b/archaeological_warehouse/templates/ishtar/wizard/wizard_warehouse_divisions.html @@ -1,6 +1,5 @@ {% extends "ishtar/wizard/default_wizard.html" %} {% load i18n %} -{% load url from future %} {% block form_head %} {% if wizard.form.readonly %} <p class="alert"> diff --git a/archaeological_warehouse/urls.py b/archaeological_warehouse/urls.py index ec3aa1beb..5be9183d2 100644 --- a/archaeological_warehouse/urls.py +++ b/archaeological_warehouse/urls.py @@ -17,38 +17,35 @@ # See the file COPYING for details. -from django.conf.urls.defaults import * +from django.conf.urls import url from ishtar_common.wizards import check_rights -import views +from archaeological_warehouse import views + from archaeological_warehouse import models # be careful: each check_rights must be relevant with ishtar_menu # forms -urlpatterns = patterns( - '', +urlpatterns = [ url(r'warehouse_packaging/(?P<step>.+)?$', views.warehouse_packaging_wizard, name='warehouse_packaging'), -) -urlpatterns += patterns( - 'archaeological_warehouse.views', url(r'new-warehouse/(?P<parent_name>.+)?/$', - 'new_warehouse', name='new-warehouse'), - url(r'^show-warehouse(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_warehouse', + views.new_warehouse, name='new-warehouse'), + url(r'^show-warehouse(?:/(?P<pk>.+))?/(?P<type>.+)?$', views.show_warehouse, name=models.Warehouse.SHOW_URL), - url(r'autocomplete-warehouse/$', 'autocomplete_warehouse', + url(r'autocomplete-warehouse/$', views.autocomplete_warehouse, name='autocomplete-warehouse'), url(r'new-container/(?P<parent_name>.+)?/$', - 'new_container', name='new-container'), - url(r'get-container/(?P<type>.+)?$', 'get_container', + views.new_container, name='new-container'), + url(r'get-container/(?P<type>.+)?$', views.get_container, name='get-container'), - url(r'get-warehouse/(?P<type>.+)?$', 'get_warehouse', + url(r'get-warehouse/(?P<type>.+)?$', views.get_warehouse, name='get-warehouse'), url(r'autocomplete-container/?$', - 'autocomplete_container', name='autocomplete-container'), - url(r'^show-container(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_container', + views.autocomplete_container, name='autocomplete-container'), + url(r'^show-container(?:/(?P<pk>.+))?/(?P<type>.+)?$', views.show_container, name=models.Container.SHOW_URL), url(r'^warehouse_search/(?P<step>.+)?$', check_rights(['view_warehouse', 'view_own_warehouse'])( @@ -85,4 +82,4 @@ urlpatterns += patterns( name='container_deletion'), url(r'container-modify/(?P<pk>.+)/$', views.container_modify, name='container_modify'), -)
\ No newline at end of file +]
\ No newline at end of file diff --git a/archaeological_warehouse/views.py b/archaeological_warehouse/views.py index 677539a3f..60d31c09d 100644 --- a/archaeological_warehouse/views.py +++ b/archaeological_warehouse/views.py @@ -48,9 +48,9 @@ def autocomplete_warehouse(request): models.Warehouse)\ and not request.user.has_perm( 'ishtar_common.view_own_warehouse', models.Warehouse): - 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(' '): @@ -61,7 +61,7 @@ def autocomplete_warehouse(request): warehouses = models.Warehouse.objects.filter(query)[:limit] data = json.dumps([{'id': warehouse.pk, 'value': unicode(warehouse)} for warehouse in warehouses]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') def autocomplete_container(request): @@ -69,9 +69,9 @@ def autocomplete_container(request): models.Warehouse)\ and not request.user.has_perm( 'ishtar_common.view_own_warehouse', models.Warehouse): - 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(' '): @@ -85,7 +85,7 @@ def autocomplete_container(request): containers = models.Container.objects.filter(query)[:limit] data = json.dumps([{'id': container.pk, 'value': unicode(container)} for container in containers]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') warehouse_packaging_wizard = PackagingWizard.as_view([ ('seleccontainer-packaging', ContainerFormSelection), diff --git a/archaeological_warehouse/wizards.py b/archaeological_warehouse/wizards.py index 571e56b1b..6678e6c36 100644 --- a/archaeological_warehouse/wizards.py +++ b/archaeological_warehouse/wizards.py @@ -17,8 +17,7 @@ # See the file COPYING for details. -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render from ishtar_common.forms import reverse_lazy from ishtar_common.wizards import Wizard, DeletionWizard @@ -50,8 +49,7 @@ class PackagingWizard(TreatmentWizard): extra_args_for_new=extra_args_for_new) packaging = TreatmentType.objects.get(txt_idx='packaging') treatment.treatment_types.add(packaging) - res = render_to_response('ishtar/wizard/wizard_done.html', {}, - context_instance=RequestContext(self.request)) + res = render(self.request, 'ishtar/wizard/wizard_done.html', {}) return return_object and (obj, res) or res @@ -141,9 +139,7 @@ class ContainerWizard(Wizard): self.current_object = container # force evaluation of lazy urls dct['wizard_done_window'] = unicode(self.wizard_done_window) - return render_to_response( - self.wizard_done_template, dct, - context_instance=RequestContext(self.request)) + return render(self.request, self.wizard_done_template, dct) class ContainerModificationWizard(ContainerWizard): diff --git a/django-simple-history/AUTHORS b/django-simple-history/AUTHORS deleted file mode 100644 index 2865a62cc..000000000 --- a/django-simple-history/AUTHORS +++ /dev/null @@ -1,14 +0,0 @@ -The current maintainer of django-simple-history is Corey Bertram
-<corey@qr7.com>, who may be found online at <http://www.qr7.com/>.
-
-This code originally comes from Pro Django, published by Apress, Inc.
-in December 2008. The author of the book and primary author
-of the code is Marty Alchin <marty@martyalchin.com>, who
-may be found online at <http://martyalchin.com/>.
-
-As part of the technical review process, additional code
-modifications were provided by the technical reviewer,
-George Vilches <gav@thataddress.com>.
-
-Others who have contributed to the application:
-* Your name here!
diff --git a/django-simple-history/CHANGELOG b/django-simple-history/CHANGELOG deleted file mode 100644 index 420d95b09..000000000 --- a/django-simple-history/CHANGELOG +++ /dev/null @@ -1,5 +0,0 @@ -Oct 22, 2010: - - Merged setup.py from Klaas van Schelven - Thanks! - -Feb 21, 2010: - - Initial project creation, with changes to support ForeignKey relations. diff --git a/django-simple-history/LICENSE.txt b/django-simple-history/LICENSE.txt deleted file mode 100644 index 1d62e68c7..000000000 --- a/django-simple-history/LICENSE.txt +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2008, Marty Alchin
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of the author nor the names of other
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file diff --git a/django-simple-history/MANIFEST.in b/django-simple-history/MANIFEST.in deleted file mode 100644 index f1b15f396..000000000 --- a/django-simple-history/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include CHANGELOG -include MANIFEST.in -include README -include AUTHORS -include LICENSE.txt diff --git a/django-simple-history/README b/django-simple-history/README deleted file mode 100644 index 3a12cfbf2..000000000 --- a/django-simple-history/README +++ /dev/null @@ -1,77 +0,0 @@ -django-simple-history is a tool to store state of DB objects on every create/update/delete. It has been tested to work in django 1.X (including 1.2.3 as of 10/25/2010). - -== Install == -Download the tar.gz, extract it and run the following inside the directory: - python setup.py install - -== Basic usage == -Using this package is _really_ simple; you just have to import HistoricalRecords and create an instance of it on every model you want to historically track. - -On your models you need to include the following line at the top: - from simple_history.models import HistoricalRecords - -Then in your model class, include the following line: - history = HistoricalRecords() - -Then from either the model class or from an instance, you can access history.all() which will give you either every history item of the class, or every history item of the specific instance. - -== Example == -class Poll(models.Model): - question = models.CharField(max_length = 200) - pub_date = models.DateTimeField('date published') - - history = HistoricalRecords() - -class Choice(models.Model): - poll = models.ForeignKey(Poll) - choice = models.CharField(max_length=200) - votes = models.IntegerField() - - history = HistoricalRecords() - - -$ ./manage.py shell -In [2]: from poll.models import Poll, Choice - -In [3]: Poll.objects.all() -Out[3]: [] - -In [4]: import datetime - -In [5]: p = Poll(question="what's up?", pub_date=datetime.datetime.now()) - -In [6]: p.save() - -In [7]: p -Out[7]: <Poll: Poll object> - -In [9]: p.history.all() -Out[9]: [<HistoricalPoll: Poll object as of 2010-10-25 18:03:29.855689>] - -In [10]: p.pub_date = datetime.datetime(2007,4,1,0,0) - -In [11]: p.save() - -In [13]: p.history.all() -Out[13]: [<HistoricalPoll: Poll object as of 2010-10-25 18:04:13.814128>, <HistoricalPoll: Poll object as of 2010-10-25 18:03:29.855689>] - -In [14]: p.choice_set.create(choice='Not Much', votes=0) -Out[14]: <Choice: Choice object> - -In [15]: p.choice_set.create(choice='The sky', votes=0) -Out[15]: <Choice: Choice object> - -In [16]: c = p.choice_set.create(choice='Just hacking again', votes=0) - -In [17]: c.poll -Out[17]: <Poll: Poll object> - -In [19]: c.history.all() -Out[19]: [<HistoricalChoice: Choice object as of 2010-10-25 18:05:30.160595>] - -In [20]: Choice.history -Out[20]: <simple_history.manager.HistoryManager object at 0x1cc4290> - -In [21]: Choice.history.all() -Out[21]: [<HistoricalChoice: Choice object as of 2010-10-25 18:05:30.160595>, <HistoricalChoice: Choice object as of 2010-10-25 18:05:12.183340>, <HistoricalChoice: Choice object as of 2010-10-25 18:04:59.047351>] - diff --git a/django-simple-history/setup.py b/django-simple-history/setup.py deleted file mode 100644 index 712d7d2d4..000000000 --- a/django-simple-history/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -from distutils.core import setup -import os - -# compile the list of packages available, because distutils doesn't have an easy way to do this -packages, data_files = [], [] -root_dir = os.path.dirname(__file__) -if root_dir: - os.chdir(root_dir) - -for dirpath, dirnames, filenames in os.walk('simple_history'): - # ignore dirnames that start with '.' - for i, dirname in enumerate(dirnames): - if dirname.startswith('.'): - del dirnames[i] - if '__init__.py' in filenames: - pkg = dirpath.replace(os.path.sep, '.') - if os.path.altsep: - pkg = pkg.replace(os.path.altsep, '.') - packages.append(pkg) - elif filenames: - # strip 'simple_history/' or 'simple_history\' - prefix = dirpath[15:] - for f in filenames: - data_files.append(os.path.join(prefix, f)) - -setup(name='simple_history', - version='1.1.3', - description='Store Django model history with the ability to revert back to a specific change at any time.', - author='Corey Bertram', - author_email='corey@qr7.com', - mantainer='Joao Pedro Francese', - mantainer_email='joaofrancese@gmail.com', - url='http://bitbucket.org/joaofrancese/django-simple-history', - package_dir={'simple_history': 'simple_history'}, - packages=packages, - package_data={'simple_history': data_files}, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Framework :: Django", - ], - ) diff --git a/django-simple-history/simple_history/__init__.py b/django-simple-history/simple_history/__init__.py deleted file mode 100755 index 6df0b60b6..000000000 --- a/django-simple-history/simple_history/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -import models - - -registered_models = {} - - -def register(model, app=None, manager_name='history'): - """ - Create historical model for `model` and attach history manager to `model`. - - Keyword arguments: - app -- App to install historical model into (defaults to model.__module__) - manager_name -- class attribute name to use for historical manager - - This method should be used as an alternative to attaching an - `HistoricalManager` instance directly to `model`. - """ - if not model in registered_models: - records = models.HistoricalRecords() - records.manager_name = manager_name - records.module = ("%s.models" % app) or model.__module__ - records.finalize(model) diff --git a/django-simple-history/simple_history/admin.py b/django-simple-history/simple_history/admin.py deleted file mode 100644 index 7d83e1016..000000000 --- a/django-simple-history/simple_history/admin.py +++ /dev/null @@ -1,139 +0,0 @@ -from django import template -from django.core.exceptions import PermissionDenied -from django.conf.urls.defaults import patterns, url -from django.contrib import admin -from django.contrib.admin import helpers -from django.contrib.contenttypes.models import ContentType -from django.core.urlresolvers import reverse -from django.shortcuts import get_object_or_404, render_to_response -from django.contrib.admin.util import unquote -from django.utils.text import capfirst -from django.utils.html import mark_safe -from django.utils.translation import ugettext as _ -from django.utils.encoding import force_unicode - - -class SimpleHistoryAdmin(admin.ModelAdmin): - object_history_template = "simple_history/object_history.html" - object_history_form_template = "simple_history/object_history_form.html" - - def get_urls(self): - """Returns the additional urls used by the Reversion admin.""" - urls = super(SimpleHistoryAdmin, self).get_urls() - admin_site = self.admin_site - opts = self.model._meta - info = opts.app_label, opts.module_name, - history_urls = patterns("", - url("^([^/]+)/history/([^/]+)/$", - admin_site.admin_view(self.history_form_view), - name='%s_%s_simple_history' % info),) - return history_urls + urls - - def history_view(self, request, object_id, extra_context=None): - "The 'history' admin view for this model." - model = self.model - opts = model._meta - app_label = opts.app_label - pk_name = opts.pk.attname - history = getattr(model, model._meta.simple_history_manager_attribute) - action_list = history.filter(**{pk_name: object_id}) - # If no history was found, see whether this object even exists. - obj = get_object_or_404(model, pk=unquote(object_id)) - context = { - 'title': _('Change history: %s') % force_unicode(obj), - 'action_list': action_list, - 'module_name': capfirst(force_unicode(opts.verbose_name_plural)), - 'object': obj, - 'root_path': getattr(self.admin_site, 'root_path', None), - 'app_label': app_label, - 'opts': opts - } - context.update(extra_context or {}) - context_instance = template.RequestContext(request, current_app=self.admin_site.name) - return render_to_response(self.object_history_template, context, context_instance=context_instance) - - def history_form_view(self, request, object_id, version_id): - original_model = self.model - original_opts = original_model._meta - history = getattr(self.model, self.model._meta.simple_history_manager_attribute) - model = history.model - opts = model._meta - pk_name = original_opts.pk.attname - record = get_object_or_404(model, **{pk_name: object_id, 'history_id': version_id}) - obj = record.instance - obj._state.adding = False - - if not self.has_change_permission(request, obj): - raise PermissionDenied - - if request.method == 'POST' and '_saveas_new' in request.POST: - return self.add_view(request, form_url='../add/') - - formsets = [] - ModelForm = self.get_form(request, obj) - if request.method == 'POST': - form = ModelForm(request.POST, request.FILES, instance=obj) - if form.is_valid(): - form_validated = True - new_object = self.save_form(request, form, change=True) - else: - form_validated = False - new_object = obj - prefixes = {} - - if form_validated: - self.save_model(request, new_object, form, change=True) - form.save_m2m() - - change_message = self.construct_change_message(request, form, formsets) - self.log_change(request, new_object, change_message) - return self.response_change(request, new_object) - - else: - form = ModelForm(instance=obj) - - adminForm = helpers.AdminForm(form, self.get_fieldsets(request, obj), - self.prepopulated_fields, self.get_readonly_fields(request, obj), - model_admin=self) - media = self.media + adminForm.media - - url_triplet = (self.admin_site.name, original_opts.app_label, - original_opts.module_name) - context = { - 'title': _('Revert %s') % force_unicode(obj), - 'adminform': adminForm, - 'object_id': object_id, - 'original': obj, - 'is_popup': False, - 'media': mark_safe(media), - 'errors': helpers.AdminErrorList(form, formsets), - 'app_label': opts.app_label, - 'original_opts': original_opts, - 'changelist_url': reverse('%s:%s_%s_changelist' % url_triplet), - 'change_url': reverse('%s:%s_%s_change' % url_triplet, args=(obj.pk,)), - 'history_url': reverse('%s:%s_%s_history' % url_triplet, args=(obj.pk,)), - # Context variables copied from render_change_form - 'add': False, - 'change': True, - 'has_add_permission': self.has_add_permission(request), - 'has_change_permission': self.has_change_permission(request, obj), - 'has_delete_permission': self.has_delete_permission(request, obj), - 'has_file_field': True, - 'has_absolute_url': False, - 'ordered_objects': opts.get_ordered_objects(), - 'form_url': '', - 'opts': opts, - 'content_type_id': ContentType.objects.get_for_model(self.model).id, - 'save_as': self.save_as, - 'save_on_top': self.save_on_top, - 'root_path': getattr(self.admin_site, 'root_path', None), - } - context_instance = template.RequestContext(request, current_app=self.admin_site.name) - return render_to_response(self.object_history_form_template, context, context_instance) - - def save_model(self, request, obj, form, change): - """ - Add the admin user to a special model attribute for reference after save - """ - obj._history_user = request.user - super(SimpleHistoryAdmin, self).save_model(request, obj, form, change) diff --git a/django-simple-history/simple_history/manager.py b/django-simple-history/simple_history/manager.py deleted file mode 100755 index 923b310eb..000000000 --- a/django-simple-history/simple_history/manager.py +++ /dev/null @@ -1,75 +0,0 @@ -from django.db import models - - -class HistoryDescriptor(object): - def __init__(self, model): - self.model = model - - def __get__(self, instance, owner): - if instance is None: - return HistoryManager(self.model) - return HistoryManager(self.model, instance) - - -class HistoryManager(models.Manager): - def __init__(self, model, instance=None): - super(HistoryManager, self).__init__() - self.model = model - self.instance = instance - - def get_query_set(self): - if self.instance is None: - return super(HistoryManager, self).get_query_set() - - if isinstance(self.instance._meta.pk, models.OneToOneField): - filter = {self.instance._meta.pk.name + "_id": self.instance.pk} - else: - filter = {self.instance._meta.pk.name: self.instance.pk} - return super(HistoryManager, self).get_query_set().filter(**filter) - - def most_recent(self): - """ - Returns the most recent copy of the instance available in the history. - """ - if not self.instance: - raise TypeError("Can't use most_recent() without a %s instance." % - self.instance._meta.object_name) - tmp = [] - for field in self.instance._meta.fields: - if isinstance(field, models.ForeignKey): - tmp.append(field.name + "_id") - else: - tmp.append(field.name) - fields = tuple(tmp) - try: - values = self.values_list(*fields)[0] - except IndexError: - raise self.instance.DoesNotExist("%s has no historical record." % - self.instance._meta.object_name) - return self.instance.__class__(*values) - - def as_of(self, date): - """ - Returns an instance of the original model with all the attributes set - according to what was present on the object on the date provided. - """ - if not self.instance: - raise TypeError("Can't use as_of() without a %s instance." % - self.instance._meta.object_name) - tmp = [] - for field in self.instance._meta.fields: - if isinstance(field, models.ForeignKey): - tmp.append(field.name + "_id") - else: - tmp.append(field.name) - fields = tuple(tmp) - qs = self.filter(history_date__lte=date) - try: - values = qs.values_list('history_type', *fields)[0] - except IndexError: - raise self.instance.DoesNotExist("%s had not yet been created." % - self.instance._meta.object_name) - if values[0] == '-': - raise self.instance.DoesNotExist("%s had already been deleted." % - self.instance._meta.object_name) - return self.instance.__class__(*values[1:]) diff --git a/django-simple-history/simple_history/models.py b/django-simple-history/simple_history/models.py deleted file mode 100644 index 06054ba34..000000000 --- a/django-simple-history/simple_history/models.py +++ /dev/null @@ -1,169 +0,0 @@ -import copy -from django.db import models -from django.contrib import admin -from django.contrib.auth.models import User -from django.utils import importlib -from manager import HistoryDescriptor - - -class HistoricalRecords(object): - def contribute_to_class(self, cls, name): - self.manager_name = name - self.module = cls.__module__ - models.signals.class_prepared.connect(self.finalize, sender=cls) - - def save_without_historical_record(self, *args, **kwargs): - """Caution! Make sure you know what you're doing before you use this method.""" - self.skip_history_when_saving = True - ret = self.save(*args, **kwargs) - del self.skip_history_when_saving - return ret - setattr(cls, 'save_without_historical_record', save_without_historical_record) - - def finalize(self, sender, **kwargs): - history_model = self.create_history_model(sender) - module = importlib.import_module(self.module) - setattr(module, history_model.__name__, history_model) - - # The HistoricalRecords object will be discarded, - # so the signal handlers can't use weak references. - models.signals.post_save.connect(self.post_save, sender=sender, - weak=False) - models.signals.post_delete.connect(self.post_delete, sender=sender, - weak=False) - - descriptor = HistoryDescriptor(history_model) - setattr(sender, self.manager_name, descriptor) - sender._meta.simple_history_manager_attribute = self.manager_name - - def create_history_model(self, model): - """ - Creates a historical model to associate with the model provided. - """ - attrs = {'__module__': self.module} - - fields = self.copy_fields(model) - attrs.update(fields) - attrs.update(self.get_extra_fields(model, fields)) - attrs.update(Meta=type('Meta', (), self.get_meta_options(model))) - name = 'Historical%s' % model._meta.object_name - return type(name, (models.Model,), attrs) - - def copy_fields(self, model): - """ - Creates copies of the model's original fields, returning - a dictionary mapping field name to copied field object. - """ - fields = {} - - for field in model._meta.fields: - field = copy.copy(field) - fk = None - - if isinstance(field, models.AutoField): - # The historical model gets its own AutoField, so any - # existing one must be replaced with an IntegerField. - field.__class__ = models.IntegerField - - if isinstance(field, models.ForeignKey): - field.__class__ = models.IntegerField - #ughhhh. open to suggestions here - try: - field.rel = None - except: - pass - try: - field.related = None - except: - pass - try: - field.related_query_name = None - except: - pass - field.null = True - field.blank = True - fk = True - else: - fk = False - - # The historical instance should not change creation/modification timestamps. - field.auto_now = False - field.auto_now_add = False - - if field.primary_key or field.unique: - # Unique fields can no longer be guaranteed unique, - # but they should still be indexed for faster lookups. - field.primary_key = False - field._unique = False - field.db_index = True - field.serialize = True - if fk: - field.name = field.name + "_id" - fields[field.name] = field - - return fields - - def get_extra_fields(self, model, fields): - """ - Returns a dictionary of fields that will be added to the historical - record model, in addition to the ones returned by copy_fields below. - """ - @models.permalink - def revert_url(self): - opts = model._meta - return ('%s:%s_%s_simple_history' % - (admin.site.name, opts.app_label, opts.module_name), - [getattr(self, opts.pk.attname), self.history_id]) - def get_instance(self): - return model(**dict([(k, getattr(self, k)) for k in fields])) - - return { - 'history_id': models.AutoField(primary_key=True), - 'history_date': models.DateTimeField(auto_now_add=True), - 'history_user': models.ForeignKey(User, null=True), - 'history_type': models.CharField(max_length=1, choices=( - ('+', 'Created'), - ('~', 'Changed'), - ('-', 'Deleted'), - )), - 'history_object': HistoricalObjectDescriptor(model), - 'instance': property(get_instance), - 'revert_url': revert_url, - '__unicode__': lambda self: u'%s as of %s' % (self.history_object, - self.history_date) - } - - def get_meta_options(self, model): - """ - Returns a dictionary of fields that will be added to - the Meta inner class of the historical record model. - """ - return { - 'ordering': ('-history_date', '-history_id'), - } - - def post_save(self, instance, created, **kwargs): - if not created and hasattr(instance, 'skip_history_when_saving'): - return - if not kwargs.get('raw', False): - self.create_historical_record(instance, created and '+' or '~') - - def post_delete(self, instance, **kwargs): - self.create_historical_record(instance, '-') - - def create_historical_record(self, instance, type): - history_user = getattr(instance, '_history_user', None) - manager = getattr(instance, self.manager_name) - attrs = {} - for field in instance._meta.fields: - attrs[field.attname] = getattr(instance, field.attname) - manager.create(history_type=type, history_user=history_user, **attrs) - - -class HistoricalObjectDescriptor(object): - def __init__(self, model): - self.model = model - - def __get__(self, instance, owner): - values = (getattr(instance, f.attname) for f in self.model._meta.fields) - return self.model(*values) diff --git a/django-simple-history/simple_history/templates/simple_history/object_history.html b/django-simple-history/simple_history/templates/simple_history/object_history.html deleted file mode 100644 index d14338232..000000000 --- a/django-simple-history/simple_history/templates/simple_history/object_history.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "admin/object_history.html" %} -{% load i18n %} - - -{% block content %} - <div id="content-main"> - - <p>{% blocktrans %}Choose a date from the list below to revert to a previous version of this object.{% endblocktrans %}</p> - - <div class="module"> - {% if action_list %} - <table id="change-history"> - <thead> - <tr> - <th scope="col">{% trans 'Object' %}</th> - <th scope="col">{% trans 'Date/time' %}</th> - <th scope="col">{% trans 'Comment' %}</th> - <th scope="col">{% trans 'Changed by' %}</th> - </tr> - </thead> - <tbody> - {% for action in action_list %} - <tr> - <td><a href="{{ action.revert_url }}">{{ action.history_object }}</a></td> - <td>{{ action.history_date }}</td> - <td>{{ action.get_history_type_display }}</td> - <td><a href="{% url admin:auth_user_change action.history_user_id %}">{{ action.history_user }}</a></td> - </tr> - {% endfor %} - </tbody> - </table> - {% else %} - <p>{% trans "This object doesn't have a change history." %}</p> - {% endif %} - </div> - </div> -{% endblock %} - diff --git a/django-simple-history/simple_history/templates/simple_history/object_history_form.html b/django-simple-history/simple_history/templates/simple_history/object_history_form.html deleted file mode 100644 index fdc8f1a87..000000000 --- a/django-simple-history/simple_history/templates/simple_history/object_history_form.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "admin/change_form.html" %} -{% load i18n %} - -{% block breadcrumbs %} - <div class="breadcrumbs"> - <a href="{% url admin:index %}">{% trans "Home" %}</a> › - <a href="{% url admin:app_list app_label %}">{{app_label|capfirst|escape}}</a> › - <a href="{{changelist_url}}">{{opts.verbose_name_plural|capfirst}}</a> › - <a href="{{change_url}}">{{original|truncatewords:"18"}}</a> › - <a href="../">{% trans "History" %}</a> › - {% blocktrans with original_opts.verbose_name as verbose_name %}Revert {{verbose_name}}{% endblocktrans %} - </div> -{% endblock %} - -{% comment %}Hack to remove "Save as New" and "Save and Continue" buttons {% endcomment %} -{% block content %} - {% with 1 as is_popup %} - {{block.super}} - {% endwith %} -{% endblock %} - -{% block form_top %} - <p>{% blocktrans %}Press the save button below to revert to this version of the object.{% endblocktrans %}</p> -{% endblock %} diff --git a/example_project/__init__.py b/example_project/__init__.py index 0cfc3ae26..c6adb7559 100644 --- a/example_project/__init__.py +++ b/example_project/__init__.py @@ -1,5 +1,6 @@ # force the retranslation of generated strings and external module -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ + _(u"username") _(u"email address") _(u"warehouse") diff --git a/example_project/local_settings.py.gitlab-ci b/example_project/local_settings.py.gitlab-ci index 81196b4a0..913f10fea 100644 --- a/example_project/local_settings.py.gitlab-ci +++ b/example_project/local_settings.py.gitlab-ci @@ -4,7 +4,7 @@ DATABASES = { 'NAME': 'gis', 'USER': 'gis', 'PASSWORD': 'gis', - 'HOST': 'iggdrasil-postgis-1.5', + 'HOST': 'mdillon-postgis', 'PORT': '5432', } } @@ -13,3 +13,5 @@ LOGFILE = '/tmp/ishtar.log' PROJECT_SLUG = "CI-instance" USE_SPATIALITE_FOR_TESTS = False + +SECRET_KEY = "not-so-secret-key" diff --git a/example_project/local_settings.py.sample b/example_project/local_settings.py.sample index 5a7550d9a..f49963c84 100644 --- a/example_project/local_settings.py.sample +++ b/example_project/local_settings.py.sample @@ -4,14 +4,13 @@ # rename this file to local_settings.py and overload settings in this file # Make this string unique, and don't share it with anybody. +# Don't leave it empty SECRET_KEY = '' ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) -MANAGERS = ADMINS - DATABASES = { 'default': { 'NAME': 'ishtar', diff --git a/example_project/manage.py b/example_project/manage.py index 4981a4830..80114eb68 100755 --- a/example_project/manage.py +++ b/example_project/manage.py @@ -1,15 +1,12 @@ #!/usr/bin/env python -from django.core.management import execute_manager -import os, sys +import os +import sys sys.path.append(os.path.abspath('..')) -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) - sys.exit(1) - if __name__ == "__main__": - execute_manager(settings) + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/example_project/settings.py b/example_project/settings.py index c7880d8c8..ea50daffb 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -7,10 +7,11 @@ import sys DEBUG = False DEBUG_TOOLBAR = False -TEMPLATE_DEBUG = DEBUG +DEBUG_TO_CONSOLE = False SQL_DEBUG = False DJANGO_EXTENSIONS = False -USE_SPATIALITE_FOR_TESTS = True +USE_SPATIALITE_FOR_TESTS = False +TEST_VIEWS = True if "test" in sys.argv: sys.path.insert(0, '..') @@ -31,11 +32,14 @@ BASE_URL = "/" URL_PATH = "" EXTRA_VERSION = 'git' +STATICFILES_DIRS = ( + ROOT_PATH + "../static/", +) + ODT_TEMPLATE = ROOT_PATH + "../ishtar_common/static/template.odt" LOGIN_REDIRECT_URL = "/" + URL_PATH -AUTH_PROFILE_MODULE = 'ishtar_common.IshtarUser' ACCOUNT_ACTIVATION_DAYS = 7 # change this in local_settings @@ -93,14 +97,7 @@ MEDIA_ROOT = ROOT_PATH + 'media/' # Examples: "http://media.lawrence.com", "http://example.com/media/" MEDIA_URL = '/media/' -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - # 'django.template.loaders.eggs.Loader', -) - -MIDDLEWARE_CLASSES = [ +MIDDLEWARE = [ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', @@ -109,21 +106,29 @@ MIDDLEWARE_CLASSES = [ 'django.middleware.locale.LocaleMiddleware', ] -TEMPLATE_CONTEXT_PROCESSORS = ( - 'ishtar_common.context_processors.get_base_context', - "django.contrib.auth.context_processors.auth", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", - "django.core.context_processors.media", - "django.core.context_processors.static", - "django.core.context_processors.request", -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(ROOT_PATH, 'templates')], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + "django.template.context_processors.debug", + "django.template.context_processors.request", + 'ishtar_common.context_processors.get_base_context', + "django.contrib.auth.context_processors.auth", + 'django.contrib.messages.context_processors.messages', + "django.template.context_processors.i18n", + "django.template.context_processors.media", + "django.template.context_processors.static", + "django.template.context_processors.csrf" + ], + }, + }, +] -ROOT_URLCONF = 'example_project.urls' -TEMPLATE_DIRS = ( - ROOT_PATH + 'templates', -) +ROOT_URLCONF = 'example_project.urls' AUTHENTICATION_BACKENDS = ( 'ishtar_common.backend.ObjectPermBackend', @@ -137,10 +142,8 @@ INSTALLED_APPS = [ 'django.contrib.sites', 'django.contrib.gis', 'django.contrib.staticfiles', - 'django.contrib.formtools', 'django.contrib.messages', 'django.contrib.humanize', - 'south', 'registration', # 'geodjangofla', 'ishtar_pdl', @@ -151,6 +154,7 @@ INSTALLED_APPS = [ 'archaeological_context_records', 'archaeological_warehouse', 'archaeological_finds', + 'ajax_select', # 'debug_toolbar', ] @@ -195,6 +199,11 @@ LOGGING = { 'level': 'ERROR', 'propagate': False, }, + 'django.server': { + 'handlers': ['console'], + 'level': 'INFO', + 'propagate': False, + }, 'ishtar_pdl': default_handler, 'ishtar_common': default_handler, 'archaeological_files_pdl': default_handler, @@ -234,9 +243,6 @@ ISHTAR_DOC_TYPES = {u"undefined": u"Undefined"} ISHTAR_DPTS = [] -PRE_APPS = [] -EXTRA_APPS = [] - TEST_RUNNER = 'ishtar_common.tests.ManagedModelTestRunner' try: @@ -246,12 +252,9 @@ except ImportError, e: TESTING = sys.argv[1:2] == ['test'] -if TESTING: - SOUTH_TESTS_MIGRATE = False - - if USE_SPATIALITE_FOR_TESTS: - DATABASES['default']['ENGINE'] = \ - 'django.contrib.gis.db.backends.spatialite' +# if TESTING and USE_SPATIALITE_FOR_TESTS: +# DATABASES['default']['ENGINE'] = \ +# 'django.contrib.gis.db.backends.spatialite' PROJECT_SLUG = locals().get('PROJECT_SLUG', 'default') @@ -269,7 +272,10 @@ JQUERY_UI_URL = STATIC_URL + "js/jquery-ui/" if DEBUG: # make all loggers use the console for logger in LOGGING['loggers']: - LOGGING['loggers'][logger]['handlers'] += ['console'] + if DEBUG_TO_CONSOLE: + LOGGING['loggers'][logger]['handlers'] = ['console'] + elif 'console' not in LOGGING['loggers'][logger]['handlers']: + LOGGING['loggers'][logger]['handlers'] += ['console'] if DJANGO_EXTENSIONS: INSTALLED_APPS.append('django_extensions') @@ -279,18 +285,21 @@ if DEBUG_TOOLBAR: sys.path.insert(0, '..') global DEBUG_TOOLBAR_PANELS global DEBUG_TOOLBAR_CONFIG - MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware'] + MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware'] INSTALLED_APPS += ['debug_toolbar'] DEBUG_TOOLBAR_PANELS = ( - 'debug_toolbar.panels.version.VersionDebugPanel', - 'debug_toolbar.panels.timer.TimerDebugPanel', - 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', - 'debug_toolbar.panels.headers.HeaderDebugPanel', - 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', - 'debug_toolbar.panels.template.TemplateDebugPanel', - 'debug_toolbar.panels.sql.SQLDebugPanel', - 'debug_toolbar.panels.signals.SignalDebugPanel', - 'debug_toolbar.panels.logger.LoggingPanel', + 'debug_toolbar.panels.versions.VersionsPanel', + 'debug_toolbar.panels.timer.TimerPanel', + 'debug_toolbar.panels.settings.SettingsPanel', + 'debug_toolbar.panels.headers.HeadersPanel', + 'debug_toolbar.panels.request.RequestPanel', + 'debug_toolbar.panels.sql.SQLPanel', + 'debug_toolbar.panels.staticfiles.StaticFilesPanel', + 'debug_toolbar.panels.templates.TemplatesPanel', + 'debug_toolbar.panels.cache.CachePanel', + 'debug_toolbar.panels.signals.SignalsPanel', + 'debug_toolbar.panels.logging.LoggingPanel', + 'debug_toolbar.panels.redirects.RedirectsPanel', ) DEBUG_TOOLBAR_CONFIG = {'INTERCEPT_REDIRECTS': False} @@ -303,3 +312,7 @@ if SQL_DEBUG: if 'test' in sys.argv: PROJECT_SLUG += "-test" + +if not DEBUG: + # persistent connection + DATABASES['default']['CONN_MAX_AGE'] = 600 diff --git a/example_project/urls.py b/example_project/urls.py index 62a6b1e04..79645b8ae 100644 --- a/example_project/urls.py +++ b/example_project/urls.py @@ -1,38 +1,45 @@ from django.conf import settings -from django.conf.urls.defaults import * +from django.conf.urls import include, url from django.contrib import admin +from ishtar_common.apps import admin_site +from ajax_select import urls as ajax_select_urls + +from ishtar_common.views import index + admin.autodiscover() -# admin.site.unregister(User) -urlpatterns = patterns( - '', (r'^accounts/', include('registration.urls')), -) +urlpatterns = [ + url(r'^accounts/', include('registration.urls')), + +] APP_LIST = ['archaeological_files_pdl', 'archaeological_files', 'archaeological_operations', 'archaeological_context_records', 'archaeological_warehouse', 'archaeological_finds'] for app in APP_LIST: - # filter by activated apps? - urlpatterns += patterns( - '', ('', include(app + '.urls')), - ) - -urlpatterns += patterns( - '', ('', include('ishtar_common.urls')), -) + urlpatterns += [ + url('', include(app + '.urls')), + ] -urlpatterns += patterns( - 'ishtar_common.views', url(r'^$', 'index', name='start'), -) - -urlpatterns += patterns( - '', (r'^admin/', include(admin.site.urls)), -) +urlpatterns += [ + url(r'^admin/', include(admin_site.urls)), + url(r'^ajax-select/', include(ajax_select_urls)), + url(r'', include('ishtar_common.urls')), + url(r'^$', index, name='start'), +] if settings.DEBUG: # static files (images, css, javascript, etc.) - urlpatterns += patterns( - '', (r'^media/(?P<path>.*)$', 'django.views.static.serve', - {'document_root': settings.MEDIA_ROOT})) + from django.conf.urls.static import static + from django.contrib.staticfiles.urls import staticfiles_urlpatterns + urlpatterns += staticfiles_urlpatterns() + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + +if settings.DEBUG_TOOLBAR: + import debug_toolbar + urlpatterns = [ + url(r'^__debug__/', include(debug_toolbar.urls)), + ] + urlpatterns + diff --git a/fixtures/initial_data-auth-fr.json b/fixtures/initial_data-auth-fr.json index b295e238d..68fbeda88 100644 --- a/fixtures/initial_data-auth-fr.json +++ b/fixtures/initial_data-auth-fr.json @@ -1,4978 +1,6272 @@ [ - { - "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": 236, - "model": "auth.permission", - "fields": { - "codename": "add_activitytype", - "name": "Can add Activity Type", - "content_type": 67 - } - }, - { - "pk": 237, - "model": "auth.permission", - "fields": { - "codename": "change_activitytype", - "name": "Can change Activity Type", - "content_type": 67 - } - }, - { - "pk": 238, - "model": "auth.permission", - "fields": { - "codename": "delete_activitytype", - "name": "Can delete Activity Type", - "content_type": 67 - } - }, - { - "pk": 245, - "model": "auth.permission", - "fields": { - "codename": "add_contextrecord", - "name": "Can add Context Record", - "content_type": 70 - } - }, - { - "pk": 250, - "model": "auth.permission", - "fields": { - "codename": "add_own_contextrecord", - "name": "Can add own Context Record", - "content_type": 70 - } - }, - { - "pk": 246, - "model": "auth.permission", - "fields": { - "codename": "change_contextrecord", - "name": "Can change Context Record", - "content_type": 70 - } - }, - { - "pk": 251, - "model": "auth.permission", - "fields": { - "codename": "change_own_contextrecord", - "name": "Can change own Context Record", - "content_type": 70 - } - }, - { - "pk": 247, - "model": "auth.permission", - "fields": { - "codename": "delete_contextrecord", - "name": "Can delete Context Record", - "content_type": 70 - } - }, - { - "pk": 252, - "model": "auth.permission", - "fields": { - "codename": "delete_own_contextrecord", - "name": "Can delete own Context Record", - "content_type": 70 - } - }, - { - "pk": 248, - "model": "auth.permission", - "fields": { - "codename": "view_contextrecord", - "name": "Can view all Context Records", - "content_type": 70 - } - }, - { - "pk": 249, - "model": "auth.permission", - "fields": { - "codename": "view_own_contextrecord", - "name": "Can view own Context Record", - "content_type": 70 - } - }, - { - "pk": 259, - "model": "auth.permission", - "fields": { - "codename": "add_contextrecordsource", - "name": "Can add Context record documentation", - "content_type": 73 - } - }, - { - "pk": 425, - "model": "auth.permission", - "fields": { - "codename": "add_own_contextrecordsource", - "name": "Can add own Context record source", - "content_type": 73 - } - }, - { - "pk": 260, - "model": "auth.permission", - "fields": { - "codename": "change_contextrecordsource", - "name": "Can change Context record documentation", - "content_type": 73 - } - }, - { - "pk": 426, - "model": "auth.permission", - "fields": { - "codename": "change_own_contextrecordsource", - "name": "Can change own Context record source", - "content_type": 73 - } - }, - { - "pk": 261, - "model": "auth.permission", - "fields": { - "codename": "delete_contextrecordsource", - "name": "Can delete Context record documentation", - "content_type": 73 - } - }, - { - "pk": 427, - "model": "auth.permission", - "fields": { - "codename": "delete_own_contextrecordsource", - "name": "Can delete own Context record source", - "content_type": 73 - } - }, - { - "pk": 423, - "model": "auth.permission", - "fields": { - "codename": "view_contextrecordsource", - "name": "Can view all Context record sources", - "content_type": 73 - } - }, - { - "pk": 424, - "model": "auth.permission", - "fields": { - "codename": "view_own_contextrecordsource", - "name": "Can view own Context record source", - "content_type": 73 - } - }, - { - "pk": 230, - "model": "auth.permission", - "fields": { - "codename": "add_dating", - "name": "Can add Dating", - "content_type": 65 - } - }, - { - "pk": 231, - "model": "auth.permission", - "fields": { - "codename": "change_dating", - "name": "Can change Dating", - "content_type": 65 - } - }, - { - "pk": 232, - "model": "auth.permission", - "fields": { - "codename": "delete_dating", - "name": "Can delete Dating", - "content_type": 65 - } - }, - { - "pk": 227, - "model": "auth.permission", - "fields": { - "codename": "add_datingquality", - "name": "Can add Dating quality", - "content_type": 64 - } - }, - { - "pk": 228, - "model": "auth.permission", - "fields": { - "codename": "change_datingquality", - "name": "Can change Dating quality", - "content_type": 64 - } - }, - { - "pk": 229, - "model": "auth.permission", - "fields": { - "codename": "delete_datingquality", - "name": "Can delete Dating quality", - "content_type": 64 - } - }, - { - "pk": 224, - "model": "auth.permission", - "fields": { - "codename": "add_datingtype", - "name": "Can add Dating type", - "content_type": 63 - } - }, - { - "pk": 225, - "model": "auth.permission", - "fields": { - "codename": "change_datingtype", - "name": "Can change Dating type", - "content_type": 63 - } - }, - { - "pk": 226, - "model": "auth.permission", - "fields": { - "codename": "delete_datingtype", - "name": "Can delete Dating type", - "content_type": 63 - } - }, - { - "pk": 412, - "model": "auth.permission", - "fields": { - "codename": "add_documentationtype", - "name": "Can add Documentation type", - "content_type": 114 - } - }, - { - "pk": 413, - "model": "auth.permission", - "fields": { - "codename": "change_documentationtype", - "name": "Can change Documentation type", - "content_type": 114 - } - }, - { - "pk": 414, - "model": "auth.permission", - "fields": { - "codename": "delete_documentationtype", - "name": "Can delete Documentation type", - "content_type": 114 - } - }, - { - "pk": 406, - "model": "auth.permission", - "fields": { - "codename": "add_excavationtechnictype", - "name": "Can add Excavation technic type", - "content_type": 112 - } - }, - { - "pk": 407, - "model": "auth.permission", - "fields": { - "codename": "change_excavationtechnictype", - "name": "Can change Excavation technic type", - "content_type": 112 - } - }, - { - "pk": 408, - "model": "auth.permission", - "fields": { - "codename": "delete_excavationtechnictype", - "name": "Can delete Excavation technic type", - "content_type": 112 - } - }, - { - "pk": 242, - "model": "auth.permission", - "fields": { - "codename": "add_historicalcontextrecord", - "name": "Can add historical context record", - "content_type": 69 - } - }, - { - "pk": 243, - "model": "auth.permission", - "fields": { - "codename": "change_historicalcontextrecord", - "name": "Can change historical context record", - "content_type": 69 - } - }, - { - "pk": 244, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalcontextrecord", - "name": "Can delete historical context record", - "content_type": 69 - } - }, - { - "pk": 239, - "model": "auth.permission", - "fields": { - "codename": "add_identificationtype", - "name": "Can add Identification Type", - "content_type": 68 - } - }, - { - "pk": 240, - "model": "auth.permission", - "fields": { - "codename": "change_identificationtype", - "name": "Can change Identification Type", - "content_type": 68 - } - }, - { - "pk": 241, - "model": "auth.permission", - "fields": { - "codename": "delete_identificationtype", - "name": "Can delete Identification Type", - "content_type": 68 - } - }, - { - "pk": 256, - "model": "auth.permission", - "fields": { - "codename": "add_recordrelations", - "name": "Can add Record relation", - "content_type": 72 - } - }, - { - "pk": 257, - "model": "auth.permission", - "fields": { - "codename": "change_recordrelations", - "name": "Can change Record relation", - "content_type": 72 - } - }, - { - "pk": 258, - "model": "auth.permission", - "fields": { - "codename": "delete_recordrelations", - "name": "Can delete Record relation", - "content_type": 72 - } - }, - { - "pk": 409, - "model": "auth.permission", - "fields": { - "codename": "add_recordrelationview", - "name": "Can add record relation view", - "content_type": 113 - } - }, - { - "pk": 410, - "model": "auth.permission", - "fields": { - "codename": "change_recordrelationview", - "name": "Can change record relation view", - "content_type": 113 - } - }, - { - "pk": 411, - "model": "auth.permission", - "fields": { - "codename": "delete_recordrelationview", - "name": "Can delete record relation view", - "content_type": 113 - } - }, - { - "pk": 253, - "model": "auth.permission", - "fields": { - "codename": "add_relationtype", - "name": "Can add Relation type", - "content_type": 71 - } - }, - { - "pk": 254, - "model": "auth.permission", - "fields": { - "codename": "change_relationtype", - "name": "Can change Relation type", - "content_type": 71 - } - }, - { - "pk": 255, - "model": "auth.permission", - "fields": { - "codename": "delete_relationtype", - "name": "Can delete Relation type", - "content_type": 71 - } - }, - { - "pk": 233, - "model": "auth.permission", - "fields": { - "codename": "add_unit", - "name": "Can add Unit Type", - "content_type": 66 - } - }, - { - "pk": 234, - "model": "auth.permission", - "fields": { - "codename": "change_unit", - "name": "Can change Unit Type", - "content_type": 66 - } - }, - { - "pk": 235, - "model": "auth.permission", - "fields": { - "codename": "delete_unit", - "name": "Can delete Unit Type", - "content_type": 66 - } - }, - { - "pk": 143, - "model": "auth.permission", - "fields": { - "codename": "add_file", - "name": "Can add Archaeological file", - "content_type": 45 - } - }, - { - "pk": 148, - "model": "auth.permission", - "fields": { - "codename": "add_own_file", - "name": "Can add own Archaelogical file", - "content_type": 45 - } - }, - { - "pk": 144, - "model": "auth.permission", - "fields": { - "codename": "change_file", - "name": "Can change Archaeological file", - "content_type": 45 - } - }, - { - "pk": 149, - "model": "auth.permission", - "fields": { - "codename": "change_own_file", - "name": "Can change own Archaelogical file", - "content_type": 45 - } - }, - { - "pk": 151, - "model": "auth.permission", - "fields": { - "codename": "close_file", - "name": "Can close File", - "content_type": 45 - } - }, - { - "pk": 145, - "model": "auth.permission", - "fields": { - "codename": "delete_file", - "name": "Can delete Archaeological file", - "content_type": 45 - } - }, - { - "pk": 150, - "model": "auth.permission", - "fields": { - "codename": "delete_own_file", - "name": "Can delete own Archaelogical file", - "content_type": 45 - } - }, - { - "pk": 146, - "model": "auth.permission", - "fields": { - "codename": "view_file", - "name": "Can view all Archaelogical files", - "content_type": 45 - } - }, - { - "pk": 147, - "model": "auth.permission", - "fields": { - "codename": "view_own_file", - "name": "Can view own Archaelogical file", - "content_type": 45 - } - }, - { - "pk": 152, - "model": "auth.permission", - "fields": { - "codename": "add_filebydepartment", - "name": "Can add file by department", - "content_type": 46 - } - }, - { - "pk": 153, - "model": "auth.permission", - "fields": { - "codename": "change_filebydepartment", - "name": "Can change file by department", - "content_type": 46 - } - }, - { - "pk": 154, - "model": "auth.permission", - "fields": { - "codename": "delete_filebydepartment", - "name": "Can delete file by department", - "content_type": 46 - } - }, - { - "pk": 131, - "model": "auth.permission", - "fields": { - "codename": "add_filetype", - "name": "Can add Archaeological file type", - "content_type": 41 - } - }, - { - "pk": 132, - "model": "auth.permission", - "fields": { - "codename": "change_filetype", - "name": "Can change Archaeological file type", - "content_type": 41 - } - }, - { - "pk": 133, - "model": "auth.permission", - "fields": { - "codename": "delete_filetype", - "name": "Can delete Archaeological file type", - "content_type": 41 - } - }, - { - "pk": 140, - "model": "auth.permission", - "fields": { - "codename": "add_historicalfile", - "name": "Can add historical file", - "content_type": 44 - } - }, - { - "pk": 141, - "model": "auth.permission", - "fields": { - "codename": "change_historicalfile", - "name": "Can change historical file", - "content_type": 44 - } - }, - { - "pk": 142, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalfile", - "name": "Can delete historical file", - "content_type": 44 - } - }, - { - "pk": 134, - "model": "auth.permission", - "fields": { - "codename": "add_permittype", - "name": "Can add Permit type", - "content_type": 42 - } - }, - { - "pk": 135, - "model": "auth.permission", - "fields": { - "codename": "change_permittype", - "name": "Can change Permit type", - "content_type": 42 - } - }, - { - "pk": 136, - "model": "auth.permission", - "fields": { - "codename": "delete_permittype", - "name": "Can delete Permit type", - "content_type": 42 - } - }, - { - "pk": 137, - "model": "auth.permission", - "fields": { - "codename": "add_saisinetype", - "name": "Can add Type Saisine", - "content_type": 43 - } - }, - { - "pk": 138, - "model": "auth.permission", - "fields": { - "codename": "change_saisinetype", - "name": "Can change Type Saisine", - "content_type": 43 - } - }, - { - "pk": 139, - "model": "auth.permission", - "fields": { - "codename": "delete_saisinetype", - "name": "Can delete Type Saisine", - "content_type": 43 - } - }, - { - "pk": 297, - "model": "auth.permission", - "fields": { - "codename": "add_basefind", - "name": "Can add Base find", - "content_type": 84 - } - }, - { - "pk": 302, - "model": "auth.permission", - "fields": { - "codename": "add_own_basefind", - "name": "Can add own Base find", - "content_type": 84 - } - }, - { - "pk": 298, - "model": "auth.permission", - "fields": { - "codename": "change_basefind", - "name": "Can change Base find", - "content_type": 84 - } - }, - { - "pk": 303, - "model": "auth.permission", - "fields": { - "codename": "change_own_basefind", - "name": "Can change own Base find", - "content_type": 84 - } - }, - { - "pk": 299, - "model": "auth.permission", - "fields": { - "codename": "delete_basefind", - "name": "Can delete Base find", - "content_type": 84 - } - }, - { - "pk": 304, - "model": "auth.permission", - "fields": { - "codename": "delete_own_basefind", - "name": "Can delete own Base find", - "content_type": 84 - } - }, - { - "pk": 300, - "model": "auth.permission", - "fields": { - "codename": "view_basefind", - "name": "Can view all Base finds", - "content_type": 84 - } - }, - { - "pk": 301, - "model": "auth.permission", - "fields": { - "codename": "view_own_basefind", - "name": "Can view own Base find", - "content_type": 84 - } - }, - { - "pk": 395, - "model": "auth.permission", - "fields": { - "codename": "add_batchtype", - "name": "Can add Batch type", - "content_type": 110 - } - }, - { - "pk": 396, - "model": "auth.permission", - "fields": { - "codename": "change_batchtype", - "name": "Can change Batch type", - "content_type": 110 - } - }, - { - "pk": 397, - "model": "auth.permission", - "fields": { - "codename": "delete_batchtype", - "name": "Can delete Batch type", - "content_type": 110 - } - }, - { - "pk": 282, - "model": "auth.permission", - "fields": { - "codename": "add_conservatorystate", - "name": "Can add Conservatory state", - "content_type": 79 - } - }, - { - "pk": 283, - "model": "auth.permission", - "fields": { - "codename": "change_conservatorystate", - "name": "Can change Conservatory state", - "content_type": 79 - } - }, - { - "pk": 284, - "model": "auth.permission", - "fields": { - "codename": "delete_conservatorystate", - "name": "Can delete Conservatory state", - "content_type": 79 - } - }, - { - "pk": 311, - "model": "auth.permission", - "fields": { - "codename": "add_find", - "name": "Can add Find", - "content_type": 87 - } - }, - { - "pk": 316, - "model": "auth.permission", - "fields": { - "codename": "add_own_find", - "name": "Can add own Find", - "content_type": 87 - } - }, - { - "pk": 312, - "model": "auth.permission", - "fields": { - "codename": "change_find", - "name": "Can change Find", - "content_type": 87 - } - }, - { - "pk": 317, - "model": "auth.permission", - "fields": { - "codename": "change_own_find", - "name": "Can change own Find", - "content_type": 87 - } - }, - { - "pk": 313, - "model": "auth.permission", - "fields": { - "codename": "delete_find", - "name": "Can delete Find", - "content_type": 87 - } - }, - { - "pk": 318, - "model": "auth.permission", - "fields": { - "codename": "delete_own_find", - "name": "Can delete own Find", - "content_type": 87 - } - }, - { - "pk": 314, - "model": "auth.permission", - "fields": { - "codename": "view_find", - "name": "Can view all Finds", - "content_type": 87 - } - }, - { - "pk": 315, - "model": "auth.permission", - "fields": { - "codename": "view_own_find", - "name": "Can view own Find", - "content_type": 87 - } - }, - { - "pk": 305, - "model": "auth.permission", - "fields": { - "codename": "add_findbasket", - "name": "Can add find basket", - "content_type": 85 - } - }, - { - "pk": 306, - "model": "auth.permission", - "fields": { - "codename": "change_findbasket", - "name": "Can change find basket", - "content_type": 85 - } - }, - { - "pk": 307, - "model": "auth.permission", - "fields": { - "codename": "delete_findbasket", - "name": "Can delete find basket", - "content_type": 85 - } - }, - { - "pk": 354, - "model": "auth.permission", - "fields": { - "codename": "add_finddownstreamtreatments", - "name": "Can add find downstream treatments", - "content_type": 98 - } - }, - { - "pk": 355, - "model": "auth.permission", - "fields": { - "codename": "change_finddownstreamtreatments", - "name": "Can change find downstream treatments", - "content_type": 98 - } - }, - { - "pk": 356, - "model": "auth.permission", - "fields": { - "codename": "delete_finddownstreamtreatments", - "name": "Can delete find downstream treatments", - "content_type": 98 - } - }, - { - "pk": 319, - "model": "auth.permission", - "fields": { - "codename": "add_findsource", - "name": "Can add Find documentation", - "content_type": 88 - } - }, - { - "pk": 430, - "model": "auth.permission", - "fields": { - "codename": "add_own_findsource", - "name": "Can add own Find source", - "content_type": 88 - } - }, - { - "pk": 320, - "model": "auth.permission", - "fields": { - "codename": "change_findsource", - "name": "Can change Find documentation", - "content_type": 88 - } - }, - { - "pk": 431, - "model": "auth.permission", - "fields": { - "codename": "change_own_findsource", - "name": "Can change own Find source", - "content_type": 88 - } - }, - { - "pk": 321, - "model": "auth.permission", - "fields": { - "codename": "delete_findsource", - "name": "Can delete Find documentation", - "content_type": 88 - } - }, - { - "pk": 432, - "model": "auth.permission", - "fields": { - "codename": "delete_own_findsource", - "name": "Can delete own Find source", - "content_type": 88 - } - }, - { - "pk": 428, - "model": "auth.permission", - "fields": { - "codename": "view_findsource", - "name": "Can view all Find sources", - "content_type": 88 - } - }, - { - "pk": 429, - "model": "auth.permission", - "fields": { - "codename": "view_own_findsource", - "name": "Can view own Find source", - "content_type": 88 - } - }, - { - "pk": 357, - "model": "auth.permission", - "fields": { - "codename": "add_findtreatments", - "name": "Can add find treatments", - "content_type": 99 - } - }, - { - "pk": 358, - "model": "auth.permission", - "fields": { - "codename": "change_findtreatments", - "name": "Can change find treatments", - "content_type": 99 - } - }, - { - "pk": 359, - "model": "auth.permission", - "fields": { - "codename": "delete_findtreatments", - "name": "Can delete find treatments", - "content_type": 99 - } - }, - { - "pk": 351, - "model": "auth.permission", - "fields": { - "codename": "add_findupstreamtreatments", - "name": "Can add find upstream treatments", - "content_type": 97 - } - }, - { - "pk": 352, - "model": "auth.permission", - "fields": { - "codename": "change_findupstreamtreatments", - "name": "Can change find upstream treatments", - "content_type": 97 - } - }, - { - "pk": 353, - "model": "auth.permission", - "fields": { - "codename": "delete_findupstreamtreatments", - "name": "Can delete find upstream treatments", - "content_type": 97 - } - }, - { - "pk": 294, - "model": "auth.permission", - "fields": { - "codename": "add_historicalbasefind", - "name": "Can add historical base find", - "content_type": 83 - } - }, - { - "pk": 295, - "model": "auth.permission", - "fields": { - "codename": "change_historicalbasefind", - "name": "Can change historical base find", - "content_type": 83 - } - }, - { - "pk": 296, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalbasefind", - "name": "Can delete historical base find", - "content_type": 83 - } - }, - { - "pk": 308, - "model": "auth.permission", - "fields": { - "codename": "add_historicalfind", - "name": "Can add historical find", - "content_type": 86 - } - }, - { - "pk": 309, - "model": "auth.permission", - "fields": { - "codename": "change_historicalfind", - "name": "Can change historical find", - "content_type": 86 - } - }, - { - "pk": 310, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalfind", - "name": "Can delete historical find", - "content_type": 86 - } - }, - { - "pk": 325, - "model": "auth.permission", - "fields": { - "codename": "add_historicaltreatment", - "name": "Can add historical treatment", - "content_type": 90 - } - }, - { - "pk": 326, - "model": "auth.permission", - "fields": { - "codename": "change_historicaltreatment", - "name": "Can change historical treatment", - "content_type": 90 - } - }, - { - "pk": 327, - "model": "auth.permission", - "fields": { - "codename": "delete_historicaltreatment", - "name": "Can delete historical treatment", - "content_type": 90 - } - }, - { - "pk": 363, - "model": "auth.permission", - "fields": { - "codename": "add_historicaltreatmentfile", - "name": "Can add historical treatment file", - "content_type": 101 - } - }, - { - "pk": 364, - "model": "auth.permission", - "fields": { - "codename": "change_historicaltreatmentfile", - "name": "Can change historical treatment file", - "content_type": 101 - } - }, - { - "pk": 365, - "model": "auth.permission", - "fields": { - "codename": "delete_historicaltreatmentfile", - "name": "Can delete historical treatment file", - "content_type": 101 - } - }, - { - "pk": 288, - "model": "auth.permission", - "fields": { - "codename": "add_integritytype", - "name": "Can add Integrity type", - "content_type": 81 - } - }, - { - "pk": 289, - "model": "auth.permission", - "fields": { - "codename": "change_integritytype", - "name": "Can change Integrity type", - "content_type": 81 - } - }, - { - "pk": 290, - "model": "auth.permission", - "fields": { - "codename": "delete_integritytype", - "name": "Can delete Integrity type", - "content_type": 81 - } - }, - { - "pk": 279, - "model": "auth.permission", - "fields": { - "codename": "add_materialtype", - "name": "Can add Material type", - "content_type": 78 - } - }, - { - "pk": 280, - "model": "auth.permission", - "fields": { - "codename": "change_materialtype", - "name": "Can change Material type", - "content_type": 78 - } - }, - { - "pk": 281, - "model": "auth.permission", - "fields": { - "codename": "delete_materialtype", - "name": "Can delete Material type", - "content_type": 78 - } - }, - { - "pk": 291, - "model": "auth.permission", - "fields": { - "codename": "add_objecttype", - "name": "Can add Object type", - "content_type": 82 - } - }, - { - "pk": 292, - "model": "auth.permission", - "fields": { - "codename": "change_objecttype", - "name": "Can change Object type", - "content_type": 82 - } - }, - { - "pk": 293, - "model": "auth.permission", - "fields": { - "codename": "delete_objecttype", - "name": "Can delete Object type", - "content_type": 82 - } - }, - { - "pk": 285, - "model": "auth.permission", - "fields": { - "codename": "add_preservationtype", - "name": "Can add Preservation type", - "content_type": 80 - } - }, - { - "pk": 286, - "model": "auth.permission", - "fields": { - "codename": "change_preservationtype", - "name": "Can change Preservation type", - "content_type": 80 - } - }, - { - "pk": 287, - "model": "auth.permission", - "fields": { - "codename": "delete_preservationtype", - "name": "Can delete Preservation type", - "content_type": 80 - } - }, - { - "pk": 339, - "model": "auth.permission", - "fields": { - "codename": "add_property", - "name": "Can add Property", - "content_type": 93 - } - }, - { - "pk": 340, - "model": "auth.permission", - "fields": { - "codename": "change_property", - "name": "Can change Property", - "content_type": 93 - } - }, - { - "pk": 341, - "model": "auth.permission", - "fields": { - "codename": "delete_property", - "name": "Can delete Property", - "content_type": 93 - } - }, - { - "pk": 348, - "model": "auth.permission", - "fields": { - "codename": "add_remarkabilitytype", - "name": "Can add Remarkability type", - "content_type": 96 - } - }, - { - "pk": 349, - "model": "auth.permission", - "fields": { - "codename": "change_remarkabilitytype", - "name": "Can change Remarkability type", - "content_type": 96 - } - }, - { - "pk": 350, - "model": "auth.permission", - "fields": { - "codename": "delete_remarkabilitytype", - "name": "Can delete Remarkability type", - "content_type": 96 - } - }, - { - "pk": 333, - "model": "auth.permission", - "fields": { - "codename": "add_own_treatment", - "name": "Can add own Treatment", - "content_type": 91 - } - }, - { - "pk": 328, - "model": "auth.permission", - "fields": { - "codename": "add_treatment", - "name": "Can add Treatment", - "content_type": 91 - } - }, - { - "pk": 334, - "model": "auth.permission", - "fields": { - "codename": "change_own_treatment", - "name": "Can change own Treatment", - "content_type": 91 - } - }, - { - "pk": 329, - "model": "auth.permission", - "fields": { - "codename": "change_treatment", - "name": "Can change Treatment", - "content_type": 91 - } - }, - { - "pk": 335, - "model": "auth.permission", - "fields": { - "codename": "delete_own_treatment", - "name": "Can delete own Treatment", - "content_type": 91 - } - }, - { - "pk": 330, - "model": "auth.permission", - "fields": { - "codename": "delete_treatment", - "name": "Can delete Treatment", - "content_type": 91 - } - }, - { - "pk": 332, - "model": "auth.permission", - "fields": { - "codename": "view_own_treatment", - "name": "Can view own Treatment", - "content_type": 91 - } - }, - { - "pk": 331, - "model": "auth.permission", - "fields": { - "codename": "view_treatment", - "name": "Can view all Treatments", - "content_type": 91 - } - }, - { - "pk": 415, - "model": "auth.permission", - "fields": { - "codename": "add_filetreatment", - "name": "Can add Treatment request", - "content_type": 102 - } - }, - { - "pk": 400, - "model": "auth.permission", - "fields": { - "codename": "add_own_filetreatment", - "name": "Can add own Treatment request", - "content_type": 102 - } - }, - { - "pk": 366, - "model": "auth.permission", - "fields": { - "codename": "add_treatmentfile", - "name": "Can add Treatment file", - "content_type": 102 - } - }, - { - "pk": 416, - "model": "auth.permission", - "fields": { - "codename": "change_filetreatment", - "name": "Can change Treatment request", - "content_type": 102 - } - }, - { - "pk": 401, - "model": "auth.permission", - "fields": { - "codename": "change_own_filetreatment", - "name": "Can change own Treatment request", - "content_type": 102 - } - }, - { - "pk": 367, - "model": "auth.permission", - "fields": { - "codename": "change_treatmentfile", - "name": "Can change Treatment file", - "content_type": 102 - } - }, - { - "pk": 417, - "model": "auth.permission", - "fields": { - "codename": "delete_filetreatment", - "name": "Can delete Treatment request", - "content_type": 102 - } - }, - { - "pk": 402, - "model": "auth.permission", - "fields": { - "codename": "delete_own_filetreatment", - "name": "Can delete own Treatment request", - "content_type": 102 - } - }, - { - "pk": 368, - "model": "auth.permission", - "fields": { - "codename": "delete_treatmentfile", - "name": "Can delete Treatment file", - "content_type": 102 - } - }, - { - "pk": 398, - "model": "auth.permission", - "fields": { - "codename": "view_filetreatment", - "name": "Can view all Treatment requests", - "content_type": 102 - } - }, - { - "pk": 399, - "model": "auth.permission", - "fields": { - "codename": "view_own_filetreatment", - "name": "Can view own Treatment request", - "content_type": 102 - } - }, - { - "pk": 443, - "model": "auth.permission", - "fields": { - "codename": "add_own_filetreatmentsource", - "name": "Can add own Treatment request source", - "content_type": 103 - } - }, - { - "pk": 374, - "model": "auth.permission", - "fields": { - "codename": "add_treatmentfilesource", - "name": "Can add Treatment file documentation", - "content_type": 103 - } - }, - { - "pk": 444, - "model": "auth.permission", - "fields": { - "codename": "change_own_filetreatmentsource", - "name": "Can change own Treatment request source", - "content_type": 103 - } - }, - { - "pk": 375, - "model": "auth.permission", - "fields": { - "codename": "change_treatmentfilesource", - "name": "Can change Treatment file documentation", - "content_type": 103 - } - }, - { - "pk": 445, - "model": "auth.permission", - "fields": { - "codename": "delete_own_filetreatmentsource", - "name": "Can delete own Treatment request source", - "content_type": 103 - } - }, - { - "pk": 376, - "model": "auth.permission", - "fields": { - "codename": "delete_treatmentfilesource", - "name": "Can delete Treatment file documentation", - "content_type": 103 - } - }, - { - "pk": 438, - "model": "auth.permission", - "fields": { - "codename": "view_filetreatmentsource", - "name": "Can view all Treatment request source", - "content_type": 103 - } - }, - { - "pk": 442, - "model": "auth.permission", - "fields": { - "codename": "view_own_filetreatmentsource", - "name": "Can view own Treatment request source", - "content_type": 103 - } - }, - { - "pk": 360, - "model": "auth.permission", - "fields": { - "codename": "add_treatmentfiletype", - "name": "Can add Treatment file type", - "content_type": 100 - } - }, - { - "pk": 361, - "model": "auth.permission", - "fields": { - "codename": "change_treatmentfiletype", - "name": "Can change Treatment file type", - "content_type": 100 - } - }, - { - "pk": 362, - "model": "auth.permission", - "fields": { - "codename": "delete_treatmentfiletype", - "name": "Can delete Treatment file type", - "content_type": 100 - } - }, - { - "pk": 435, - "model": "auth.permission", - "fields": { - "codename": "add_own_treatmentsource", - "name": "Can add own Treatment source", - "content_type": 92 - } - }, - { - "pk": 336, - "model": "auth.permission", - "fields": { - "codename": "add_treatmentsource", - "name": "Can add Treatment documentation", - "content_type": 92 - } - }, - { - "pk": 436, - "model": "auth.permission", - "fields": { - "codename": "change_own_treatmentsource", - "name": "Can change own Treatment source", - "content_type": 92 - } - }, - { - "pk": 337, - "model": "auth.permission", - "fields": { - "codename": "change_treatmentsource", - "name": "Can change Treatment documentation", - "content_type": 92 - } - }, - { - "pk": 437, - "model": "auth.permission", - "fields": { - "codename": "delete_own_treatmentsource", - "name": "Can delete own Treatment source", - "content_type": 92 - } - }, - { - "pk": 338, - "model": "auth.permission", - "fields": { - "codename": "delete_treatmentsource", - "name": "Can delete Treatment documentation", - "content_type": 92 - } - }, - { - "pk": 434, - "model": "auth.permission", - "fields": { - "codename": "view_own_treatmentsource", - "name": "Can view own Treatment source", - "content_type": 92 - } - }, - { - "pk": 433, - "model": "auth.permission", - "fields": { - "codename": "view_treatmentsource", - "name": "Can view all Treatment source", - "content_type": 92 - } - }, - { - "pk": 389, - "model": "auth.permission", - "fields": { - "codename": "add_treatmentstate", - "name": "Can add Type of treatment state", - "content_type": 108 - } - }, - { - "pk": 390, - "model": "auth.permission", - "fields": { - "codename": "change_treatmentstate", - "name": "Can change Type of treatment state", - "content_type": 108 - } - }, - { - "pk": 391, - "model": "auth.permission", - "fields": { - "codename": "delete_treatmentstate", - "name": "Can delete Type of treatment state", - "content_type": 108 - } - }, - { - "pk": 322, - "model": "auth.permission", - "fields": { - "codename": "add_treatmenttype", - "name": "Can add Treatment type", - "content_type": 89 - } - }, - { - "pk": 323, - "model": "auth.permission", - "fields": { - "codename": "change_treatmenttype", - "name": "Can change Treatment type", - "content_type": 89 - } - }, - { - "pk": 324, - "model": "auth.permission", - "fields": { - "codename": "delete_treatmenttype", - "name": "Can delete Treatment type", - "content_type": 89 - } - }, - { - "pk": 201, - "model": "auth.permission", - "fields": { - "codename": "add_acttype", - "name": "Can add Act type", - "content_type": 57 - } - }, - { - "pk": 202, - "model": "auth.permission", - "fields": { - "codename": "change_acttype", - "name": "Can change Act type", - "content_type": 57 - } - }, - { - "pk": 203, - "model": "auth.permission", - "fields": { - "codename": "delete_acttype", - "name": "Can delete Act type", - "content_type": 57 - } - }, - { - "pk": 207, - "model": "auth.permission", - "fields": { - "codename": "add_administrativeact", - "name": "Can add Administrative act", - "content_type": 59 - } - }, - { - "pk": 212, - "model": "auth.permission", - "fields": { - "codename": "add_own_administrativeact", - "name": "Can add own Administrative act", - "content_type": 59 - } - }, - { - "pk": 208, - "model": "auth.permission", - "fields": { - "codename": "change_administrativeact", - "name": "Can change Administrative act", - "content_type": 59 - } - }, - { - "pk": 213, - "model": "auth.permission", - "fields": { - "codename": "change_own_administrativeact", - "name": "Can change own Administrative act", - "content_type": 59 - } - }, - { - "pk": 209, - "model": "auth.permission", - "fields": { - "codename": "delete_administrativeact", - "name": "Can delete Administrative act", - "content_type": 59 - } - }, - { - "pk": 214, - "model": "auth.permission", - "fields": { - "codename": "delete_own_administrativeact", - "name": "Can delete own Administrative act", - "content_type": 59 - } - }, - { - "pk": 210, - "model": "auth.permission", - "fields": { - "codename": "view_administrativeact", - "name": "Can view all Administrative acts", - "content_type": 59 - } - }, - { - "pk": 211, - "model": "auth.permission", - "fields": { - "codename": "view_own_administrativeact", - "name": "Can view own Administrative act", - "content_type": 59 - } - }, - { - "pk": 164, - "model": "auth.permission", - "fields": { - "codename": "add_archaeologicalsite", - "name": "Can add Archaeological site", - "content_type": 50 - } - }, - { - "pk": 169, - "model": "auth.permission", - "fields": { - "codename": "add_own_archaeologicalsite", - "name": "Can add own Archaeological site", - "content_type": 50 - } - }, - { - "pk": 165, - "model": "auth.permission", - "fields": { - "codename": "change_archaeologicalsite", - "name": "Can change Archaeological site", - "content_type": 50 - } - }, - { - "pk": 170, - "model": "auth.permission", - "fields": { - "codename": "change_own_archaeologicalsite", - "name": "Can change own Archaeological site", - "content_type": 50 - } - }, - { - "pk": 166, - "model": "auth.permission", - "fields": { - "codename": "delete_archaeologicalsite", - "name": "Can delete Archaeological site", - "content_type": 50 - } - }, - { - "pk": 171, - "model": "auth.permission", - "fields": { - "codename": "delete_own_archaeologicalsite", - "name": "Can delete own Archaeological site", - "content_type": 50 - } - }, - { - "pk": 167, - "model": "auth.permission", - "fields": { - "codename": "view_archaeologicalsite", - "name": "Can view all Archaeological sites", - "content_type": 50 - } - }, - { - "pk": 168, - "model": "auth.permission", - "fields": { - "codename": "view_own_archaeologicalsite", - "name": "Can view own Archaeological site", - "content_type": 50 - } - }, - { - "pk": 204, - "model": "auth.permission", - "fields": { - "codename": "add_historicaladministrativeact", - "name": "Can add historical administrative act", - "content_type": 58 - } - }, - { - "pk": 205, - "model": "auth.permission", - "fields": { - "codename": "change_historicaladministrativeact", - "name": "Can change historical administrative act", - "content_type": 58 - } - }, - { - "pk": 206, - "model": "auth.permission", - "fields": { - "codename": "delete_historicaladministrativeact", - "name": "Can delete historical administrative act", - "content_type": 58 - } - }, - { - "pk": 172, - "model": "auth.permission", - "fields": { - "codename": "add_historicaloperation", - "name": "Can add historical operation", - "content_type": 51 - } - }, - { - "pk": 173, - "model": "auth.permission", - "fields": { - "codename": "change_historicaloperation", - "name": "Can change historical operation", - "content_type": 51 - } - }, - { - "pk": 174, - "model": "auth.permission", - "fields": { - "codename": "delete_historicaloperation", - "name": "Can delete historical operation", - "content_type": 51 - } - }, - { - "pk": 175, - "model": "auth.permission", - "fields": { - "codename": "add_operation", - "name": "Can add Operation", - "content_type": 52 - } - }, - { - "pk": 180, - "model": "auth.permission", - "fields": { - "codename": "add_own_operation", - "name": "Can add own Operation", - "content_type": 52 - } - }, - { - "pk": 176, - "model": "auth.permission", - "fields": { - "codename": "change_operation", - "name": "Can change Operation", - "content_type": 52 - } - }, - { - "pk": 181, - "model": "auth.permission", - "fields": { - "codename": "change_own_operation", - "name": "Can change own Operation", - "content_type": 52 - } - }, - { - "pk": 183, - "model": "auth.permission", - "fields": { - "codename": "close_operation", - "name": "Can close Operation", - "content_type": 52 - } - }, - { - "pk": 177, - "model": "auth.permission", - "fields": { - "codename": "delete_operation", - "name": "Can delete Operation", - "content_type": 52 - } - }, - { - "pk": 182, - "model": "auth.permission", - "fields": { - "codename": "delete_own_operation", - "name": "Can delete own Operation", - "content_type": 52 - } - }, - { - "pk": 178, - "model": "auth.permission", - "fields": { - "codename": "view_operation", - "name": "Can view all Operations", - "content_type": 52 - } - }, - { - "pk": 179, - "model": "auth.permission", - "fields": { - "codename": "view_own_operation", - "name": "Can view own Operation", - "content_type": 52 - } - }, - { - "pk": 190, - "model": "auth.permission", - "fields": { - "codename": "add_operationbydepartment", - "name": "Can add operation by department", - "content_type": 55 - } - }, - { - "pk": 191, - "model": "auth.permission", - "fields": { - "codename": "change_operationbydepartment", - "name": "Can change operation by department", - "content_type": 55 - } - }, - { - "pk": 192, - "model": "auth.permission", - "fields": { - "codename": "delete_operationbydepartment", - "name": "Can delete operation by department", - "content_type": 55 - } - }, - { - "pk": 193, - "model": "auth.permission", - "fields": { - "codename": "add_operationsource", - "name": "Can add Operation documentation", - "content_type": 56 - } - }, - { - "pk": 198, - "model": "auth.permission", - "fields": { - "codename": "add_own_operationsource", - "name": "Can add own Operation source", - "content_type": 56 - } - }, - { - "pk": 194, - "model": "auth.permission", - "fields": { - "codename": "change_operationsource", - "name": "Can change Operation documentation", - "content_type": 56 - } - }, - { - "pk": 199, - "model": "auth.permission", - "fields": { - "codename": "change_own_operationsource", - "name": "Can change own Operation source", - "content_type": 56 - } - }, - { - "pk": 195, - "model": "auth.permission", - "fields": { - "codename": "delete_operationsource", - "name": "Can delete Operation documentation", - "content_type": 56 - } - }, - { - "pk": 200, - "model": "auth.permission", - "fields": { - "codename": "delete_own_operationsource", - "name": "Can delete own Operation source", - "content_type": 56 - } - }, - { - "pk": 196, - "model": "auth.permission", - "fields": { - "codename": "view_operationsource", - "name": "Can view all Operation sources", - "content_type": 56 - } - }, - { - "pk": 197, - "model": "auth.permission", - "fields": { - "codename": "view_own_operationsource", - "name": "Can view own Operation source", - "content_type": 56 - } - }, - { - "pk": 221, - "model": "auth.permission", - "fields": { - "codename": "add_operationtypeold", - "name": "Can add Operation type old", - "content_type": 62 - } - }, - { - "pk": 222, - "model": "auth.permission", - "fields": { - "codename": "change_operationtypeold", - "name": "Can change Operation type old", - "content_type": 62 - } - }, - { - "pk": 223, - "model": "auth.permission", - "fields": { - "codename": "delete_operationtypeold", - "name": "Can delete Operation type old", - "content_type": 62 - } - }, - { - "pk": 215, - "model": "auth.permission", - "fields": { - "codename": "add_parcel", - "name": "Can add Parcel", - "content_type": 60 - } - }, - { - "pk": 216, - "model": "auth.permission", - "fields": { - "codename": "change_parcel", - "name": "Can change Parcel", - "content_type": 60 - } - }, - { - "pk": 217, - "model": "auth.permission", - "fields": { - "codename": "delete_parcel", - "name": "Can delete Parcel", - "content_type": 60 - } - }, - { - "pk": 218, - "model": "auth.permission", - "fields": { - "codename": "add_parcelowner", - "name": "Can add Parcel owner", - "content_type": 61 - } - }, - { - "pk": 219, - "model": "auth.permission", - "fields": { - "codename": "change_parcelowner", - "name": "Can change Parcel owner", - "content_type": 61 - } - }, - { - "pk": 220, - "model": "auth.permission", - "fields": { - "codename": "delete_parcelowner", - "name": "Can delete Parcel owner", - "content_type": 61 - } - }, - { - "pk": 158, - "model": "auth.permission", - "fields": { - "codename": "add_period", - "name": "Can add Type Period", - "content_type": 48 - } - }, - { - "pk": 159, - "model": "auth.permission", - "fields": { - "codename": "change_period", - "name": "Can change Type Period", - "content_type": 48 - } - }, - { - "pk": 160, - "model": "auth.permission", - "fields": { - "codename": "delete_period", - "name": "Can delete Type Period", - "content_type": 48 - } - }, - { - "pk": 187, - "model": "auth.permission", - "fields": { - "codename": "add_recordrelations", - "name": "Can add Operation record relation", - "content_type": 54 - } - }, - { - "pk": 188, - "model": "auth.permission", - "fields": { - "codename": "change_recordrelations", - "name": "Can change Operation record relation", - "content_type": 54 - } - }, - { - "pk": 189, - "model": "auth.permission", - "fields": { - "codename": "delete_recordrelations", - "name": "Can delete Operation record relation", - "content_type": 54 - } - }, - { - "pk": 184, - "model": "auth.permission", - "fields": { - "codename": "add_relationtype", - "name": "Can add Operation relation type", - "content_type": 53 - } - }, - { - "pk": 185, - "model": "auth.permission", - "fields": { - "codename": "change_relationtype", - "name": "Can change Operation relation type", - "content_type": 53 - } - }, - { - "pk": 186, - "model": "auth.permission", - "fields": { - "codename": "delete_relationtype", - "name": "Can delete Operation relation type", - "content_type": 53 - } - }, - { - "pk": 155, - "model": "auth.permission", - "fields": { - "codename": "add_remaintype", - "name": "Can add Remain type", - "content_type": 47 - } - }, - { - "pk": 156, - "model": "auth.permission", - "fields": { - "codename": "change_remaintype", - "name": "Can change Remain type", - "content_type": 47 - } - }, - { - "pk": 157, - "model": "auth.permission", - "fields": { - "codename": "delete_remaintype", - "name": "Can delete Remain type", - "content_type": 47 - } - }, - { - "pk": 161, - "model": "auth.permission", - "fields": { - "codename": "add_reportstate", - "name": "Can add Report state", - "content_type": 49 - } - }, - { - "pk": 162, - "model": "auth.permission", - "fields": { - "codename": "change_reportstate", - "name": "Can change Report state", - "content_type": 49 - } - }, - { - "pk": 163, - "model": "auth.permission", - "fields": { - "codename": "delete_reportstate", - "name": "Can delete Report state", - "content_type": 49 - } - }, - { - "pk": 386, - "model": "auth.permission", - "fields": { - "codename": "add_collection", - "name": "Can add Collection", - "content_type": 107 - } - }, - { - "pk": 387, - "model": "auth.permission", - "fields": { - "codename": "change_collection", - "name": "Can change Collection", - "content_type": 107 - } - }, - { - "pk": 388, - "model": "auth.permission", - "fields": { - "codename": "delete_collection", - "name": "Can delete Collection", - "content_type": 107 - } - }, - { - "pk": 276, - "model": "auth.permission", - "fields": { - "codename": "add_container", - "name": "Can add Container", - "content_type": 77 - } - }, - { - "pk": 277, - "model": "auth.permission", - "fields": { - "codename": "change_container", - "name": "Can change Container", - "content_type": 77 - } - }, - { - "pk": 278, - "model": "auth.permission", - "fields": { - "codename": "delete_container", - "name": "Can delete Container", - "content_type": 77 - } - }, - { - "pk": 383, - "model": "auth.permission", - "fields": { - "codename": "add_containerlocalisation", - "name": "Can add Container localisation", - "content_type": 106 - } - }, - { - "pk": 384, - "model": "auth.permission", - "fields": { - "codename": "change_containerlocalisation", - "name": "Can change Container localisation", - "content_type": 106 - } - }, - { - "pk": 385, - "model": "auth.permission", - "fields": { - "codename": "delete_containerlocalisation", - "name": "Can delete Container localisation", - "content_type": 106 - } - }, - { - "pk": 273, - "model": "auth.permission", - "fields": { - "codename": "add_containertype", - "name": "Can add Container type", - "content_type": 76 - } - }, - { - "pk": 274, - "model": "auth.permission", - "fields": { - "codename": "change_containertype", - "name": "Can change Container type", - "content_type": 76 - } - }, - { - "pk": 275, - "model": "auth.permission", - "fields": { - "codename": "delete_containertype", - "name": "Can delete Container type", - "content_type": 76 - } - }, - { - "pk": 270, - "model": "auth.permission", - "fields": { - "codename": "add_own_warehouse", - "name": "Can add own Warehouse", - "content_type": 75 - } - }, - { - "pk": 265, - "model": "auth.permission", - "fields": { - "codename": "add_warehouse", - "name": "Can add Warehouse", - "content_type": 75 - } - }, - { - "pk": 271, - "model": "auth.permission", - "fields": { - "codename": "change_own_warehouse", - "name": "Can change own Warehouse", - "content_type": 75 - } - }, - { - "pk": 266, - "model": "auth.permission", - "fields": { - "codename": "change_warehouse", - "name": "Can change Warehouse", - "content_type": 75 - } - }, - { - "pk": 272, - "model": "auth.permission", - "fields": { - "codename": "delete_own_warehouse", - "name": "Can delete own Warehouse", - "content_type": 75 - } - }, - { - "pk": 267, - "model": "auth.permission", - "fields": { - "codename": "delete_warehouse", - "name": "Can delete Warehouse", - "content_type": 75 - } - }, - { - "pk": 269, - "model": "auth.permission", - "fields": { - "codename": "view_own_warehouse", - "name": "Can view own Warehouse", - "content_type": 75 - } - }, - { - "pk": 268, - "model": "auth.permission", - "fields": { - "codename": "view_warehouse", - "name": "Can view all Warehouses", - "content_type": 75 - } - }, - { - "pk": 377, - "model": "auth.permission", - "fields": { - "codename": "add_warehousedivision", - "name": "Can add Warehouse division", - "content_type": 104 - } - }, - { - "pk": 378, - "model": "auth.permission", - "fields": { - "codename": "change_warehousedivision", - "name": "Can change Warehouse division", - "content_type": 104 - } - }, - { - "pk": 379, - "model": "auth.permission", - "fields": { - "codename": "delete_warehousedivision", - "name": "Can delete Warehouse division", - "content_type": 104 - } - }, - { - "pk": 380, - "model": "auth.permission", - "fields": { - "codename": "add_warehousedivisionlink", - "name": "Can add warehouse division link", - "content_type": 105 - } - }, - { - "pk": 381, - "model": "auth.permission", - "fields": { - "codename": "change_warehousedivisionlink", - "name": "Can change warehouse division link", - "content_type": 105 - } - }, - { - "pk": 382, - "model": "auth.permission", - "fields": { - "codename": "delete_warehousedivisionlink", - "name": "Can delete warehouse division link", - "content_type": 105 - } - }, - { - "pk": 262, - "model": "auth.permission", - "fields": { - "codename": "add_warehousetype", - "name": "Can add Warehouse type", - "content_type": 74 - } - }, - { - "pk": 263, - "model": "auth.permission", - "fields": { - "codename": "change_warehousetype", - "name": "Can change Warehouse type", - "content_type": 74 - } - }, - { - "pk": 264, - "model": "auth.permission", - "fields": { - "codename": "delete_warehousetype", - "name": "Can delete Warehouse type", - "content_type": 74 - } - }, - { - "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": 446, - "model": "auth.permission", - "fields": { - "codename": "add_administrationscript", - "name": "Can add Administration script", - "content_type": 115 - } - }, - { - "pk": 447, - "model": "auth.permission", - "fields": { - "codename": "change_administrationscript", - "name": "Can change Administration script", - "content_type": 115 - } - }, - { - "pk": 448, - "model": "auth.permission", - "fields": { - "codename": "delete_administrationscript", - "name": "Can delete Administration script", - "content_type": 115 - } - }, - { - "pk": 449, - "model": "auth.permission", - "fields": { - "codename": "add_administrationtask", - "name": "Can add Administration task", - "content_type": 116 - } - }, - { - "pk": 450, - "model": "auth.permission", - "fields": { - "codename": "change_administrationtask", - "name": "Can change Administration task", - "content_type": 116 - } - }, - { - "pk": 451, - "model": "auth.permission", - "fields": { - "codename": "delete_administrationtask", - "name": "Can delete Administration task", - "content_type": 116 - } - }, - { - "pk": 119, - "model": "auth.permission", - "fields": { - "codename": "add_arrondissement", - "name": "Can add arrondissement", - "content_type": 37 - } - }, - { - "pk": 120, - "model": "auth.permission", - "fields": { - "codename": "change_arrondissement", - "name": "Can change arrondissement", - "content_type": 37 - } - }, - { - "pk": 121, - "model": "auth.permission", - "fields": { - "codename": "delete_arrondissement", - "name": "Can delete arrondissement", - "content_type": 37 - } - }, - { - "pk": 107, - "model": "auth.permission", - "fields": { - "codename": "add_author", - "name": "Can add Author", - "content_type": 33 - } - }, - { - "pk": 420, - "model": "auth.permission", - "fields": { - "codename": "add_own_author", - "name": "Can add own Author", - "content_type": 33 - } - }, - { - "pk": 108, - "model": "auth.permission", - "fields": { - "codename": "change_author", - "name": "Can change Author", - "content_type": 33 - } - }, - { - "pk": 421, - "model": "auth.permission", - "fields": { - "codename": "change_own_author", - "name": "Can change own Author", - "content_type": 33 - } - }, - { - "pk": 109, - "model": "auth.permission", - "fields": { - "codename": "delete_author", - "name": "Can delete Author", - "content_type": 33 - } - }, - { - "pk": 422, - "model": "auth.permission", - "fields": { - "codename": "delete_own_author", - "name": "Can delete own Author", - "content_type": 33 - } - }, - { - "pk": 418, - "model": "auth.permission", - "fields": { - "codename": "view_author", - "name": "Can view all Authors", - "content_type": 33 - } - }, - { - "pk": 419, - "model": "auth.permission", - "fields": { - "codename": "view_own_author", - "name": "Can view own Author", - "content_type": 33 - } - }, - { - "pk": 104, - "model": "auth.permission", - "fields": { - "codename": "add_authortype", - "name": "Can add Author type", - "content_type": 32 - } - }, - { - "pk": 105, - "model": "auth.permission", - "fields": { - "codename": "change_authortype", - "name": "Can change Author type", - "content_type": 32 - } - }, - { - "pk": 106, - "model": "auth.permission", - "fields": { - "codename": "delete_authortype", - "name": "Can delete Author type", - "content_type": 32 - } - }, - { - "pk": 122, - "model": "auth.permission", - "fields": { - "codename": "add_canton", - "name": "Can add canton", - "content_type": 38 - } - }, - { - "pk": 123, - "model": "auth.permission", - "fields": { - "codename": "change_canton", - "name": "Can change canton", - "content_type": 38 - } - }, - { - "pk": 124, - "model": "auth.permission", - "fields": { - "codename": "delete_canton", - "name": "Can delete canton", - "content_type": 38 - } - }, - { - "pk": 43, - "model": "auth.permission", - "fields": { - "codename": "add_department", - "name": "Can add Department", - "content_type": 15 - } - }, - { - "pk": 44, - "model": "auth.permission", - "fields": { - "codename": "change_department", - "name": "Can change Department", - "content_type": 15 - } - }, - { - "pk": 45, - "model": "auth.permission", - "fields": { - "codename": "delete_department", - "name": "Can delete Department", - "content_type": 15 - } - }, - { - "pk": 37, - "model": "auth.permission", - "fields": { - "codename": "add_documenttemplate", - "name": "Can add Document template", - "content_type": 13 - } - }, - { - "pk": 38, - "model": "auth.permission", - "fields": { - "codename": "change_documenttemplate", - "name": "Can change Document template", - "content_type": 13 - } - }, - { - "pk": 39, - "model": "auth.permission", - "fields": { - "codename": "delete_documenttemplate", - "name": "Can delete Document template", - "content_type": 13 - } - }, - { - "pk": 116, - "model": "auth.permission", - "fields": { - "codename": "add_format", - "name": "Can add Format", - "content_type": 36 - } - }, - { - "pk": 117, - "model": "auth.permission", - "fields": { - "codename": "change_format", - "name": "Can change Format", - "content_type": 36 - } - }, - { - "pk": 118, - "model": "auth.permission", - "fields": { - "codename": "delete_format", - "name": "Can delete Format", - "content_type": 36 - } - }, - { - "pk": 73, - "model": "auth.permission", - "fields": { - "codename": "add_formatertype", - "name": "Can add Importer - Formater type", - "content_type": 25 - } - }, - { - "pk": 74, - "model": "auth.permission", - "fields": { - "codename": "change_formatertype", - "name": "Can change Importer - Formater type", - "content_type": 25 - } - }, - { - "pk": 75, - "model": "auth.permission", - "fields": { - "codename": "delete_formatertype", - "name": "Can delete Importer - Formater type", - "content_type": 25 - } - }, - { - "pk": 34, - "model": "auth.permission", - "fields": { - "codename": "add_globalvar", - "name": "Can add Global variable", - "content_type": 12 - } - }, - { - "pk": 35, - "model": "auth.permission", - "fields": { - "codename": "change_globalvar", - "name": "Can change Global variable", - "content_type": 12 - } - }, - { - "pk": 36, - "model": "auth.permission", - "fields": { - "codename": "delete_globalvar", - "name": "Can delete Global variable", - "content_type": 12 - } - }, - { - "pk": 79, - "model": "auth.permission", - "fields": { - "codename": "add_historicalorganization", - "name": "Can add historical organization", - "content_type": 27 - } - }, - { - "pk": 80, - "model": "auth.permission", - "fields": { - "codename": "change_historicalorganization", - "name": "Can change historical organization", - "content_type": 27 - } - }, - { - "pk": 81, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalorganization", - "name": "Can delete historical organization", - "content_type": 27 - } - }, - { - "pk": 345, - "model": "auth.permission", - "fields": { - "codename": "add_historicalperson", - "name": "Can add historical person", - "content_type": 95 - } - }, - { - "pk": 346, - "model": "auth.permission", - "fields": { - "codename": "change_historicalperson", - "name": "Can change historical person", - "content_type": 95 - } - }, - { - "pk": 347, - "model": "auth.permission", - "fields": { - "codename": "delete_historicalperson", - "name": "Can delete historical person", - "content_type": 95 - } - }, - { - "pk": 76, - "model": "auth.permission", - "fields": { - "codename": "add_import", - "name": "Can add Import", - "content_type": 26 - } - }, - { - "pk": 77, - "model": "auth.permission", - "fields": { - "codename": "change_import", - "name": "Can change Import", - "content_type": 26 - } - }, - { - "pk": 78, - "model": "auth.permission", - "fields": { - "codename": "delete_import", - "name": "Can delete Import", - "content_type": 26 - } - }, - { - "pk": 58, - "model": "auth.permission", - "fields": { - "codename": "add_importercolumn", - "name": "Can add Importer - Column", - "content_type": 20 - } - }, - { - "pk": 59, - "model": "auth.permission", - "fields": { - "codename": "change_importercolumn", - "name": "Can change Importer - Column", - "content_type": 20 - } - }, - { - "pk": 60, - "model": "auth.permission", - "fields": { - "codename": "delete_importercolumn", - "name": "Can delete Importer - Column", - "content_type": 20 - } - }, - { - "pk": 52, - "model": "auth.permission", - "fields": { - "codename": "add_importerdefault", - "name": "Can add Importer - Default", - "content_type": 18 - } - }, - { - "pk": 53, - "model": "auth.permission", - "fields": { - "codename": "change_importerdefault", - "name": "Can change Importer - Default", - "content_type": 18 - } - }, - { - "pk": 54, - "model": "auth.permission", - "fields": { - "codename": "delete_importerdefault", - "name": "Can delete Importer - Default", - "content_type": 18 - } - }, - { - "pk": 55, - "model": "auth.permission", - "fields": { - "codename": "add_importerdefaultvalues", - "name": "Can add Importer - Default value", - "content_type": 19 - } - }, - { - "pk": 56, - "model": "auth.permission", - "fields": { - "codename": "change_importerdefaultvalues", - "name": "Can change Importer - Default value", - "content_type": 19 - } - }, - { - "pk": 57, - "model": "auth.permission", - "fields": { - "codename": "delete_importerdefaultvalues", - "name": "Can delete Importer - Default value", - "content_type": 19 - } - }, - { - "pk": 61, - "model": "auth.permission", - "fields": { - "codename": "add_importerduplicatefield", - "name": "Can add Importer - Duplicate field", - "content_type": 21 - } - }, - { - "pk": 62, - "model": "auth.permission", - "fields": { - "codename": "change_importerduplicatefield", - "name": "Can change Importer - Duplicate field", - "content_type": 21 - } - }, - { - "pk": 63, - "model": "auth.permission", - "fields": { - "codename": "delete_importerduplicatefield", - "name": "Can delete Importer - Duplicate field", - "content_type": 21 - } - }, - { - "pk": 403, - "model": "auth.permission", - "fields": { - "codename": "add_importermodel", - "name": "Can add Importer - Model", - "content_type": 111 - } - }, - { - "pk": 404, - "model": "auth.permission", - "fields": { - "codename": "change_importermodel", - "name": "Can change Importer - Model", - "content_type": 111 - } - }, - { - "pk": 405, - "model": "auth.permission", - "fields": { - "codename": "delete_importermodel", - "name": "Can delete Importer - Model", - "content_type": 111 - } - }, - { - "pk": 49, - "model": "auth.permission", - "fields": { - "codename": "add_importertype", - "name": "Can add Importer - Type", - "content_type": 17 - } - }, - { - "pk": 50, - "model": "auth.permission", - "fields": { - "codename": "change_importertype", - "name": "Can change Importer - Type", - "content_type": 17 - } - }, - { - "pk": 51, - "model": "auth.permission", - "fields": { - "codename": "delete_importertype", - "name": "Can delete Importer - Type", - "content_type": 17 - } - }, - { - "pk": 67, - "model": "auth.permission", - "fields": { - "codename": "add_importtarget", - "name": "Can add Importer - Target", - "content_type": 23 - } - }, - { - "pk": 68, - "model": "auth.permission", - "fields": { - "codename": "change_importtarget", - "name": "Can change Importer - Target", - "content_type": 23 - } - }, - { - "pk": 69, - "model": "auth.permission", - "fields": { - "codename": "delete_importtarget", - "name": "Can delete Importer - Target", - "content_type": 23 - } - }, - { - "pk": 31, - "model": "auth.permission", - "fields": { - "codename": "add_ishtarsiteprofile", - "name": "Can add Ishtar site profile", - "content_type": 11 - } - }, - { - "pk": 32, - "model": "auth.permission", - "fields": { - "codename": "change_ishtarsiteprofile", - "name": "Can change Ishtar site profile", - "content_type": 11 - } - }, - { - "pk": 33, - "model": "auth.permission", - "fields": { - "codename": "delete_ishtarsiteprofile", - "name": "Can delete Ishtar site profile", - "content_type": 11 - } - }, - { - "pk": 101, - "model": "auth.permission", - "fields": { - "codename": "add_ishtaruser", - "name": "Can add Ishtar user", - "content_type": 31 - } - }, - { - "pk": 102, - "model": "auth.permission", - "fields": { - "codename": "change_ishtaruser", - "name": "Can change Ishtar user", - "content_type": 31 - } - }, - { - "pk": 103, - "model": "auth.permission", - "fields": { - "codename": "delete_ishtaruser", - "name": "Can delete Ishtar user", - "content_type": 31 - } - }, - { - "pk": 28, - "model": "auth.permission", - "fields": { - "codename": "add_itemkey", - "name": "Can add item key", - "content_type": 10 - } - }, - { - "pk": 29, - "model": "auth.permission", - "fields": { - "codename": "change_itemkey", - "name": "Can change item key", - "content_type": 10 - } - }, - { - "pk": 30, - "model": "auth.permission", - "fields": { - "codename": "delete_itemkey", - "name": "Can delete item key", - "content_type": 10 - } - }, - { - "pk": 128, - "model": "auth.permission", - "fields": { - "codename": "add_operationtype", - "name": "Can add Operation type", - "content_type": 40 - } - }, - { - "pk": 129, - "model": "auth.permission", - "fields": { - "codename": "change_operationtype", - "name": "Can change Operation type", - "content_type": 40 - } - }, - { - "pk": 130, - "model": "auth.permission", - "fields": { - "codename": "delete_operationtype", - "name": "Can delete Operation type", - "content_type": 40 - } - }, - { - "pk": 82, - "model": "auth.permission", - "fields": { - "codename": "add_organization", - "name": "Can add Organization", - "content_type": 28 - } - }, - { - "pk": 87, - "model": "auth.permission", - "fields": { - "codename": "add_own_organization", - "name": "Can add own Organization", - "content_type": 28 - } - }, - { - "pk": 83, - "model": "auth.permission", - "fields": { - "codename": "change_organization", - "name": "Can change Organization", - "content_type": 28 - } - }, - { - "pk": 88, - "model": "auth.permission", - "fields": { - "codename": "change_own_organization", - "name": "Can change own Organization", - "content_type": 28 - } - }, - { - "pk": 84, - "model": "auth.permission", - "fields": { - "codename": "delete_organization", - "name": "Can delete Organization", - "content_type": 28 - } - }, - { - "pk": 89, - "model": "auth.permission", - "fields": { - "codename": "delete_own_organization", - "name": "Can delete own Organization", - "content_type": 28 - } - }, - { - "pk": 85, - "model": "auth.permission", - "fields": { - "codename": "view_organization", - "name": "Can view all Organizations", - "content_type": 28 - } - }, - { - "pk": 86, - "model": "auth.permission", - "fields": { - "codename": "view_own_organization", - "name": "Can view own Organization", - "content_type": 28 - } - }, - { - "pk": 46, - "model": "auth.permission", - "fields": { - "codename": "add_organizationtype", - "name": "Can add Organization type", - "content_type": 16 - } - }, - { - "pk": 47, - "model": "auth.permission", - "fields": { - "codename": "change_organizationtype", - "name": "Can change Organization type", - "content_type": 16 - } - }, - { - "pk": 48, - "model": "auth.permission", - "fields": { - "codename": "delete_organizationtype", - "name": "Can delete Organization type", - "content_type": 16 - } - }, - { - "pk": 98, - "model": "auth.permission", - "fields": { - "codename": "add_own_person", - "name": "Can add own Person", - "content_type": 30 - } - }, - { - "pk": 93, - "model": "auth.permission", - "fields": { - "codename": "add_person", - "name": "Can add Person", - "content_type": 30 - } - }, - { - "pk": 99, - "model": "auth.permission", - "fields": { - "codename": "change_own_person", - "name": "Can change own Person", - "content_type": 30 - } - }, - { - "pk": 94, - "model": "auth.permission", - "fields": { - "codename": "change_person", - "name": "Can change Person", - "content_type": 30 - } - }, - { - "pk": 100, - "model": "auth.permission", - "fields": { - "codename": "delete_own_person", - "name": "Can delete own Person", - "content_type": 30 - } - }, - { - "pk": 95, - "model": "auth.permission", - "fields": { - "codename": "delete_person", - "name": "Can delete Person", - "content_type": 30 - } - }, - { - "pk": 97, - "model": "auth.permission", - "fields": { - "codename": "view_own_person", - "name": "Can view own Person", - "content_type": 30 - } - }, - { - "pk": 96, - "model": "auth.permission", - "fields": { - "codename": "view_person", - "name": "Can view all Persons", - "content_type": 30 - } - }, - { - "pk": 90, - "model": "auth.permission", - "fields": { - "codename": "add_persontype", - "name": "Can add Person type", - "content_type": 29 - } - }, - { - "pk": 91, - "model": "auth.permission", - "fields": { - "codename": "change_persontype", - "name": "Can change Person type", - "content_type": 29 - } - }, - { - "pk": 92, - "model": "auth.permission", - "fields": { - "codename": "delete_persontype", - "name": "Can delete Person type", - "content_type": 29 - } - }, - { - "pk": 64, - "model": "auth.permission", - "fields": { - "codename": "add_regexp", - "name": "Can add Importer - Regular expression", - "content_type": 22 - } - }, - { - "pk": 65, - "model": "auth.permission", - "fields": { - "codename": "change_regexp", - "name": "Can change Importer - Regular expression", - "content_type": 22 - } - }, - { - "pk": 66, - "model": "auth.permission", - "fields": { - "codename": "delete_regexp", - "name": "Can delete Importer - Regular expression", - "content_type": 22 - } - }, - { - "pk": 110, - "model": "auth.permission", - "fields": { - "codename": "add_sourcetype", - "name": "Can add Source type", - "content_type": 34 - } - }, - { - "pk": 111, - "model": "auth.permission", - "fields": { - "codename": "change_sourcetype", - "name": "Can change Source type", - "content_type": 34 - } - }, - { - "pk": 112, - "model": "auth.permission", - "fields": { - "codename": "delete_sourcetype", - "name": "Can delete Source type", - "content_type": 34 - } - }, - { - "pk": 392, - "model": "auth.permission", - "fields": { - "codename": "add_spatialreferencesystem", - "name": "Can add Spatial reference system", - "content_type": 109 - } - }, - { - "pk": 393, - "model": "auth.permission", - "fields": { - "codename": "change_spatialreferencesystem", - "name": "Can change Spatial reference system", - "content_type": 109 - } - }, - { - "pk": 394, - "model": "auth.permission", - "fields": { - "codename": "delete_spatialreferencesystem", - "name": "Can delete Spatial reference system", - "content_type": 109 - } - }, - { - "pk": 40, - "model": "auth.permission", - "fields": { - "codename": "add_state", - "name": "Can add State", - "content_type": 14 - } - }, - { - "pk": 41, - "model": "auth.permission", - "fields": { - "codename": "change_state", - "name": "Can change State", - "content_type": 14 - } - }, - { - "pk": 42, - "model": "auth.permission", - "fields": { - "codename": "delete_state", - "name": "Can delete State", - "content_type": 14 - } - }, - { - "pk": 113, - "model": "auth.permission", - "fields": { - "codename": "add_supporttype", - "name": "Can add Support type", - "content_type": 35 - } - }, - { - "pk": 114, - "model": "auth.permission", - "fields": { - "codename": "change_supporttype", - "name": "Can change Support type", - "content_type": 35 - } - }, - { - "pk": 115, - "model": "auth.permission", - "fields": { - "codename": "delete_supporttype", - "name": "Can delete Support type", - "content_type": 35 - } - }, - { - "pk": 70, - "model": "auth.permission", - "fields": { - "codename": "add_targetkey", - "name": "Can add Importer - Target key", - "content_type": 24 - } - }, - { - "pk": 71, - "model": "auth.permission", - "fields": { - "codename": "change_targetkey", - "name": "Can change Importer - Target key", - "content_type": 24 - } - }, - { - "pk": 72, - "model": "auth.permission", - "fields": { - "codename": "delete_targetkey", - "name": "Can delete Importer - Target key", - "content_type": 24 - } - }, - { - "pk": 342, - "model": "auth.permission", - "fields": { - "codename": "add_titletype", - "name": "Can add Title type", - "content_type": 94 - } - }, - { - "pk": 343, - "model": "auth.permission", - "fields": { - "codename": "change_titletype", - "name": "Can change Title type", - "content_type": 94 - } - }, - { - "pk": 344, - "model": "auth.permission", - "fields": { - "codename": "delete_titletype", - "name": "Can delete Title type", - "content_type": 94 - } - }, - { - "pk": 125, - "model": "auth.permission", - "fields": { - "codename": "add_town", - "name": "Can add Town", - "content_type": 39 - } - }, - { - "pk": 126, - "model": "auth.permission", - "fields": { - "codename": "change_town", - "name": "Can change Town", - "content_type": 39 - } - }, - { - "pk": 127, - "model": "auth.permission", - "fields": { - "codename": "delete_town", - "name": "Can delete Town", - "content_type": 39 - } - }, - { - "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": 93, - "model": "auth.group", - "fields": { - "name": "Documents de demande de traitement : lecture", - "permissions": [ - 438 +{ + "model": "auth.permission", + "fields": { + "name": "Can add permission", + "content_type": [ + "auth", + "permission" + ], + "codename": "add_permission" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change permission", + "content_type": [ + "auth", + "permission" + ], + "codename": "change_permission" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete permission", + "content_type": [ + "auth", + "permission" + ], + "codename": "delete_permission" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add group", + "content_type": [ + "auth", + "group" + ], + "codename": "add_group" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change group", + "content_type": [ + "auth", + "group" + ], + "codename": "change_group" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete group", + "content_type": [ + "auth", + "group" + ], + "codename": "delete_group" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add user", + "content_type": [ + "auth", + "user" + ], + "codename": "add_user" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change user", + "content_type": [ + "auth", + "user" + ], + "codename": "change_user" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete user", + "content_type": [ + "auth", + "user" + ], + "codename": "delete_user" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add log entry", + "content_type": [ + "admin", + "logentry" + ], + "codename": "add_logentry" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change log entry", + "content_type": [ + "admin", + "logentry" + ], + "codename": "change_logentry" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete log entry", + "content_type": [ + "admin", + "logentry" + ], + "codename": "delete_logentry" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add content type", + "content_type": [ + "contenttypes", + "contenttype" + ], + "codename": "add_contenttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change content type", + "content_type": [ + "contenttypes", + "contenttype" + ], + "codename": "change_contenttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete content type", + "content_type": [ + "contenttypes", + "contenttype" + ], + "codename": "delete_contenttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add session", + "content_type": [ + "sessions", + "session" + ], + "codename": "add_session" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change session", + "content_type": [ + "sessions", + "session" + ], + "codename": "change_session" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete session", + "content_type": [ + "sessions", + "session" + ], + "codename": "delete_session" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add site", + "content_type": [ + "sites", + "site" + ], + "codename": "add_site" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change site", + "content_type": [ + "sites", + "site" + ], + "codename": "change_site" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete site", + "content_type": [ + "sites", + "site" + ], + "codename": "delete_site" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add registration profile", + "content_type": [ + "registration", + "registrationprofile" + ], + "codename": "add_registrationprofile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change registration profile", + "content_type": [ + "registration", + "registrationprofile" + ], + "codename": "change_registrationprofile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete registration profile", + "content_type": [ + "registration", + "registrationprofile" + ], + "codename": "delete_registrationprofile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add item key", + "content_type": [ + "ishtar_common", + "itemkey" + ], + "codename": "add_itemkey" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change item key", + "content_type": [ + "ishtar_common", + "itemkey" + ], + "codename": "change_itemkey" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete item key", + "content_type": [ + "ishtar_common", + "itemkey" + ], + "codename": "delete_itemkey" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Ishtar site profile", + "content_type": [ + "ishtar_common", + "ishtarsiteprofile" + ], + "codename": "add_ishtarsiteprofile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Ishtar site profile", + "content_type": [ + "ishtar_common", + "ishtarsiteprofile" + ], + "codename": "change_ishtarsiteprofile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Ishtar site profile", + "content_type": [ + "ishtar_common", + "ishtarsiteprofile" + ], + "codename": "delete_ishtarsiteprofile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Global variable", + "content_type": [ + "ishtar_common", + "globalvar" + ], + "codename": "add_globalvar" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Global variable", + "content_type": [ + "ishtar_common", + "globalvar" + ], + "codename": "change_globalvar" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Global variable", + "content_type": [ + "ishtar_common", + "globalvar" + ], + "codename": "delete_globalvar" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Document template", + "content_type": [ + "ishtar_common", + "documenttemplate" + ], + "codename": "add_documenttemplate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Document template", + "content_type": [ + "ishtar_common", + "documenttemplate" + ], + "codename": "change_documenttemplate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Document template", + "content_type": [ + "ishtar_common", + "documenttemplate" + ], + "codename": "delete_documenttemplate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add State", + "content_type": [ + "ishtar_common", + "state" + ], + "codename": "add_state" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change State", + "content_type": [ + "ishtar_common", + "state" + ], + "codename": "change_state" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete State", + "content_type": [ + "ishtar_common", + "state" + ], + "codename": "delete_state" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Department", + "content_type": [ + "ishtar_common", + "department" + ], + "codename": "add_department" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Department", + "content_type": [ + "ishtar_common", + "department" + ], + "codename": "change_department" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Department", + "content_type": [ + "ishtar_common", + "department" + ], + "codename": "delete_department" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Organization type", + "content_type": [ + "ishtar_common", + "organizationtype" + ], + "codename": "add_organizationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Organization type", + "content_type": [ + "ishtar_common", + "organizationtype" + ], + "codename": "change_organizationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Organization type", + "content_type": [ + "ishtar_common", + "organizationtype" + ], + "codename": "delete_organizationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Type", + "content_type": [ + "ishtar_common", + "importertype" + ], + "codename": "add_importertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Type", + "content_type": [ + "ishtar_common", + "importertype" + ], + "codename": "change_importertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Type", + "content_type": [ + "ishtar_common", + "importertype" + ], + "codename": "delete_importertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Default", + "content_type": [ + "ishtar_common", + "importerdefault" + ], + "codename": "add_importerdefault" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Default", + "content_type": [ + "ishtar_common", + "importerdefault" + ], + "codename": "change_importerdefault" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Default", + "content_type": [ + "ishtar_common", + "importerdefault" + ], + "codename": "delete_importerdefault" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Default value", + "content_type": [ + "ishtar_common", + "importerdefaultvalues" + ], + "codename": "add_importerdefaultvalues" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Default value", + "content_type": [ + "ishtar_common", + "importerdefaultvalues" + ], + "codename": "change_importerdefaultvalues" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Default value", + "content_type": [ + "ishtar_common", + "importerdefaultvalues" + ], + "codename": "delete_importerdefaultvalues" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Column", + "content_type": [ + "ishtar_common", + "importercolumn" + ], + "codename": "add_importercolumn" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Column", + "content_type": [ + "ishtar_common", + "importercolumn" + ], + "codename": "change_importercolumn" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Column", + "content_type": [ + "ishtar_common", + "importercolumn" + ], + "codename": "delete_importercolumn" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Duplicate field", + "content_type": [ + "ishtar_common", + "importerduplicatefield" + ], + "codename": "add_importerduplicatefield" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Duplicate field", + "content_type": [ + "ishtar_common", + "importerduplicatefield" + ], + "codename": "change_importerduplicatefield" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Duplicate field", + "content_type": [ + "ishtar_common", + "importerduplicatefield" + ], + "codename": "delete_importerduplicatefield" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Regular expression", + "content_type": [ + "ishtar_common", + "regexp" + ], + "codename": "add_regexp" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Regular expression", + "content_type": [ + "ishtar_common", + "regexp" + ], + "codename": "change_regexp" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Regular expression", + "content_type": [ + "ishtar_common", + "regexp" + ], + "codename": "delete_regexp" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Target", + "content_type": [ + "ishtar_common", + "importtarget" + ], + "codename": "add_importtarget" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Target", + "content_type": [ + "ishtar_common", + "importtarget" + ], + "codename": "change_importtarget" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Target", + "content_type": [ + "ishtar_common", + "importtarget" + ], + "codename": "delete_importtarget" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Target key", + "content_type": [ + "ishtar_common", + "targetkey" + ], + "codename": "add_targetkey" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Target key", + "content_type": [ + "ishtar_common", + "targetkey" + ], + "codename": "change_targetkey" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Target key", + "content_type": [ + "ishtar_common", + "targetkey" + ], + "codename": "delete_targetkey" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Formater type", + "content_type": [ + "ishtar_common", + "formatertype" + ], + "codename": "add_formatertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Formater type", + "content_type": [ + "ishtar_common", + "formatertype" + ], + "codename": "change_formatertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Formater type", + "content_type": [ + "ishtar_common", + "formatertype" + ], + "codename": "delete_formatertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Import", + "content_type": [ + "ishtar_common", + "import" + ], + "codename": "add_import" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Import", + "content_type": [ + "ishtar_common", + "import" + ], + "codename": "change_import" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Import", + "content_type": [ + "ishtar_common", + "import" + ], + "codename": "delete_import" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical organization", + "content_type": [ + "ishtar_common", + "historicalorganization" + ], + "codename": "add_historicalorganization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical organization", + "content_type": [ + "ishtar_common", + "historicalorganization" + ], + "codename": "change_historicalorganization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical organization", + "content_type": [ + "ishtar_common", + "historicalorganization" + ], + "codename": "delete_historicalorganization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Organization", + "content_type": [ + "ishtar_common", + "organization" + ], + "codename": "add_organization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Organization", + "content_type": [ + "ishtar_common", + "organization" + ], + "codename": "change_organization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Organization", + "content_type": [ + "ishtar_common", + "organization" + ], + "codename": "delete_organization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Organizations", + "content_type": [ + "ishtar_common", + "organization" + ], + "codename": "view_organization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Organization", + "content_type": [ + "ishtar_common", + "organization" + ], + "codename": "view_own_organization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Organization", + "content_type": [ + "ishtar_common", + "organization" + ], + "codename": "add_own_organization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Organization", + "content_type": [ + "ishtar_common", + "organization" + ], + "codename": "change_own_organization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Organization", + "content_type": [ + "ishtar_common", + "organization" + ], + "codename": "delete_own_organization" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Person type", + "content_type": [ + "ishtar_common", + "persontype" + ], + "codename": "add_persontype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Person type", + "content_type": [ + "ishtar_common", + "persontype" + ], + "codename": "change_persontype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Person type", + "content_type": [ + "ishtar_common", + "persontype" + ], + "codename": "delete_persontype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Person", + "content_type": [ + "ishtar_common", + "person" + ], + "codename": "add_person" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Person", + "content_type": [ + "ishtar_common", + "person" + ], + "codename": "change_person" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Person", + "content_type": [ + "ishtar_common", + "person" + ], + "codename": "delete_person" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Persons", + "content_type": [ + "ishtar_common", + "person" + ], + "codename": "view_person" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Person", + "content_type": [ + "ishtar_common", + "person" + ], + "codename": "view_own_person" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Person", + "content_type": [ + "ishtar_common", + "person" + ], + "codename": "add_own_person" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Person", + "content_type": [ + "ishtar_common", + "person" + ], + "codename": "change_own_person" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Person", + "content_type": [ + "ishtar_common", + "person" + ], + "codename": "delete_own_person" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Ishtar user", + "content_type": [ + "ishtar_common", + "ishtaruser" + ], + "codename": "add_ishtaruser" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Ishtar user", + "content_type": [ + "ishtar_common", + "ishtaruser" + ], + "codename": "change_ishtaruser" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Ishtar user", + "content_type": [ + "ishtar_common", + "ishtaruser" + ], + "codename": "delete_ishtaruser" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Author type", + "content_type": [ + "ishtar_common", + "authortype" + ], + "codename": "add_authortype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Author type", + "content_type": [ + "ishtar_common", + "authortype" + ], + "codename": "change_authortype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Author type", + "content_type": [ + "ishtar_common", + "authortype" + ], + "codename": "delete_authortype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Author", + "content_type": [ + "ishtar_common", + "author" + ], + "codename": "add_author" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Author", + "content_type": [ + "ishtar_common", + "author" + ], + "codename": "change_author" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Author", + "content_type": [ + "ishtar_common", + "author" + ], + "codename": "delete_author" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Source type", + "content_type": [ + "ishtar_common", + "sourcetype" + ], + "codename": "add_sourcetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Source type", + "content_type": [ + "ishtar_common", + "sourcetype" + ], + "codename": "change_sourcetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Source type", + "content_type": [ + "ishtar_common", + "sourcetype" + ], + "codename": "delete_sourcetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Support type", + "content_type": [ + "ishtar_common", + "supporttype" + ], + "codename": "add_supporttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Support type", + "content_type": [ + "ishtar_common", + "supporttype" + ], + "codename": "change_supporttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Support type", + "content_type": [ + "ishtar_common", + "supporttype" + ], + "codename": "delete_supporttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Format", + "content_type": [ + "ishtar_common", + "format" + ], + "codename": "add_format" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Format", + "content_type": [ + "ishtar_common", + "format" + ], + "codename": "change_format" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Format", + "content_type": [ + "ishtar_common", + "format" + ], + "codename": "delete_format" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add arrondissement", + "content_type": [ + "ishtar_common", + "arrondissement" + ], + "codename": "add_arrondissement" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change arrondissement", + "content_type": [ + "ishtar_common", + "arrondissement" + ], + "codename": "change_arrondissement" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete arrondissement", + "content_type": [ + "ishtar_common", + "arrondissement" + ], + "codename": "delete_arrondissement" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add canton", + "content_type": [ + "ishtar_common", + "canton" + ], + "codename": "add_canton" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change canton", + "content_type": [ + "ishtar_common", + "canton" + ], + "codename": "change_canton" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete canton", + "content_type": [ + "ishtar_common", + "canton" + ], + "codename": "delete_canton" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Town", + "content_type": [ + "ishtar_common", + "town" + ], + "codename": "add_town" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Town", + "content_type": [ + "ishtar_common", + "town" + ], + "codename": "change_town" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Town", + "content_type": [ + "ishtar_common", + "town" + ], + "codename": "delete_town" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Operation type", + "content_type": [ + "ishtar_common", + "operationtype" + ], + "codename": "add_operationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Operation type", + "content_type": [ + "ishtar_common", + "operationtype" + ], + "codename": "change_operationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Operation type", + "content_type": [ + "ishtar_common", + "operationtype" + ], + "codename": "delete_operationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Archaeological file type", + "content_type": [ + "archaeological_files", + "filetype" + ], + "codename": "add_filetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Archaeological file type", + "content_type": [ + "archaeological_files", + "filetype" + ], + "codename": "change_filetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Archaeological file type", + "content_type": [ + "archaeological_files", + "filetype" + ], + "codename": "delete_filetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Permit type", + "content_type": [ + "archaeological_files", + "permittype" + ], + "codename": "add_permittype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Permit type", + "content_type": [ + "archaeological_files", + "permittype" + ], + "codename": "change_permittype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Permit type", + "content_type": [ + "archaeological_files", + "permittype" + ], + "codename": "delete_permittype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Type Saisine", + "content_type": [ + "archaeological_files", + "saisinetype" + ], + "codename": "add_saisinetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Type Saisine", + "content_type": [ + "archaeological_files", + "saisinetype" + ], + "codename": "change_saisinetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Type Saisine", + "content_type": [ + "archaeological_files", + "saisinetype" + ], + "codename": "delete_saisinetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical file", + "content_type": [ + "archaeological_files", + "historicalfile" + ], + "codename": "add_historicalfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical file", + "content_type": [ + "archaeological_files", + "historicalfile" + ], + "codename": "change_historicalfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical file", + "content_type": [ + "archaeological_files", + "historicalfile" + ], + "codename": "delete_historicalfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Archaeological file", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "add_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Archaeological file", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "change_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Archaeological file", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "delete_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Archaelogical files", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "view_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Archaelogical file", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "view_own_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Archaelogical file", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "add_own_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Archaelogical file", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "change_own_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Archaelogical file", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "delete_own_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can close File", + "content_type": [ + "archaeological_files", + "file" + ], + "codename": "close_file" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add file by department", + "content_type": [ + "archaeological_files", + "filebydepartment" + ], + "codename": "add_filebydepartment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change file by department", + "content_type": [ + "archaeological_files", + "filebydepartment" + ], + "codename": "change_filebydepartment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete file by department", + "content_type": [ + "archaeological_files", + "filebydepartment" + ], + "codename": "delete_filebydepartment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Remain type", + "content_type": [ + "archaeological_operations", + "remaintype" + ], + "codename": "add_remaintype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Remain type", + "content_type": [ + "archaeological_operations", + "remaintype" + ], + "codename": "change_remaintype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Remain type", + "content_type": [ + "archaeological_operations", + "remaintype" + ], + "codename": "delete_remaintype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Type Period", + "content_type": [ + "archaeological_operations", + "period" + ], + "codename": "add_period" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Type Period", + "content_type": [ + "archaeological_operations", + "period" + ], + "codename": "change_period" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Type Period", + "content_type": [ + "archaeological_operations", + "period" + ], + "codename": "delete_period" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Report state", + "content_type": [ + "archaeological_operations", + "reportstate" + ], + "codename": "add_reportstate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Report state", + "content_type": [ + "archaeological_operations", + "reportstate" + ], + "codename": "change_reportstate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Report state", + "content_type": [ + "archaeological_operations", + "reportstate" + ], + "codename": "delete_reportstate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Archaeological site", + "content_type": [ + "archaeological_operations", + "archaeologicalsite" + ], + "codename": "add_archaeologicalsite" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Archaeological site", + "content_type": [ + "archaeological_operations", + "archaeologicalsite" + ], + "codename": "change_archaeologicalsite" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Archaeological site", + "content_type": [ + "archaeological_operations", + "archaeologicalsite" + ], + "codename": "delete_archaeologicalsite" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Archaeological sites", + "content_type": [ + "archaeological_operations", + "archaeologicalsite" + ], + "codename": "view_archaeologicalsite" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Archaeological site", + "content_type": [ + "archaeological_operations", + "archaeologicalsite" + ], + "codename": "view_own_archaeologicalsite" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Archaeological site", + "content_type": [ + "archaeological_operations", + "archaeologicalsite" + ], + "codename": "add_own_archaeologicalsite" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Archaeological site", + "content_type": [ + "archaeological_operations", + "archaeologicalsite" + ], + "codename": "change_own_archaeologicalsite" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Archaeological site", + "content_type": [ + "archaeological_operations", + "archaeologicalsite" + ], + "codename": "delete_own_archaeologicalsite" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical operation", + "content_type": [ + "archaeological_operations", + "historicaloperation" + ], + "codename": "add_historicaloperation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical operation", + "content_type": [ + "archaeological_operations", + "historicaloperation" + ], + "codename": "change_historicaloperation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical operation", + "content_type": [ + "archaeological_operations", + "historicaloperation" + ], + "codename": "delete_historicaloperation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Operation", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "add_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Operation", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "change_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Operation", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "delete_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Operations", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "view_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Operation", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "view_own_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Operation", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "add_own_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Operation", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "change_own_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Operation", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "delete_own_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can close Operation", + "content_type": [ + "archaeological_operations", + "operation" + ], + "codename": "close_operation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Operation relation type", + "content_type": [ + "archaeological_operations", + "relationtype" + ], + "codename": "add_relationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Operation relation type", + "content_type": [ + "archaeological_operations", + "relationtype" + ], + "codename": "change_relationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Operation relation type", + "content_type": [ + "archaeological_operations", + "relationtype" + ], + "codename": "delete_relationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Operation record relation", + "content_type": [ + "archaeological_operations", + "recordrelations" + ], + "codename": "add_recordrelations" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Operation record relation", + "content_type": [ + "archaeological_operations", + "recordrelations" + ], + "codename": "change_recordrelations" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Operation record relation", + "content_type": [ + "archaeological_operations", + "recordrelations" + ], + "codename": "delete_recordrelations" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add operation by department", + "content_type": [ + "archaeological_operations", + "operationbydepartment" + ], + "codename": "add_operationbydepartment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change operation by department", + "content_type": [ + "archaeological_operations", + "operationbydepartment" + ], + "codename": "change_operationbydepartment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete operation by department", + "content_type": [ + "archaeological_operations", + "operationbydepartment" + ], + "codename": "delete_operationbydepartment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Operation documentation", + "content_type": [ + "archaeological_operations", + "operationsource" + ], + "codename": "add_operationsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Operation documentation", + "content_type": [ + "archaeological_operations", + "operationsource" + ], + "codename": "change_operationsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Operation documentation", + "content_type": [ + "archaeological_operations", + "operationsource" + ], + "codename": "delete_operationsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Operation sources", + "content_type": [ + "archaeological_operations", + "operationsource" + ], + "codename": "view_operationsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Operation source", + "content_type": [ + "archaeological_operations", + "operationsource" + ], + "codename": "view_own_operationsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Operation source", + "content_type": [ + "archaeological_operations", + "operationsource" + ], + "codename": "add_own_operationsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Operation source", + "content_type": [ + "archaeological_operations", + "operationsource" + ], + "codename": "change_own_operationsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Operation source", + "content_type": [ + "archaeological_operations", + "operationsource" + ], + "codename": "delete_own_operationsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Act type", + "content_type": [ + "archaeological_operations", + "acttype" + ], + "codename": "add_acttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Act type", + "content_type": [ + "archaeological_operations", + "acttype" + ], + "codename": "change_acttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Act type", + "content_type": [ + "archaeological_operations", + "acttype" + ], + "codename": "delete_acttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical administrative act", + "content_type": [ + "archaeological_operations", + "historicaladministrativeact" + ], + "codename": "add_historicaladministrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical administrative act", + "content_type": [ + "archaeological_operations", + "historicaladministrativeact" + ], + "codename": "change_historicaladministrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical administrative act", + "content_type": [ + "archaeological_operations", + "historicaladministrativeact" + ], + "codename": "delete_historicaladministrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Administrative act", + "content_type": [ + "archaeological_operations", + "administrativeact" + ], + "codename": "add_administrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Administrative act", + "content_type": [ + "archaeological_operations", + "administrativeact" + ], + "codename": "change_administrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Administrative act", + "content_type": [ + "archaeological_operations", + "administrativeact" + ], + "codename": "delete_administrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Administrative acts", + "content_type": [ + "archaeological_operations", + "administrativeact" + ], + "codename": "view_administrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Administrative act", + "content_type": [ + "archaeological_operations", + "administrativeact" + ], + "codename": "view_own_administrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Administrative act", + "content_type": [ + "archaeological_operations", + "administrativeact" + ], + "codename": "add_own_administrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Administrative act", + "content_type": [ + "archaeological_operations", + "administrativeact" + ], + "codename": "change_own_administrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Administrative act", + "content_type": [ + "archaeological_operations", + "administrativeact" + ], + "codename": "delete_own_administrativeact" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Parcel", + "content_type": [ + "archaeological_operations", + "parcel" + ], + "codename": "add_parcel" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Parcel", + "content_type": [ + "archaeological_operations", + "parcel" + ], + "codename": "change_parcel" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Parcel", + "content_type": [ + "archaeological_operations", + "parcel" + ], + "codename": "delete_parcel" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Parcel owner", + "content_type": [ + "archaeological_operations", + "parcelowner" + ], + "codename": "add_parcelowner" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Parcel owner", + "content_type": [ + "archaeological_operations", + "parcelowner" + ], + "codename": "change_parcelowner" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Parcel owner", + "content_type": [ + "archaeological_operations", + "parcelowner" + ], + "codename": "delete_parcelowner" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Operation type old", + "content_type": [ + "archaeological_operations", + "operationtypeold" + ], + "codename": "add_operationtypeold" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Operation type old", + "content_type": [ + "archaeological_operations", + "operationtypeold" + ], + "codename": "change_operationtypeold" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Operation type old", + "content_type": [ + "archaeological_operations", + "operationtypeold" + ], + "codename": "delete_operationtypeold" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Dating type", + "content_type": [ + "archaeological_context_records", + "datingtype" + ], + "codename": "add_datingtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Dating type", + "content_type": [ + "archaeological_context_records", + "datingtype" + ], + "codename": "change_datingtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Dating type", + "content_type": [ + "archaeological_context_records", + "datingtype" + ], + "codename": "delete_datingtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Dating quality", + "content_type": [ + "archaeological_context_records", + "datingquality" + ], + "codename": "add_datingquality" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Dating quality", + "content_type": [ + "archaeological_context_records", + "datingquality" + ], + "codename": "change_datingquality" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Dating quality", + "content_type": [ + "archaeological_context_records", + "datingquality" + ], + "codename": "delete_datingquality" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Dating", + "content_type": [ + "archaeological_context_records", + "dating" + ], + "codename": "add_dating" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Dating", + "content_type": [ + "archaeological_context_records", + "dating" + ], + "codename": "change_dating" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Dating", + "content_type": [ + "archaeological_context_records", + "dating" + ], + "codename": "delete_dating" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Unit Type", + "content_type": [ + "archaeological_context_records", + "unit" + ], + "codename": "add_unit" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Unit Type", + "content_type": [ + "archaeological_context_records", + "unit" + ], + "codename": "change_unit" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Unit Type", + "content_type": [ + "archaeological_context_records", + "unit" + ], + "codename": "delete_unit" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Activity Type", + "content_type": [ + "archaeological_context_records", + "activitytype" + ], + "codename": "add_activitytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Activity Type", + "content_type": [ + "archaeological_context_records", + "activitytype" + ], + "codename": "change_activitytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Activity Type", + "content_type": [ + "archaeological_context_records", + "activitytype" + ], + "codename": "delete_activitytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Identification Type", + "content_type": [ + "archaeological_context_records", + "identificationtype" + ], + "codename": "add_identificationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Identification Type", + "content_type": [ + "archaeological_context_records", + "identificationtype" + ], + "codename": "change_identificationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Identification Type", + "content_type": [ + "archaeological_context_records", + "identificationtype" + ], + "codename": "delete_identificationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical context record", + "content_type": [ + "archaeological_context_records", + "historicalcontextrecord" + ], + "codename": "add_historicalcontextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical context record", + "content_type": [ + "archaeological_context_records", + "historicalcontextrecord" + ], + "codename": "change_historicalcontextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical context record", + "content_type": [ + "archaeological_context_records", + "historicalcontextrecord" + ], + "codename": "delete_historicalcontextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Context Record", + "content_type": [ + "archaeological_context_records", + "contextrecord" + ], + "codename": "add_contextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Context Record", + "content_type": [ + "archaeological_context_records", + "contextrecord" + ], + "codename": "change_contextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Context Record", + "content_type": [ + "archaeological_context_records", + "contextrecord" + ], + "codename": "delete_contextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Context Records", + "content_type": [ + "archaeological_context_records", + "contextrecord" + ], + "codename": "view_contextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Context Record", + "content_type": [ + "archaeological_context_records", + "contextrecord" + ], + "codename": "view_own_contextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Context Record", + "content_type": [ + "archaeological_context_records", + "contextrecord" + ], + "codename": "add_own_contextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Context Record", + "content_type": [ + "archaeological_context_records", + "contextrecord" + ], + "codename": "change_own_contextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Context Record", + "content_type": [ + "archaeological_context_records", + "contextrecord" + ], + "codename": "delete_own_contextrecord" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Relation type", + "content_type": [ + "archaeological_context_records", + "relationtype" + ], + "codename": "add_relationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Relation type", + "content_type": [ + "archaeological_context_records", + "relationtype" + ], + "codename": "change_relationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Relation type", + "content_type": [ + "archaeological_context_records", + "relationtype" + ], + "codename": "delete_relationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Record relation", + "content_type": [ + "archaeological_context_records", + "recordrelations" + ], + "codename": "add_recordrelations" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Record relation", + "content_type": [ + "archaeological_context_records", + "recordrelations" + ], + "codename": "change_recordrelations" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Record relation", + "content_type": [ + "archaeological_context_records", + "recordrelations" + ], + "codename": "delete_recordrelations" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Context record documentation", + "content_type": [ + "archaeological_context_records", + "contextrecordsource" + ], + "codename": "add_contextrecordsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Context record documentation", + "content_type": [ + "archaeological_context_records", + "contextrecordsource" + ], + "codename": "change_contextrecordsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Context record documentation", + "content_type": [ + "archaeological_context_records", + "contextrecordsource" + ], + "codename": "delete_contextrecordsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Warehouse type", + "content_type": [ + "archaeological_warehouse", + "warehousetype" + ], + "codename": "add_warehousetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Warehouse type", + "content_type": [ + "archaeological_warehouse", + "warehousetype" + ], + "codename": "change_warehousetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Warehouse type", + "content_type": [ + "archaeological_warehouse", + "warehousetype" + ], + "codename": "delete_warehousetype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Warehouse", + "content_type": [ + "archaeological_warehouse", + "warehouse" + ], + "codename": "add_warehouse" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Warehouse", + "content_type": [ + "archaeological_warehouse", + "warehouse" + ], + "codename": "change_warehouse" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Warehouse", + "content_type": [ + "archaeological_warehouse", + "warehouse" + ], + "codename": "delete_warehouse" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Warehouses", + "content_type": [ + "archaeological_warehouse", + "warehouse" + ], + "codename": "view_warehouse" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Warehouse", + "content_type": [ + "archaeological_warehouse", + "warehouse" + ], + "codename": "view_own_warehouse" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Warehouse", + "content_type": [ + "archaeological_warehouse", + "warehouse" + ], + "codename": "add_own_warehouse" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Warehouse", + "content_type": [ + "archaeological_warehouse", + "warehouse" + ], + "codename": "change_own_warehouse" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Warehouse", + "content_type": [ + "archaeological_warehouse", + "warehouse" + ], + "codename": "delete_own_warehouse" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Container type", + "content_type": [ + "archaeological_warehouse", + "containertype" + ], + "codename": "add_containertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Container type", + "content_type": [ + "archaeological_warehouse", + "containertype" + ], + "codename": "change_containertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Container type", + "content_type": [ + "archaeological_warehouse", + "containertype" + ], + "codename": "delete_containertype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Container", + "content_type": [ + "archaeological_warehouse", + "container" + ], + "codename": "add_container" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Container", + "content_type": [ + "archaeological_warehouse", + "container" + ], + "codename": "change_container" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Container", + "content_type": [ + "archaeological_warehouse", + "container" + ], + "codename": "delete_container" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Material type", + "content_type": [ + "archaeological_finds", + "materialtype" + ], + "codename": "add_materialtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Material type", + "content_type": [ + "archaeological_finds", + "materialtype" + ], + "codename": "change_materialtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Material type", + "content_type": [ + "archaeological_finds", + "materialtype" + ], + "codename": "delete_materialtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Conservatory state", + "content_type": [ + "archaeological_finds", + "conservatorystate" + ], + "codename": "add_conservatorystate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Conservatory state", + "content_type": [ + "archaeological_finds", + "conservatorystate" + ], + "codename": "change_conservatorystate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Conservatory state", + "content_type": [ + "archaeological_finds", + "conservatorystate" + ], + "codename": "delete_conservatorystate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Preservation type", + "content_type": [ + "archaeological_finds", + "preservationtype" + ], + "codename": "add_preservationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Preservation type", + "content_type": [ + "archaeological_finds", + "preservationtype" + ], + "codename": "change_preservationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Preservation type", + "content_type": [ + "archaeological_finds", + "preservationtype" + ], + "codename": "delete_preservationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Integrity type", + "content_type": [ + "archaeological_finds", + "integritytype" + ], + "codename": "add_integritytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Integrity type", + "content_type": [ + "archaeological_finds", + "integritytype" + ], + "codename": "change_integritytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Integrity type", + "content_type": [ + "archaeological_finds", + "integritytype" + ], + "codename": "delete_integritytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Object type", + "content_type": [ + "archaeological_finds", + "objecttype" + ], + "codename": "add_objecttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Object type", + "content_type": [ + "archaeological_finds", + "objecttype" + ], + "codename": "change_objecttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Object type", + "content_type": [ + "archaeological_finds", + "objecttype" + ], + "codename": "delete_objecttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical base find", + "content_type": [ + "archaeological_finds", + "historicalbasefind" + ], + "codename": "add_historicalbasefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical base find", + "content_type": [ + "archaeological_finds", + "historicalbasefind" + ], + "codename": "change_historicalbasefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical base find", + "content_type": [ + "archaeological_finds", + "historicalbasefind" + ], + "codename": "delete_historicalbasefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Base find", + "content_type": [ + "archaeological_finds", + "basefind" + ], + "codename": "add_basefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Base find", + "content_type": [ + "archaeological_finds", + "basefind" + ], + "codename": "change_basefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Base find", + "content_type": [ + "archaeological_finds", + "basefind" + ], + "codename": "delete_basefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Base finds", + "content_type": [ + "archaeological_finds", + "basefind" + ], + "codename": "view_basefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Base find", + "content_type": [ + "archaeological_finds", + "basefind" + ], + "codename": "view_own_basefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Base find", + "content_type": [ + "archaeological_finds", + "basefind" + ], + "codename": "add_own_basefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Base find", + "content_type": [ + "archaeological_finds", + "basefind" + ], + "codename": "change_own_basefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Base find", + "content_type": [ + "archaeological_finds", + "basefind" + ], + "codename": "delete_own_basefind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add find basket", + "content_type": [ + "archaeological_finds", + "findbasket" + ], + "codename": "add_findbasket" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change find basket", + "content_type": [ + "archaeological_finds", + "findbasket" + ], + "codename": "change_findbasket" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete find basket", + "content_type": [ + "archaeological_finds", + "findbasket" + ], + "codename": "delete_findbasket" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical find", + "content_type": [ + "archaeological_finds", + "historicalfind" + ], + "codename": "add_historicalfind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical find", + "content_type": [ + "archaeological_finds", + "historicalfind" + ], + "codename": "change_historicalfind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical find", + "content_type": [ + "archaeological_finds", + "historicalfind" + ], + "codename": "delete_historicalfind" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Find", + "content_type": [ + "archaeological_finds", + "find" + ], + "codename": "add_find" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Find", + "content_type": [ + "archaeological_finds", + "find" + ], + "codename": "change_find" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Find", + "content_type": [ + "archaeological_finds", + "find" + ], + "codename": "delete_find" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Finds", + "content_type": [ + "archaeological_finds", + "find" + ], + "codename": "view_find" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Find", + "content_type": [ + "archaeological_finds", + "find" + ], + "codename": "view_own_find" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Find", + "content_type": [ + "archaeological_finds", + "find" + ], + "codename": "add_own_find" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Find", + "content_type": [ + "archaeological_finds", + "find" + ], + "codename": "change_own_find" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Find", + "content_type": [ + "archaeological_finds", + "find" + ], + "codename": "delete_own_find" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Find documentation", + "content_type": [ + "archaeological_finds", + "findsource" + ], + "codename": "add_findsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Find documentation", + "content_type": [ + "archaeological_finds", + "findsource" + ], + "codename": "change_findsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Find documentation", + "content_type": [ + "archaeological_finds", + "findsource" + ], + "codename": "delete_findsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Treatment type", + "content_type": [ + "archaeological_finds", + "treatmenttype" + ], + "codename": "add_treatmenttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Treatment type", + "content_type": [ + "archaeological_finds", + "treatmenttype" + ], + "codename": "change_treatmenttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Treatment type", + "content_type": [ + "archaeological_finds", + "treatmenttype" + ], + "codename": "delete_treatmenttype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical treatment", + "content_type": [ + "archaeological_finds", + "historicaltreatment" + ], + "codename": "add_historicaltreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical treatment", + "content_type": [ + "archaeological_finds", + "historicaltreatment" + ], + "codename": "change_historicaltreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical treatment", + "content_type": [ + "archaeological_finds", + "historicaltreatment" + ], + "codename": "delete_historicaltreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Treatment", + "content_type": [ + "archaeological_finds", + "treatment" + ], + "codename": "add_treatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Treatment", + "content_type": [ + "archaeological_finds", + "treatment" + ], + "codename": "change_treatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Treatment", + "content_type": [ + "archaeological_finds", + "treatment" + ], + "codename": "delete_treatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Treatments", + "content_type": [ + "archaeological_finds", + "treatment" + ], + "codename": "view_treatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Treatment", + "content_type": [ + "archaeological_finds", + "treatment" + ], + "codename": "view_own_treatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Treatment", + "content_type": [ + "archaeological_finds", + "treatment" + ], + "codename": "add_own_treatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Treatment", + "content_type": [ + "archaeological_finds", + "treatment" + ], + "codename": "change_own_treatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Treatment", + "content_type": [ + "archaeological_finds", + "treatment" + ], + "codename": "delete_own_treatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Treatment documentation", + "content_type": [ + "archaeological_finds", + "treatmentsource" + ], + "codename": "add_treatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Treatment documentation", + "content_type": [ + "archaeological_finds", + "treatmentsource" + ], + "codename": "change_treatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Treatment documentation", + "content_type": [ + "archaeological_finds", + "treatmentsource" + ], + "codename": "delete_treatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Property", + "content_type": [ + "archaeological_finds", + "property" + ], + "codename": "add_property" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Property", + "content_type": [ + "archaeological_finds", + "property" + ], + "codename": "change_property" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Property", + "content_type": [ + "archaeological_finds", + "property" + ], + "codename": "delete_property" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Title type", + "content_type": [ + "ishtar_common", + "titletype" + ], + "codename": "add_titletype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Title type", + "content_type": [ + "ishtar_common", + "titletype" + ], + "codename": "change_titletype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Title type", + "content_type": [ + "ishtar_common", + "titletype" + ], + "codename": "delete_titletype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical person", + "content_type": [ + "ishtar_common", + "historicalperson" + ], + "codename": "add_historicalperson" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical person", + "content_type": [ + "ishtar_common", + "historicalperson" + ], + "codename": "change_historicalperson" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical person", + "content_type": [ + "ishtar_common", + "historicalperson" + ], + "codename": "delete_historicalperson" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Remarkability type", + "content_type": [ + "archaeological_finds", + "remarkabilitytype" + ], + "codename": "add_remarkabilitytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Remarkability type", + "content_type": [ + "archaeological_finds", + "remarkabilitytype" + ], + "codename": "change_remarkabilitytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Remarkability type", + "content_type": [ + "archaeological_finds", + "remarkabilitytype" + ], + "codename": "delete_remarkabilitytype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add find upstream treatments", + "content_type": [ + "archaeological_finds", + "findupstreamtreatments" + ], + "codename": "add_findupstreamtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change find upstream treatments", + "content_type": [ + "archaeological_finds", + "findupstreamtreatments" + ], + "codename": "change_findupstreamtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete find upstream treatments", + "content_type": [ + "archaeological_finds", + "findupstreamtreatments" + ], + "codename": "delete_findupstreamtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add find downstream treatments", + "content_type": [ + "archaeological_finds", + "finddownstreamtreatments" + ], + "codename": "add_finddownstreamtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change find downstream treatments", + "content_type": [ + "archaeological_finds", + "finddownstreamtreatments" + ], + "codename": "change_finddownstreamtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete find downstream treatments", + "content_type": [ + "archaeological_finds", + "finddownstreamtreatments" + ], + "codename": "delete_finddownstreamtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add find treatments", + "content_type": [ + "archaeological_finds", + "findtreatments" + ], + "codename": "add_findtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change find treatments", + "content_type": [ + "archaeological_finds", + "findtreatments" + ], + "codename": "change_findtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete find treatments", + "content_type": [ + "archaeological_finds", + "findtreatments" + ], + "codename": "delete_findtreatments" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Treatment file type", + "content_type": [ + "archaeological_finds", + "treatmentfiletype" + ], + "codename": "add_treatmentfiletype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Treatment file type", + "content_type": [ + "archaeological_finds", + "treatmentfiletype" + ], + "codename": "change_treatmentfiletype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Treatment file type", + "content_type": [ + "archaeological_finds", + "treatmentfiletype" + ], + "codename": "delete_treatmentfiletype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add historical treatment file", + "content_type": [ + "archaeological_finds", + "historicaltreatmentfile" + ], + "codename": "add_historicaltreatmentfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change historical treatment file", + "content_type": [ + "archaeological_finds", + "historicaltreatmentfile" + ], + "codename": "change_historicaltreatmentfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete historical treatment file", + "content_type": [ + "archaeological_finds", + "historicaltreatmentfile" + ], + "codename": "delete_historicaltreatmentfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Treatment file", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "add_treatmentfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Treatment file", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "change_treatmentfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Treatment file", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "delete_treatmentfile" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Treatment file documentation", + "content_type": [ + "archaeological_finds", + "treatmentfilesource" + ], + "codename": "add_treatmentfilesource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Treatment file documentation", + "content_type": [ + "archaeological_finds", + "treatmentfilesource" + ], + "codename": "change_treatmentfilesource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Treatment file documentation", + "content_type": [ + "archaeological_finds", + "treatmentfilesource" + ], + "codename": "delete_treatmentfilesource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Warehouse division", + "content_type": [ + "archaeological_warehouse", + "warehousedivision" + ], + "codename": "add_warehousedivision" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Warehouse division", + "content_type": [ + "archaeological_warehouse", + "warehousedivision" + ], + "codename": "change_warehousedivision" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Warehouse division", + "content_type": [ + "archaeological_warehouse", + "warehousedivision" + ], + "codename": "delete_warehousedivision" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add warehouse division link", + "content_type": [ + "archaeological_warehouse", + "warehousedivisionlink" + ], + "codename": "add_warehousedivisionlink" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change warehouse division link", + "content_type": [ + "archaeological_warehouse", + "warehousedivisionlink" + ], + "codename": "change_warehousedivisionlink" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete warehouse division link", + "content_type": [ + "archaeological_warehouse", + "warehousedivisionlink" + ], + "codename": "delete_warehousedivisionlink" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Container localisation", + "content_type": [ + "archaeological_warehouse", + "containerlocalisation" + ], + "codename": "add_containerlocalisation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Container localisation", + "content_type": [ + "archaeological_warehouse", + "containerlocalisation" + ], + "codename": "change_containerlocalisation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Container localisation", + "content_type": [ + "archaeological_warehouse", + "containerlocalisation" + ], + "codename": "delete_containerlocalisation" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Collection", + "content_type": [ + "archaeological_warehouse", + "collection" + ], + "codename": "add_collection" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Collection", + "content_type": [ + "archaeological_warehouse", + "collection" + ], + "codename": "change_collection" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Collection", + "content_type": [ + "archaeological_warehouse", + "collection" + ], + "codename": "delete_collection" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Type of treatment state", + "content_type": [ + "archaeological_finds", + "treatmentstate" + ], + "codename": "add_treatmentstate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Type of treatment state", + "content_type": [ + "archaeological_finds", + "treatmentstate" + ], + "codename": "change_treatmentstate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Type of treatment state", + "content_type": [ + "archaeological_finds", + "treatmentstate" + ], + "codename": "delete_treatmentstate" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Spatial reference system", + "content_type": [ + "ishtar_common", + "spatialreferencesystem" + ], + "codename": "add_spatialreferencesystem" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Spatial reference system", + "content_type": [ + "ishtar_common", + "spatialreferencesystem" + ], + "codename": "change_spatialreferencesystem" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Spatial reference system", + "content_type": [ + "ishtar_common", + "spatialreferencesystem" + ], + "codename": "delete_spatialreferencesystem" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Batch type", + "content_type": [ + "archaeological_finds", + "batchtype" + ], + "codename": "add_batchtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Batch type", + "content_type": [ + "archaeological_finds", + "batchtype" + ], + "codename": "change_batchtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Batch type", + "content_type": [ + "archaeological_finds", + "batchtype" + ], + "codename": "delete_batchtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Treatment requests", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "view_filetreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Treatment request", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "view_own_filetreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Treatment request", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "add_own_filetreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Treatment request", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "change_own_filetreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Treatment request", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "delete_own_filetreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Importer - Model", + "content_type": [ + "ishtar_common", + "importermodel" + ], + "codename": "add_importermodel" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Importer - Model", + "content_type": [ + "ishtar_common", + "importermodel" + ], + "codename": "change_importermodel" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Importer - Model", + "content_type": [ + "ishtar_common", + "importermodel" + ], + "codename": "delete_importermodel" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Excavation technic type", + "content_type": [ + "archaeological_context_records", + "excavationtechnictype" + ], + "codename": "add_excavationtechnictype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Excavation technic type", + "content_type": [ + "archaeological_context_records", + "excavationtechnictype" + ], + "codename": "change_excavationtechnictype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Excavation technic type", + "content_type": [ + "archaeological_context_records", + "excavationtechnictype" + ], + "codename": "delete_excavationtechnictype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add record relation view", + "content_type": [ + "archaeological_context_records", + "recordrelationview" + ], + "codename": "add_recordrelationview" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change record relation view", + "content_type": [ + "archaeological_context_records", + "recordrelationview" + ], + "codename": "change_recordrelationview" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete record relation view", + "content_type": [ + "archaeological_context_records", + "recordrelationview" + ], + "codename": "delete_recordrelationview" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Documentation type", + "content_type": [ + "archaeological_context_records", + "documentationtype" + ], + "codename": "add_documentationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Documentation type", + "content_type": [ + "archaeological_context_records", + "documentationtype" + ], + "codename": "change_documentationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Documentation type", + "content_type": [ + "archaeological_context_records", + "documentationtype" + ], + "codename": "delete_documentationtype" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Treatment request", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "add_filetreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Treatment request", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "change_filetreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Treatment request", + "content_type": [ + "archaeological_finds", + "treatmentfile" + ], + "codename": "delete_filetreatment" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Authors", + "content_type": [ + "ishtar_common", + "author" + ], + "codename": "view_author" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Author", + "content_type": [ + "ishtar_common", + "author" + ], + "codename": "view_own_author" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Author", + "content_type": [ + "ishtar_common", + "author" + ], + "codename": "add_own_author" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Author", + "content_type": [ + "ishtar_common", + "author" + ], + "codename": "change_own_author" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Author", + "content_type": [ + "ishtar_common", + "author" + ], + "codename": "delete_own_author" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Context record sources", + "content_type": [ + "archaeological_context_records", + "contextrecordsource" + ], + "codename": "view_contextrecordsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Context record source", + "content_type": [ + "archaeological_context_records", + "contextrecordsource" + ], + "codename": "view_own_contextrecordsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Context record source", + "content_type": [ + "archaeological_context_records", + "contextrecordsource" + ], + "codename": "add_own_contextrecordsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Context record source", + "content_type": [ + "archaeological_context_records", + "contextrecordsource" + ], + "codename": "change_own_contextrecordsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Context record source", + "content_type": [ + "archaeological_context_records", + "contextrecordsource" + ], + "codename": "delete_own_contextrecordsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Find sources", + "content_type": [ + "archaeological_finds", + "findsource" + ], + "codename": "view_findsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Find source", + "content_type": [ + "archaeological_finds", + "findsource" + ], + "codename": "view_own_findsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Find source", + "content_type": [ + "archaeological_finds", + "findsource" + ], + "codename": "add_own_findsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Find source", + "content_type": [ + "archaeological_finds", + "findsource" + ], + "codename": "change_own_findsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Find source", + "content_type": [ + "archaeological_finds", + "findsource" + ], + "codename": "delete_own_findsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Treatment source", + "content_type": [ + "archaeological_finds", + "treatmentsource" + ], + "codename": "view_treatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Treatment source", + "content_type": [ + "archaeological_finds", + "treatmentsource" + ], + "codename": "view_own_treatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Treatment source", + "content_type": [ + "archaeological_finds", + "treatmentsource" + ], + "codename": "add_own_treatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Treatment source", + "content_type": [ + "archaeological_finds", + "treatmentsource" + ], + "codename": "change_own_treatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Treatment source", + "content_type": [ + "archaeological_finds", + "treatmentsource" + ], + "codename": "delete_own_treatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view all Treatment request source", + "content_type": [ + "archaeological_finds", + "treatmentfilesource" + ], + "codename": "view_filetreatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can view own Treatment request source", + "content_type": [ + "archaeological_finds", + "treatmentfilesource" + ], + "codename": "view_own_filetreatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add own Treatment request source", + "content_type": [ + "archaeological_finds", + "treatmentfilesource" + ], + "codename": "add_own_filetreatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change own Treatment request source", + "content_type": [ + "archaeological_finds", + "treatmentfilesource" + ], + "codename": "change_own_filetreatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete own Treatment request source", + "content_type": [ + "archaeological_finds", + "treatmentfilesource" + ], + "codename": "delete_own_filetreatmentsource" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Administration script", + "content_type": [ + "ishtar_common", + "administrationscript" + ], + "codename": "add_administrationscript" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Administration script", + "content_type": [ + "ishtar_common", + "administrationscript" + ], + "codename": "change_administrationscript" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Administration script", + "content_type": [ + "ishtar_common", + "administrationscript" + ], + "codename": "delete_administrationscript" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can add Administration task", + "content_type": [ + "ishtar_common", + "administrationtask" + ], + "codename": "add_administrationtask" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can change Administration task", + "content_type": [ + "ishtar_common", + "administrationtask" + ], + "codename": "change_administrationtask" + } +}, +{ + "model": "auth.permission", + "fields": { + "name": "Can delete Administration task", + "content_type": [ + "ishtar_common", + "administrationtask" + ], + "codename": "delete_administrationtask" + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Op\u00e9rations : lecture", + "permissions": [ + [ + "view_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 10, - "model": "auth.group", - "fields": { - "name": "Actes administratifs : modification/suppression", - "permissions": [ - 208, - 209 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Dossiers : lecture", + "permissions": [ + [ + "view_file", + "archaeological_files", + "file" ] - } - }, - { - "pk": 28, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations : cl\u00f4ture", - "permissions": [ - 183 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "UE : lecture", + "permissions": [ + [ + "view_contextrecord", + "archaeological_context_records", + "contextrecord" ] - } - }, - { - "pk": 29, - "model": "auth.group", - "fields": { - "name": "Dossiers : cl\u00f4ture", - "permissions": [ - 151 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "D\u00e9p\u00f4ts : lecture", + "permissions": [ + [ + "view_warehouse", + "archaeological_warehouse", + "warehouse" ] - } - }, - { - "pk": 11, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts : ajout", - "permissions": [ - 265 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Mobilier : lecture", + "permissions": [ + [ + "view_basefind", + "archaeological_finds", + "basefind" + ], + [ + "view_find", + "archaeological_finds", + "find" ] - } - }, - { - "pk": 12, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts : modification/suppression", - "permissions": [ - 266, - 267 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Traitements : lecture", + "permissions": [ + [ + "view_treatment", + "archaeological_finds", + "treatment" ] - } - }, - { - "pk": 36, - "model": "auth.group", - "fields": { - "name": "Actes administratifs rattach\u00e9s : lecture", - "permissions": [ - 211 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Actes administratifs : lecture", + "permissions": [ + [ + "view_administrativeact", + "archaeological_operations", + "administrativeact" ] - } - }, - { - "pk": 67, - "model": "auth.group", - "fields": { - "name": "Demandes de traitement rattach\u00e9es : ajout", - "permissions": [ - 400 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Actes administratifs : ajout", + "permissions": [ + [ + "add_administrativeact", + "archaeological_operations", + "administrativeact" ] - } - }, - { - "pk": 32, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration : ajout", - "permissions": [ - 175 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Actes administratifs : modification/suppression", + "permissions": [ + [ + "change_administrativeact", + "archaeological_operations", + "administrativeact" + ], + [ + "delete_administrativeact", + "archaeological_operations", + "administrativeact" ] - } - }, - { - "pk": 31, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration : modification/suppression", - "permissions": [ - 176, - 177 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "D\u00e9p\u00f4ts : ajout", + "permissions": [ + [ + "add_warehouse", + "archaeological_warehouse", + "warehouse" ] - } - }, - { - "pk": 68, - "model": "auth.group", - "fields": { - "name": "Demandes de traitement rattach\u00e9es : lecture", - "permissions": [ - 399 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "D\u00e9p\u00f4ts : modification/suppression", + "permissions": [ + [ + "change_warehouse", + "archaeological_warehouse", + "warehouse" + ], + [ + "delete_warehouse", + "archaeological_warehouse", + "warehouse" ] - } - }, - { - "pk": 13, - "model": "auth.group", - "fields": { - "name": "Dossiers : ajout", - "permissions": [ - 143 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Dossiers : ajout", + "permissions": [ + [ + "add_file", + "archaeological_files", + "file" ] - } - }, - { - "pk": 94, - "model": "auth.group", - "fields": { - "name": "Documents de demande de traitement : ajout", - "permissions": [ - 374 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Dossiers : modification/suppression", + "permissions": [ + [ + "change_file", + "archaeological_files", + "file" + ], + [ + "delete_file", + "archaeological_files", + "file" ] - } - }, - { - "pk": 14, - "model": "auth.group", - "fields": { - "name": "Dossiers : modification/suppression", - "permissions": [ - 144, - 145 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Mobilier : ajout", + "permissions": [ + [ + "add_basefind", + "archaeological_finds", + "basefind" + ], + [ + "add_find", + "archaeological_finds", + "find" ] - } - }, - { - "pk": 69, - "model": "auth.group", - "fields": { - "name": "Demandes de traitement rattach\u00e9es : modification/suppression", - "permissions": [ - 401, - 402 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Mobilier : modification/suppression", + "permissions": [ + [ + "change_basefind", + "archaeological_finds", + "basefind" + ], + [ + "delete_basefind", + "archaeological_finds", + "basefind" + ], + [ + "change_find", + "archaeological_finds", + "find" + ], + [ + "delete_find", + "archaeological_finds", + "find" ] - } - }, - { - "pk": 15, - "model": "auth.group", - "fields": { - "name": "Mobilier : ajout", - "permissions": [ - 297, - 311 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Op\u00e9rations : ajout", + "permissions": [ + [ + "add_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 16, - "model": "auth.group", - "fields": { - "name": "Mobilier : modification/suppression", - "permissions": [ - 298, - 299, - 312, - 313 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Op\u00e9rations : modification/suppression", + "permissions": [ + [ + "change_operation", + "archaeological_operations", + "operation" + ], + [ + "delete_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 54, - "model": "auth.group", - "fields": { - "name": "Organisations rattach\u00e9es : lecture", - "permissions": [ - 86 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Traitements : ajout", + "permissions": [ + [ + "add_treatment", + "archaeological_finds", + "treatment" ] - } - }, - { - "pk": 17, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations : ajout", - "permissions": [ - 175 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Traitements : modification/suppression", + "permissions": [ + [ + "change_treatment", + "archaeological_finds", + "treatment" + ], + [ + "delete_treatment", + "archaeological_finds", + "treatment" ] - } - }, - { - "pk": 95, - "model": "auth.group", - "fields": { - "name": "Documents de demande de traitement : modification/suppression", - "permissions": [ - 375, - 376 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "UE : ajout", + "permissions": [ + [ + "add_contextrecord", + "archaeological_context_records", + "contextrecord" ] - } - }, - { - "pk": 18, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations : modification/suppression", - "permissions": [ - 176, - 177 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "UE : modification/suppression", + "permissions": [ + [ + "change_contextrecord", + "archaeological_context_records", + "contextrecord" + ], + [ + "delete_contextrecord", + "archaeological_context_records", + "contextrecord" ] - } - }, - { - "pk": 52, - "model": "auth.group", - "fields": { - "name": "Organisations rattach\u00e9es : ajout", - "permissions": [ - 87 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Personnes : ajout", + "permissions": [ + [ + "add_person", + "ishtar_common", + "person" ] - } - }, - { - "pk": 27, - "model": "auth.group", - "fields": { - "name": "Organisations : ajout", - "permissions": [ - 82 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Personnes : modification/suppression", + "permissions": [ + [ + "change_person", + "ishtar_common", + "person" + ], + [ + "delete_person", + "ishtar_common", + "person" ] - } - }, - { - "pk": 26, - "model": "auth.group", - "fields": { - "name": "Organisations : modification/suppression", - "permissions": [ - 83, - 84 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Organisations : lecture", + "permissions": [ + [ + "view_organization", + "ishtar_common", + "organization" ] - } - }, - { - "pk": 53, - "model": "auth.group", - "fields": { - "name": "Organisations rattach\u00e9es : modification/suppression", - "permissions": [ - 88, - 89 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Organisations : modification/suppression", + "permissions": [ + [ + "change_organization", + "ishtar_common", + "organization" + ], + [ + "delete_organization", + "ishtar_common", + "organization" ] - } - }, - { - "pk": 19, - "model": "auth.group", - "fields": { - "name": "Traitements : ajout", - "permissions": [ - 328 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Organisations : ajout", + "permissions": [ + [ + "add_organization", + "ishtar_common", + "organization" ] - } - }, - { - "pk": 20, - "model": "auth.group", - "fields": { - "name": "Traitements : modification/suppression", - "permissions": [ - 329, - 330 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Op\u00e9rations : cl\u00f4ture", + "permissions": [ + [ + "close_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 9, - "model": "auth.group", - "fields": { - "name": "Actes administratifs : ajout", - "permissions": [ - 207 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Dossiers : cl\u00f4ture", + "permissions": [ + [ + "close_file", + "archaeological_files", + "file" ] - } - }, - { - "pk": 73, - "model": "auth.group", - "fields": { - "name": "Documents UE : lecture", - "permissions": [ - 423 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents op\u00e9ration : lecture", + "permissions": [ + [ + "view_operationsource", + "archaeological_operations", + "operationsource" ] - } - }, - { - "pk": 74, - "model": "auth.group", - "fields": { - "name": "Documents UE rattach\u00e9s : lecture", - "permissions": [ - 424 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents op\u00e9ration : modification/suppression", + "permissions": [ + [ + "change_operation", + "archaeological_operations", + "operation" + ], + [ + "delete_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 75, - "model": "auth.group", - "fields": { - "name": "Documents UE : ajout", - "permissions": [ - 259 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents op\u00e9ration : ajout", + "permissions": [ + [ + "add_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 8, - "model": "auth.group", - "fields": { - "name": "Actes administratifs : lecture", - "permissions": [ - 210 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Personnes : lecture", + "permissions": [ + [ + "view_person", + "ishtar_common", + "person" ] - } - }, - { - "pk": 72, - "model": "auth.group", - "fields": { - "name": "Auteurs : lecture", - "permissions": [ - 418 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Actes administratifs rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_administrativeact", + "archaeological_operations", + "administrativeact" ] - } - }, - { - "pk": 23, - "model": "auth.group", - "fields": { - "name": "Personnes : ajout", - "permissions": [ - 93 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Actes administratifs rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_administrativeact", + "archaeological_operations", + "administrativeact" + ], + [ + "delete_own_administrativeact", + "archaeological_operations", + "administrativeact" ] - } - }, - { - "pk": 24, - "model": "auth.group", - "fields": { - "name": "Personnes : modification/suppression", - "permissions": [ - 94, - 95 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Actes administratifs rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_administrativeact", + "archaeological_operations", + "administrativeact" ] - } - }, - { - "pk": 34, - "model": "auth.group", - "fields": { - "name": "Actes administratifs rattach\u00e9s : ajout", - "permissions": [ - 212 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "D\u00e9p\u00f4ts rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_warehouse", + "archaeological_warehouse", + "warehouse" ] - } - }, - { - "pk": 35, - "model": "auth.group", - "fields": { - "name": "Actes administratifs rattach\u00e9s : modification/suppression", - "permissions": [ - 213, - 214 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_warehouse", + "archaeological_warehouse", + "warehouse" + ], + [ + "delete_own_warehouse", + "archaeological_warehouse", + "warehouse" ] - } - }, - { - "pk": 37, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts rattach\u00e9s : ajout", - "permissions": [ - 270 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "D\u00e9p\u00f4ts rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_warehouse", + "archaeological_warehouse", + "warehouse" ] - } - }, - { - "pk": 38, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression", - "permissions": [ - 271, - 272 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents op\u00e9ration rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 40, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration rattach\u00e9s : ajout", - "permissions": [ - 180 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents op\u00e9ration rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_operation", + "archaeological_operations", + "operation" + ], + [ + "delete_own_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 41, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration rattach\u00e9s : modification/suppression", - "permissions": [ - 181, - 182 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents op\u00e9ration rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_operationsource", + "archaeological_operations", + "operationsource" ] - } - }, - { - "pk": 43, - "model": "auth.group", - "fields": { - "name": "Dossiers rattach\u00e9s : ajout", - "permissions": [ - 148 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Dossiers rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_file", + "archaeological_files", + "file" ] - } - }, - { - "pk": 44, - "model": "auth.group", - "fields": { - "name": "Dossiers rattach\u00e9s : modification/suppression", - "permissions": [ - 149, - 150 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Dossiers rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_file", + "archaeological_files", + "file" + ], + [ + "delete_own_file", + "archaeological_files", + "file" ] - } - }, - { - "pk": 55, - "model": "auth.group", - "fields": { - "name": "Traitements rattach\u00e9s : ajout", - "permissions": [ - 333 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Dossiers rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_file", + "archaeological_files", + "file" ] - } - }, - { - "pk": 56, - "model": "auth.group", - "fields": { - "name": "Traitements rattach\u00e9s : modification/suppression", - "permissions": [ - 334, - 335 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Mobilier rattach\u00e9 : ajout", + "permissions": [ + [ + "add_own_basefind", + "archaeological_finds", + "basefind" + ], + [ + "add_own_find", + "archaeological_finds", + "find" ] - } - }, - { - "pk": 64, - "model": "auth.group", - "fields": { - "name": "Demandes de traitement : ajout", - "permissions": [ - 415 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Mobilier rattach\u00e9 : modification/suppression", + "permissions": [ + [ + "change_own_basefind", + "archaeological_finds", + "basefind" + ], + [ + "delete_own_basefind", + "archaeological_finds", + "basefind" + ], + [ + "change_own_find", + "archaeological_finds", + "find" + ], + [ + "delete_own_find", + "archaeological_finds", + "find" ] - } - }, - { - "pk": 66, - "model": "auth.group", - "fields": { - "name": "Demandes de traitement : lecture", - "permissions": [ - 398 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Mobilier rattach\u00e9 : lecture", + "permissions": [ + [ + "view_own_basefind", + "archaeological_finds", + "basefind" + ], + [ + "view_own_find", + "archaeological_finds", + "find" ] - } - }, - { - "pk": 65, - "model": "auth.group", - "fields": { - "name": "Demandes de traitement : modification/suppression", - "permissions": [ - 416, - 417 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Op\u00e9rations rattach\u00e9es : ajout", + "permissions": [ + [ + "add_own_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 70, - "model": "auth.group", - "fields": { - "name": "Auteurs : ajout", - "permissions": [ - 107 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Op\u00e9rations rattach\u00e9es : modification/suppression", + "permissions": [ + [ + "change_own_operation", + "archaeological_operations", + "operation" + ], + [ + "delete_own_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 71, - "model": "auth.group", - "fields": { - "name": "Auteurs : modification/suppression", - "permissions": [ - 108, - 109 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Op\u00e9rations rattach\u00e9es : lecture", + "permissions": [ + [ + "view_own_operation", + "archaeological_operations", + "operation" ] - } - }, - { - "pk": 39, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts rattach\u00e9s : lecture", - "permissions": [ - 269 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Organisations rattach\u00e9es : ajout", + "permissions": [ + [ + "add_own_organization", + "ishtar_common", + "organization" ] - } - }, - { - "pk": 5, - "model": "auth.group", - "fields": { - "name": "D\u00e9p\u00f4ts : lecture", - "permissions": [ - 268 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Organisations rattach\u00e9es : modification/suppression", + "permissions": [ + [ + "change_own_organization", + "ishtar_common", + "organization" + ], + [ + "delete_own_organization", + "ishtar_common", + "organization" ] - } - }, - { - "pk": 42, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration rattach\u00e9s : lecture", - "permissions": [ - 197 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Organisations rattach\u00e9es : lecture", + "permissions": [ + [ + "view_own_organization", + "ishtar_common", + "organization" ] - } - }, - { - "pk": 30, - "model": "auth.group", - "fields": { - "name": "Documents op\u00e9ration : lecture", - "permissions": [ - 196 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Traitements rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_treatment", + "archaeological_finds", + "treatment" ] - } - }, - { - "pk": 45, - "model": "auth.group", - "fields": { - "name": "Dossiers rattach\u00e9s : lecture", - "permissions": [ - 147 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Traitements rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_treatment", + "archaeological_finds", + "treatment" + ], + [ + "delete_own_treatment", + "archaeological_finds", + "treatment" ] - } - }, - { - "pk": 2, - "model": "auth.group", - "fields": { - "name": "Dossiers : lecture", - "permissions": [ - 146 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Traitements rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_treatment", + "archaeological_finds", + "treatment" ] - } - }, - { - "pk": 6, - "model": "auth.group", - "fields": { - "name": "Mobilier : lecture", - "permissions": [ - 300, - 314 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "UE rattach\u00e9es : ajout", + "permissions": [ + [ + "add_own_contextrecord", + "archaeological_context_records", + "contextrecord" ] - } - }, - { - "pk": 1, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations : lecture", - "permissions": [ - 178 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "UE rattach\u00e9es : modification/suppression", + "permissions": [ + [ + "change_own_contextrecord", + "archaeological_context_records", + "contextrecord" + ], + [ + "delete_own_contextrecord", + "archaeological_context_records", + "contextrecord" ] - } - }, - { - "pk": 25, - "model": "auth.group", - "fields": { - "name": "Organisations : lecture", - "permissions": [ - 85 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "UE rattach\u00e9es : lecture", + "permissions": [ + [ + "view_own_contextrecord", + "archaeological_context_records", + "contextrecord" ] - } - }, - { - "pk": 33, - "model": "auth.group", - "fields": { - "name": "Personnes : lecture", - "permissions": [ - 96 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Personnes rattach\u00e9es : ajout", + "permissions": [ + [ + "add_own_person", + "ishtar_common", + "person" ] - } - }, - { - "pk": 57, - "model": "auth.group", - "fields": { - "name": "Traitements rattach\u00e9s : lecture", - "permissions": [ - 332 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Personnes rattach\u00e9es : modification/suppression", + "permissions": [ + [ + "change_own_person", + "ishtar_common", + "person" + ], + [ + "delete_own_person", + "ishtar_common", + "person" ] - } - }, - { - "pk": 7, - "model": "auth.group", - "fields": { - "name": "Traitements : lecture", - "permissions": [ - 331 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Personnes rattach\u00e9es : lecture", + "permissions": [ + [ + "view_own_person", + "ishtar_common", + "person" ] - } - }, - { - "pk": 4, - "model": "auth.group", - "fields": { - "name": "UE : lecture", - "permissions": [ - 248 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Demandes de traitement : ajout", + "permissions": [ + [ + "add_filetreatment", + "archaeological_finds", + "treatmentfile" ] - } - }, - { - "pk": 21, - "model": "auth.group", - "fields": { - "name": "UE : ajout", - "permissions": [ - 245 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Demandes de traitement : modification/suppression", + "permissions": [ + [ + "change_filetreatment", + "archaeological_finds", + "treatmentfile" + ], + [ + "delete_filetreatment", + "archaeological_finds", + "treatmentfile" ] - } - }, - { - "pk": 22, - "model": "auth.group", - "fields": { - "name": "UE : modification/suppression", - "permissions": [ - 246, - 247 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Demandes de traitement : lecture", + "permissions": [ + [ + "view_filetreatment", + "archaeological_finds", + "treatmentfile" ] - } - }, - { - "pk": 58, - "model": "auth.group", - "fields": { - "name": "UE rattach\u00e9es : ajout", - "permissions": [ - 250 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Demandes de traitement rattach\u00e9es : ajout", + "permissions": [ + [ + "add_own_filetreatment", + "archaeological_finds", + "treatmentfile" ] - } - }, - { - "pk": 60, - "model": "auth.group", - "fields": { - "name": "UE rattach\u00e9es : lecture", - "permissions": [ - 249 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Demandes de traitement rattach\u00e9es : lecture", + "permissions": [ + [ + "view_own_filetreatment", + "archaeological_finds", + "treatmentfile" ] - } - }, - { - "pk": 59, - "model": "auth.group", - "fields": { - "name": "UE rattach\u00e9es : modification/suppression", - "permissions": [ - 251, - 252 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Demandes de traitement rattach\u00e9es : modification/suppression", + "permissions": [ + [ + "change_own_filetreatment", + "archaeological_finds", + "treatmentfile" + ], + [ + "delete_own_filetreatment", + "archaeological_finds", + "treatmentfile" ] - } - }, - { - "pk": 61, - "model": "auth.group", - "fields": { - "name": "Personnes rattach\u00e9es : ajout", - "permissions": [ - 98 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Auteurs : ajout", + "permissions": [ + [ + "add_author", + "ishtar_common", + "author" ] - } - }, - { - "pk": 63, - "model": "auth.group", - "fields": { - "name": "Personnes rattach\u00e9es : lecture", - "permissions": [ - 97 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Auteurs : modification/suppression", + "permissions": [ + [ + "change_author", + "ishtar_common", + "author" + ], + [ + "delete_author", + "ishtar_common", + "author" ] - } - }, - { - "pk": 62, - "model": "auth.group", - "fields": { - "name": "Personnes rattach\u00e9es : modification/suppression", - "permissions": [ - 99, - 100 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Auteurs : lecture", + "permissions": [ + [ + "view_author", + "ishtar_common", + "author" ] - } - }, - { - "pk": 49, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations rattach\u00e9es : ajout", - "permissions": [ - 180 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents UE : lecture", + "permissions": [ + [ + "view_contextrecordsource", + "archaeological_context_records", + "contextrecordsource" ] - } - }, - { - "pk": 51, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations rattach\u00e9es : lecture", - "permissions": [ - 179 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents UE rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_contextrecordsource", + "archaeological_context_records", + "contextrecordsource" ] - } - }, - { - "pk": 50, - "model": "auth.group", - "fields": { - "name": "Op\u00e9rations rattach\u00e9es : modification/suppression", - "permissions": [ - 181, - 182 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents UE : ajout", + "permissions": [ + [ + "add_contextrecordsource", + "archaeological_context_records", + "contextrecordsource" ] - } - }, - { - "pk": 46, - "model": "auth.group", - "fields": { - "name": "Mobilier rattach\u00e9 : ajout", - "permissions": [ - 302, - 316 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents UE : modification/suppression", + "permissions": [ + [ + "change_contextrecordsource", + "archaeological_context_records", + "contextrecordsource" + ], + [ + "delete_contextrecordsource", + "archaeological_context_records", + "contextrecordsource" ] - } - }, - { - "pk": 48, - "model": "auth.group", - "fields": { - "name": "Mobilier rattach\u00e9 : lecture", - "permissions": [ - 301, - 315 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents UE rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_contextrecordsource", + "archaeological_context_records", + "contextrecordsource" + ], + [ + "delete_own_contextrecordsource", + "archaeological_context_records", + "contextrecordsource" ] - } - }, - { - "pk": 47, - "model": "auth.group", - "fields": { - "name": "Mobilier rattach\u00e9 : modification/suppression", - "permissions": [ - 303, - 304, - 317, - 318 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents UE rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_contextrecordsource", + "archaeological_context_records", + "contextrecordsource" ] - } - }, - { - "pk": 77, - "model": "auth.group", - "fields": { - "name": "Documents UE rattach\u00e9s : modification/suppression", - "permissions": [ - 426, - 427 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents mobilier : lecture", + "permissions": [ + [ + "view_findsource", + "archaeological_finds", + "findsource" ] - } - }, - { - "pk": 76, - "model": "auth.group", - "fields": { - "name": "Documents UE : modification/suppression", - "permissions": [ - 260, - 261 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents mobilier : ajout", + "permissions": [ + [ + "add_findsource", + "archaeological_finds", + "findsource" ] - } - }, - { - "pk": 78, - "model": "auth.group", - "fields": { - "name": "Documents UE rattach\u00e9s : ajout", - "permissions": [ - 425 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents mobilier : modification/suppression", + "permissions": [ + [ + "change_findsource", + "archaeological_finds", + "findsource" + ], + [ + "delete_findsource", + "archaeological_finds", + "findsource" ] - } - }, - { - "pk": 79, - "model": "auth.group", - "fields": { - "name": "Documents mobilier : lecture", - "permissions": [ - 428 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents mobilier rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_findsource", + "archaeological_finds", + "findsource" ] - } - }, - { - "pk": 80, - "model": "auth.group", - "fields": { - "name": "Documents mobilier : ajout", - "permissions": [ - 319 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents mobilier rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_findsource", + "archaeological_finds", + "findsource" ] - } - }, - { - "pk": 81, - "model": "auth.group", - "fields": { - "name": "Documents mobilier : modification/suppression", - "permissions": [ - 320, - 321 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents mobilier rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_findsource", + "archaeological_finds", + "findsource" + ], + [ + "delete_own_findsource", + "archaeological_finds", + "findsource" ] - } - }, - { - "pk": 82, - "model": "auth.group", - "fields": { - "name": "Documents mobilier rattach\u00e9s : ajout", - "permissions": [ - 430 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de traitement : lecture", + "permissions": [ + [ + "view_treatmentsource", + "archaeological_finds", + "treatmentsource" ] - } - }, - { - "pk": 83, - "model": "auth.group", - "fields": { - "name": "Documents mobilier rattach\u00e9s : lecture", - "permissions": [ - 429 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de traitement : ajout", + "permissions": [ + [ + "add_treatmentsource", + "archaeological_finds", + "treatmentsource" ] - } - }, - { - "pk": 84, - "model": "auth.group", - "fields": { - "name": "Documents mobilier rattach\u00e9s : modification/suppression", - "permissions": [ - 431, - 432 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de traitement : modification/suppression", + "permissions": [ + [ + "change_treatmentsource", + "archaeological_finds", + "treatmentsource" + ], + [ + "delete_treatmentsource", + "archaeological_finds", + "treatmentsource" ] - } - }, - { - "pk": 85, - "model": "auth.group", - "fields": { - "name": "Documents de traitement : lecture", - "permissions": [ - 433 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de traitement rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_treatmentsource", + "archaeological_finds", + "treatmentsource" ] - } - }, - { - "pk": 86, - "model": "auth.group", - "fields": { - "name": "Documents de traitement : ajout", - "permissions": [ - 336 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de traitement rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_treatmentsource", + "archaeological_finds", + "treatmentsource" ] - } - }, - { - "pk": 87, - "model": "auth.group", - "fields": { - "name": "Documents de traitement : modification/suppression", - "permissions": [ - 337, - 338 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de traitement rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_treatmentsource", + "archaeological_finds", + "treatmentsource" + ], + [ + "delete_own_treatmentsource", + "archaeological_finds", + "treatmentsource" ] - } - }, - { - "pk": 88, - "model": "auth.group", - "fields": { - "name": "Documents de traitement rattach\u00e9s : lecture", - "permissions": [ - 434 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de demande de traitement : lecture", + "permissions": [ + [ + "view_filetreatmentsource", + "archaeological_finds", + "treatmentfilesource" ] - } - }, - { - "pk": 89, - "model": "auth.group", - "fields": { - "name": "Documents de traitement rattach\u00e9s : ajout", - "permissions": [ - 435 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de demande de traitement : ajout", + "permissions": [ + [ + "add_treatmentfilesource", + "archaeological_finds", + "treatmentfilesource" ] - } - }, - { - "pk": 90, - "model": "auth.group", - "fields": { - "name": "Documents de traitement rattach\u00e9s : modification/suppression", - "permissions": [ - 436, - 437 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de demande de traitement : modification/suppression", + "permissions": [ + [ + "change_treatmentfilesource", + "archaeological_finds", + "treatmentfilesource" + ], + [ + "delete_treatmentfilesource", + "archaeological_finds", + "treatmentfilesource" ] - } - }, - { - "pk": 96, - "model": "auth.group", - "fields": { - "name": "Documents de demande de traitement rattach\u00e9s : lecture", - "permissions": [ - 442 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de demande de traitement rattach\u00e9s : lecture", + "permissions": [ + [ + "view_own_filetreatmentsource", + "archaeological_finds", + "treatmentfilesource" ] - } - }, - { - "pk": 97, - "model": "auth.group", - "fields": { - "name": "Documents de demande de traitement rattach\u00e9s : ajout", - "permissions": [ - 443 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de demande de traitement rattach\u00e9s : ajout", + "permissions": [ + [ + "add_own_filetreatmentsource", + "archaeological_finds", + "treatmentfilesource" ] - } - }, - { - "pk": 98, - "model": "auth.group", - "fields": { - "name": "Documents de demande de traitement rattach\u00e9s : modification/suppression", - "permissions": [ - 444, - 445 + ] + } +}, +{ + "model": "auth.group", + "fields": { + "name": "Documents de demande de traitement rattach\u00e9s : modification/suppression", + "permissions": [ + [ + "change_own_filetreatmentsource", + "archaeological_finds", + "treatmentfilesource" + ], + [ + "delete_own_filetreatmentsource", + "archaeological_finds", + "treatmentfilesource" ] - } + ] } -]
\ No newline at end of file +} +] diff --git a/install/README b/install/README deleted file mode 100644 index dc15fa147..000000000 --- a/install/README +++ /dev/null @@ -1,9 +0,0 @@ -cd /tmp -apt-get install wget -wget http://lysithea.proxience.net/ishtar-install.tar.gz - -tar xvzf ishtar-install.tar.gz -rm ishtar-install.tar.gz -cd install -export APP_NAME=myinstance && export URL=localhost \ - && export PROJECT_NAME="Project name" && bash install.sh diff --git a/install/README.md b/install/README.md new file mode 100644 index 000000000..0235c2d6e --- /dev/null +++ b/install/README.md @@ -0,0 +1,33 @@ +Follow theses instruction to install Ishtar from sources on a Debian Jessie installation. + +### Get installations scripts + +``` +apt-get install wget +cd /usr/local/src +wget https://ishtar-archeo.net/install/install-ishtar.tar.bz2 + +tar xvzf ishtar-install.tar.gz +rm ishtar-install.tar.gz +``` + +#### Install Ishtar + +``` +cd /usr/local/src/install +bash ./ishtar-install +``` + +#### Configure an Ishtar instance + +``` +cd /usr/local/src/install +bash ./ishtar-prepare-instance +``` + +#### Delete an Ishtar instance + +``` +cd /usr/local/src/install +bash ./ishtar-delete-instance +``` diff --git a/install/django.wsgi.template b/install/django.wsgi.template deleted file mode 100644 index a618f0a41..000000000 --- a/install/django.wsgi.template +++ /dev/null @@ -1,7 +0,0 @@ -import os, sys -MAIN_PATH = os.path.realpath(os.path.dirname(__file__)) + "/.." -sys.path.append(MAIN_PATH) -os.environ['DJANGO_SETTINGS_MODULE'] = '#APP_NAME#.settings' -import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler() - diff --git a/install/install-ishtar.sh b/install/install-ishtar.sh deleted file mode 100644 index 4c5995ca0..000000000 --- a/install/install-ishtar.sh +++ /dev/null @@ -1,349 +0,0 @@ -#!/bin/sh - -set -e - -command_exists() { - command -v "$@" > /dev/null 2>&1 -} - -# Check if this is a forked Linux distro -check_forked() { - # Check for lsb_release command existence, it usually exists in forked distros - if command_exists lsb_release; then - # Check if the `-u` option is supported - set +e - lsb_release -a -u > /dev/null 2>&1 - lsb_release_exit_code=$? - set -e - - # Check if the command has exited successfully, it means we're in a forked distro - if [ "$lsb_release_exit_code" = "0" ]; then - # Print info about current distro - cat <<-EOF - You're using '$lsb_dist' version '$dist_version'. -EOF - - # Get the upstream release info - lsb_dist=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'id' | cut -d ':' -f 2 | tr -d '[[:space:]]') - dist_version=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'codename' | cut -d ':' -f 2 | tr -d '[[:space:]]') - - # Print info about upstream distro - cat <<-EOF - Upstream release is '$lsb_dist' version '$dist_version'. -EOF - fi - fi -} - -do_install() { - - cat >&2 <<-'EOF' - -******************************************************************************* -++++++ Ishtar installation script ++++++ -******************************************************************************* - -EOF - - # check user - user="$(id -un 2>/dev/null || true)" - - sh_c='sh -c' - if [ "$user" != 'root' ]; then - if command_exists sudo; then - sh_c='sudo -E sh -c' - elif command_exists su; then - sh_c='su -c' - else - cat >&2 <<-'EOF' - Error: this installer needs the ability to run commands as root. - We are unable to find either "sudo" or "su" available to make this happen. -EOF - exit 1 - fi - fi - - # check distribution - lsb_dist='' - dist_version='' - if command_exists lsb_release; then - lsb_dist="$(lsb_release -si)" - fi - if [ -z "$lsb_dist" ] && [ -r /etc/lsb-release ]; then - lsb_dist="$(. /etc/lsb-release && echo "$DISTRIB_ID")" - fi - if [ -z "$lsb_dist" ] && [ -r /etc/debian_version ]; then - lsb_dist='debian' - fi - if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then - lsb_dist='fedora' - fi - if [ -z "$lsb_dist" ] && [ -r /etc/oracle-release ]; then - lsb_dist='oracleserver' - fi - if [ -z "$lsb_dist" ]; then - if [ -r /etc/centos-release ] || [ -r /etc/redhat-release ]; then - lsb_dist='centos' - fi - fi - if [ -z "$lsb_dist" ] && [ -r /etc/os-release ]; then - lsb_dist="$(. /etc/os-release && echo "$ID")" - fi - - lsb_dist="$(echo "$lsb_dist" | tr '[:upper:]' '[:lower:]')" - - case "$lsb_dist" in - - ubuntu) - if command_exists lsb_release; then - dist_version="$(lsb_release --codename | cut -f2)" - fi - if [ -z "$dist_version" ] && [ -r /etc/lsb-release ]; then - dist_version="$(. /etc/lsb-release && echo "$DISTRIB_CODENAME")" - fi - ;; - - debian) - dist_version="$(cat /etc/debian_version | sed 's/\/.*//' | sed 's/\..*//')" - case "$dist_version" in - 8) - dist_version="jessie" - ;; - 7) - dist_version="wheezy" - ;; - esac - ;; - - oracleserver) - # need to switch lsb_dist to match yum repo URL - lsb_dist="oraclelinux" - dist_version="$(rpm -q --whatprovides redhat-release --queryformat "%{VERSION}\n" | sed 's/\/.*//' | sed 's/\..*//' | sed 's/Server*//')" - ;; - - fedora|centos) - dist_version="$(rpm -q --whatprovides redhat-release --queryformat "%{VERSION}\n" | sed 's/\/.*//' | sed 's/\..*//' | sed 's/Server*//')" - ;; - - *) - if command_exists lsb_release; then - dist_version="$(lsb_release --codename | cut -f2)" - fi - if [ -z "$dist_version" ] && [ -r /etc/os-release ]; then - dist_version="$(. /etc/os-release && echo "$VERSION_ID")" - fi - ;; - - - esac - - # Check if this is a forked Linux distro - check_forked - - case "$lsb_dist" in - ubuntu|debian) - ;; - *) - cat >&2 <<-'EOF' - - Sorry. Either your platform is not easily detectable or not supported by - this installer. - -EOF - exit 1 - esac - - default_db='' - cat >&2 <<-'EOF' - -------------------------------------------------------------------------------- - A PostgreSQL database is needed to install Ishtar. If you do not plan to use - a database host on another computer you need to install PostgreSQL. - -EOF - while [ "$default_db" == '' ] - do - read -p '* Default PostgreSQL host? [localhost] ' choice - if [ "$choice" == '' ]; then - default_db='127.0.0.1' - elif [ "$choice" == 'localhost' ]; then - default_db='127.0.0.1' - else - default_db=$choice - fi - done - - webserver='' - cat >&2 <<-'EOF' - -------------------------------------------------------------------------------- - A webserver is needed to make Ishtar available to the outside. - Be carreful if another webserver is already configured, you'll have to serve - your pages on a different port. - -EOF - MSG="" - while [ "$webserver" == '' ] - do - read -p '* Which webserver do you want to use? ([nginx]/none) ' choice - case "$choice" in - nginx ) webserver="nginx";; - none ) webserver="none";; - '' ) webserver="nginx";; - esac - done - - version='' - cat >&2 <<-'EOF' - -------------------------------------------------------------------------------- - Two version are usually available for Ishtar: master/stable. Master is the - bleeding edge version and you can experience problems with this version. - Stable is the safest choice. - -EOF - while [ "$version" == '' ] - do - read -p "* Which version would you like to use? ([stable]/master) " choice - case "$choice" in - stable ) version="stable";; - master ) version="master";; - '' ) version="stable";; - esac - done - - etc_path="/etc/ishtar/"$version"/" - if [ -d "$etc_path" ]; then - echo "" - echo "ERROR: it seems that "$etc_path" already exists. If this is a remnant " - echo "of an old installation please delete this path before installing." - exit 1 - fi - - - install_path='' - cat >&2 <<-'EOF' - -------------------------------------------------------------------------------- - By default Ishtar base path is '/srv/'. With this base path Ishtar is - installed in '/srv/ishtar/choosen_version/'. - -EOF - while [ "$install_path" == '' ] - do - read -p "* Which base install path for Ishtar? [/srv/] " choice - if [ -z "$choice" ]; then - install_path='/srv/' - elif [ ! -d "$choice" ]; then - echo 'Not a valid path.' - else - install_path=$choice - fi - done - - full_install_path=$install_path'/ishtar/'$version - if [ -d "$full_install_path" ]; then - echo "" - echo "ERROR: it seems that "$full_install_path" already exists. If this is a " - echo "remnant of an old installation please delete this directory before installing." - exit 1 - fi - - echo "" - echo "*******************************************************************************" - echo "" - - # Run setup for each distro accordingly - case "$lsb_dist" in - ubuntu|debian) - if [ "$dist_version" != "wheezy" ]; then - cat >&2 <<-'EOF' - - Sorry this script cannot manage your version of Debian/Ubuntu. - -EOF - exit 1 - fi - - export DEBIAN_FRONTEND=noninteractive - ( set -x; $sh_c 'sleep 3; apt-get update' ) - if [ "$default_db" == 'localhost' ]; then - POSTGIS=postgresql-9.1-postgis - if [ "$dist_version" == "jessie" ]; then - POSTGIS=postgresql-9.4-postgis-2.1 - fi - ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS ) - fi - if ! command_exists git; then - echo "-------------------------------------------------------------------------------"; - echo "Installing git..."; - echo ""; - ( set -x; $sh_c 'sleep 3; apt-get install -y -q git' ) - fi - if ! command_exists apg; then - echo "-------------------------------------------------------------------------------"; - echo "Installing apg..."; - echo ""; - ( set -x; $sh_c 'sleep 3; apt-get install -y -q apg' ) - fi - if ! command_exists pip; then - echo "-------------------------------------------------------------------------------"; - echo "Installing pip..."; - echo ""; - ( set -x; $sh_c 'sleep 3; apt-get install -y -q python-pip' ) - fi - if [ "$webserver" == 'nginx' ]; then - echo "-------------------------------------------------------------------------------"; - echo "Installing nginx and uwsgi..."; - echo ""; - ( set -x; $sh_c 'sleep 3; apt-get install -y -q uwsgi uwsgi-plugin-python nginx' ) - fi - - echo "-------------------------------------------------------------------------------"; - echo "Installing Ishtar dependencies" - echo ""; - ( set -x; $sh_c 'sleep 3; apt-get install -y -q python python-django \ - libjs-jquery libjs-jquery-ui python-pisa python-django-registration \ - python-utidylib python-lxml python-imaging python-django-south \ - python-psycopg2 python-gdal gettext python-unicodecsv memcached \ - python-tidylib python-django-extra-views python-memcache python-dbf' ) - ;; - - esac - echo "-------------------------------------------------------------------------------"; - echo "Installing BeautifulSoup4" - echo ""; - - ( set -x; $sh_c 'pip install BeautifulSoup4==4.3.2' ) - echo "-------------------------------------------------------------------------------"; - echo "Installing django-simple-history" - echo ""; - ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@0fd9b8e9c6f36b0141367b502420efe92d4e21ce' ) - - echo "-------------------------------------------------------------------------------"; - echo "Installing Ishtar sources" - echo ""; - - mkdir -p $full_install_path - cd $full_install_path - ( set -x; git clone git://git.proxience.com/git/oook_replace.git 2> /dev/null ) - ( set -x; git clone https://gitlab.com/iggdrasil/ishtar.git 2> /dev/null ) - cd ishtar - git fetch 2> /dev/null - git checkout $version 2> /dev/null - - mkdir -p $etc_path - echo "PATH="$full_install_path > $etc_path"config" - echo "DEFAULT_DB="$default_db >> $etc_path"config" - echo "WEBSERVER="$webserver >> $etc_path"config" - echo "" - echo "*******************************************************************************"; - echo ""; - echo "Installation done. Base configuration stored in "$etc_path"config file." - echo "Next you'll have to create an instance." - echo ""; - -} - -do_install - diff --git a/install/install.sh b/install/install.sh deleted file mode 100755 index 7a9a55bd7..000000000 --- a/install/install.sh +++ /dev/null @@ -1,271 +0,0 @@ -#!/bin/bash - -###################################################################### -# Minimum configuration # -###################################################################### - -# only lower alpha-numeric char and '_' and must start with a letter -[ -z "$APP_NAME" ] && ( echo 'APP_NAME empty. Default to: "default".' ; ); -APP_NAME=${APP_NAME-default} - -[ -z $URL ] && ( echo 'URL empty. Default to: "localhost".' ; URL=localhost ; ); -URL=${URL-localhost} - -[ -z "$PROJECT_NAME" ] && ( echo 'PROJECT_NAME empty. Default to: "'$APP_NAME'".' ; ); -PROJECT_NAME=${PROJECT_NAME-$APP_NAME} - -DEFAULT_DATA='fr' # available data: 'fr' - -###################################################################### -# Advanced configuration # -###################################################################### - -# if the database is not local the database will be not automatically -# created -[ -z $DB_HOST ] && ( echo 'DB_HOST empty. Default to: "127.0.0.1".' ; ); -DB_HOST=${DB_HOST-127.0.0.1} - -# if not set automatically generated -DB_PASSWORD=${DB_PASSWORD-''} -DB_PORT='5432' -PG_VERSION=9.1 - -# ishtar git branch -[ -z "$VERSION" ] && ( echo 'VERSION empty. Default to: "stable".' ; ); -VERSION=${VERSION-stable} - -# change it for each instance on a same server -UWSGI_PORT=${UWSGI_PORT-8891} - -# webserver port - default "80" -NGINX_PORT=${NGINX_PORT-80} - -# don't forget the trailing slash -INSTALL_PREFIX=/srv/ - -# if a virtualenv is used put the full path of the python to use -PYTHON=python - -# proxy for pip -PIP_OPTIONS='' -[ -z "$http_proxy" ] || PIP_OPTIONS=' --proxy '$http_proxy; -[ -z "$HTTP_PROXY" ] || PIP_OPTIONS=' --proxy '$HTTP_PROXY; - -# default for debian -UWSGI_AVAILABLE_PATH='/etc/uwsgi/apps-available/' -UWSGI_ENABLE_PATH='/etc/uwsgi/apps-enabled/' -NGINX_AVAILABLE_PATH='/etc/nginx/sites-available/' -NGINX_ENABLE_PATH='/etc/nginx/sites-enabled/' - -# Don't edit below this line -###################################################################### - -echo "* installing dependencies" - -if [ $DB_HOST = "127.0.0.1" ]; then - apt-get -q -y install postgresql postgresql-$PG_VERSION-postgis postgresql 2> /dev/null > /dev/null -fi - -apt-get -q -y install git apg python-pip 2> /dev/null > /dev/null - -apt-get -q -y install python python-django \ - libjs-jquery libjs-jquery-ui python-pisa python-django-registration \ - python-utidylib python-lxml python-imaging python-django-south \ - python-psycopg2 python-gdal gettext python-bs4 python-tidylib \ - python-unicodecsv \ - python-django-extra-views python-memcache python-dbf 2> /dev/null > /dev/null - -apt-get -q -y install uwsgi uwsgi-plugin-python nginx memcached 2> /dev/null > /dev/null - -pip install$PIP_OPTIONS BeautifulSoup4==4.3.2 - -if [ -z "$DB_PASSWORD" ] -then - -DB_PASSWORD=`apg -a 0 -M ncl -n 6 -x 10 -m 10 |head -n 1` - -fi - -DB_NAME='ishtar'$APP_NAME -INSTALL_PATH=$INSTALL_PREFIX$DB_NAME -DATE=`date +%F` -CDIR=`pwd` -SECRET_KEY=`apg -a 0 -M ncl -n 6 -x 10 -m 40 |head -n 1` - -if [ $DB_HOST = '127.0.0.1' ] -then - -echo "* create database and user" -DB_PASSWORD=$DB_PASSWORD DB_NAME=$DB_NAME PROJECT_NAME=$PROJECT_NAME PG_VERSION=$PG_VERSION su postgres <<'EOF' -cd -if [ `psql -l | grep template_postgis | wc -l` -ne 1 ]; then - echo " * create template_postgis" - createdb template_postgis - psql -d template_postgis -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-1.5/postgis.sql 2> /dev/null > /dev/null - psql -d template_postgis -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-1.5/spatial_ref_sys.sql 2> /dev/null > /dev/null - -fi -if [ `psql -l | grep $DB_NAME | wc -l` -ne 1 ]; then - echo " * create "$DB_NAME - createuser --echo --adduser --createdb --encrypted $DB_NAME 2> /dev/null > /dev/null - psql --command "ALTER USER \""$DB_NAME"\" with password '"$DB_PASSWORD"';" 2> /dev/null > /dev/null - createdb -T template_postgis --echo --owner $DB_NAME --encoding UNICODE $DB_NAME "$PROJECT_NAME" 2> /dev/null > /dev/null - -fi -EOF - -fi - - -echo '* get sources' - -mkdir $INSTALL_PATH -mkdir $INSTALL_PATH'/conf' -cd $INSTALL_PATH - -echo ' * ishtar' -git clone https://gitlab.com/iggdrasil/ishtar.git 2> /dev/null -# echo ' * oook!' -# git clone git://git.proxience.com/git/oook_replace.git 2> /dev/null -# ln -s $INSTALL_PATH'/oook_replace/oook_replace' $INSTALL_PATH'/ishtar/' - -cd ishtar -git fetch 2> /dev/null -git checkout $VERSION 2> /dev/null - -cd django-simple-history -python setup.py install -cd .. - -cp -ra example_project $APP_NAME 2> /dev/null > /dev/null - -rm $APP_NAME/settings.py -ln -s $INSTALL_PATH"/ishtar/example_project/settings.py" $INSTALL_PATH"/ishtar/"$APP_NAME"/" - -APP_DIR=$INSTALL_PATH'/ishtar/'$APP_NAME - -echo '* load parameters' -sed -s "s|#APP_NAME#|$APP_NAME|g;\ - s|#INSTALL_PATH#|$INSTALL_PATH|g;\ - s|#DATE#|$DATE|g;\ - s|#PROJECT_NAME#|$PROJECT_NAME|g;\ - s|#DB_HOST#|$DB_HOST|g;\ - s|#DB_NAME#|$DB_NAME|g;\ - s|#DB_PORT#|$DB_PORT|g;\ - s|#APP_DIR#|$APP_DIR|g;\ - s|#SECRET_KEY#|$SECRET_KEY|g;\ - s|#DB_PASSWORD#|$DB_PASSWORD|g;\ - s|#UWSGI_PORT#|$UWSGI_PORT|g;" $CDIR'/local_settings.py.sample' > \ - $INSTALL_PATH'/conf/local_settings.py' - -ln -s $INSTALL_PATH'/conf/local_settings.py' $APP_DIR'/local_settings.py' - -# rights -mkdir -p "$APP_DIR/media/imported" -mkdir -p "$APP_DIR/media/upload" -chown -R root:www-data $APP_DIR'/media' -chmod -R g+w $APP_DIR'/media' - -# logs -mkdir -p /var/log/django/ -chown root:www-data '/var/log/django' -touch '/var/log/django/ishtar-'$APP_NAME'.log' -chown root:www-data '/var/log/django/ishtar-'$APP_NAME'.log' -chmod g+w '/var/log/django/ishtar-'$APP_NAME'.log' - -cd $APP_DIR -./manage.py collectstatic --noinput 2> /dev/null > /dev/null - -# load locale data - -cd $INSTALL_PATH'/ishtar/archaeological_context_records' -django-admin compilemessages -l fr 2> /dev/null -cd $INSTALL_PATH'/ishtar/archaeological_files' -django-admin compilemessages -l fr 2> /dev/null -cd $INSTALL_PATH'/ishtar/archaeological_finds' -django-admin compilemessages -l fr 2> /dev/null -cd $INSTALL_PATH'/ishtar/archaeological_operations' -django-admin compilemessages -l fr 2> /dev/null -cd $INSTALL_PATH'/ishtar/archaeological_warehouse' -django-admin compilemessages -l fr 2> /dev/null -cd $INSTALL_PATH'/ishtar/ishtar_common' -django-admin compilemessages -l fr 2> /dev/null - -echo "* sync database" - -cd $APP_DIR -python ./manage.py syncdb --noinput 2> /dev/null > /dev/null -python ./manage.py migrate ishtar_common 2> /dev/null > /dev/null -python ./manage.py migrate archaeological_files 0013 2> /dev/null > /dev/null -python ./manage.py migrate archaeological_operations 2> /dev/null > /dev/null -python ./manage.py migrate archaeological_files 2> /dev/null > /dev/null -python ./manage.py migrate 2> /dev/null > /dev/null - -echo "* load default data" -# data migrations have created some default data - return to a clean state -python ./manage.py flush --noinput 2> /dev/null - -python ./manage.py loaddata \ - '../fixtures/initial_data-auth-'$DEFAULT_DATA'.json' 2> /dev/null -python ./manage.py loaddata \ - '../ishtar_common/fixtures/initial_data-'$DEFAULT_DATA'.json' 2> /dev/null -python ./manage.py loaddata \ - '../ishtar_common/fixtures/initial_towns-'$DEFAULT_DATA'.json' 2> /dev/null -python ./manage.py loaddata \ - '../archaeological_operations/fixtures/initial_data-'$DEFAULT_DATA'.json' 2> /dev/null -python ./manage.py loaddata \ - '../archaeological_files/fixtures/initial_data-'$DEFAULT_DATA'.json' 2> /dev/null -python ./manage.py loaddata \ - '../archaeological_context_records/fixtures/initial_data-'$DEFAULT_DATA'.json' 2> /dev/null -python ./manage.py loaddata \ - '../archaeological_finds/fixtures/initial_data-'$DEFAULT_DATA'.json' 2> /dev/null -python ./manage.py loaddata \ - '../archaeological_warehouse/fixtures/initial_data-'$DEFAULT_DATA'.json' 2> /dev/null - -echo "* create superuser" -python ./manage.py createsuperuser - -# "de-flush" migrations -$PYTHON ./manage.py migrate --fake 2> /dev/null > /dev/null - -# add a default site -#echo '[{"pk":null, "model": "sites.site", "fields": {"domain": "'$URL'", "name": "'$PROJECT_NAME'"}}]' > \ -# /tmp/site.json -#python ./manage.py loaddata /tmp/site.json -#rm /tmp/site.json - -echo '* uwsgi configuration' - -sed -s "s|#APP_NAME#|$APP_NAME|g;\ - s|#DB_NAME#|$DB_NAME|g;\ - s|#URL#|$URL|g;\ - s|#UWSGI_PORT#|$UWSGI_PORT|g;" $CDIR'/uwsgi.ini.template' > \ - $INSTALL_PATH'/conf/uwsgi.ini' - -sed -s "s#APP_NAME#/$APP_NAME/g;" $CDIR'/django.wsgi.template' > \ - $INSTALL_PATH'/conf/'$APP_NAME'.wsgi' - -ln -s $INSTALL_PATH'/conf/uwsgi.ini' \ - $UWSGI_AVAILABLE_PATH$APP_NAME'.ini' -ln -s $UWSGI_AVAILABLE_PATH$APP_NAME'.ini' \ - $UWSGI_ENABLE_PATH$APP_NAME'.ini' - -service uwsgi restart - -echo '* nginx configuration' - - -sed -s "s|#APP_NAME#|$APP_NAME|g;\ - s|#UWSGI_PORT#|$UWSGI_PORT|g;\ - s|#DB_NAME#|$DB_NAME|g;\ - s|#DATE#|$DATE|g;\ - s|#NGINX_PORT#|$NGINX_PORT|g;\ - s|#URL#|$URL|g;" $CDIR'/nginx.conf.template' > \ - $INSTALL_PATH'/conf/nginx.conf' -ln -s $INSTALL_PATH'/conf/nginx.conf' \ - $NGINX_AVAILABLE_PATH$APP_NAME'.conf' -ln -s $NGINX_AVAILABLE_PATH$APP_NAME'.conf' \ - $NGINX_ENABLE_PATH$APP_NAME'.conf' - -service nginx restart - diff --git a/install/ishtar-delete-instance b/install/ishtar-delete-instance new file mode 100755 index 000000000..0cd004de3 --- /dev/null +++ b/install/ishtar-delete-instance @@ -0,0 +1,101 @@ +#!/bin/bash + +set -e + +cecho() { + local code="\033[" + case "$1" in + black | bk) color="${code}0;30m";; + red | r) color="${code}1;31m";; + green | g) color="${code}1;32m";; + yellow | y) color="${code}1;33m";; + blue | b) color="${code}1;34m";; + purple | p) color="${code}1;35m";; + cyan | c) color="${code}1;36m";; + gray | gr) color="${code}0;37m";; + *) local text="$1" + esac + [ -z "$text" ] && local text="$color$2${code}0m" + echo -e "$text" +} + +do_delete_instance() { + NGINX_AVAILABLE_PATH='/etc/nginx/sites-available' + NGINX_ENABLE_PATH='/etc/nginx/sites-enabled' + UWSGI_AVAILABLE_PATH='/etc/uwsgi/apps-available' + UWSGI_ENABLE_PATH='/etc/uwsgi/apps-enabled' + + if [ ! -z '$CONFIG_PATH' ]; then + CONFIG_PATH="/etc/ishtar/" + fi + + if [ ! -f $CONFIG_PATH/config ]; then + echo ""; + cecho r ""$CONFIG_PATH" is not a valid config file." + echo "Have you properly install Ishtar sources?" + echo "Run ishtar-install before this script."; + echo ""; + exit 1; + fi + + source $CONFIG_PATH/config + + INSTANCES_FILE=$CONFIG_PATH/instances + if [ ! -f $INSTANCES_FILE ]; then + echo ""; + cecho r "No instance installed. Exiting." + echo ""; + exit 1; + fi + echo "" + cecho g "*******************************************************************************" + cecho g "++++++ Ishtar instance deletion script ++++++" + cecho g "*******************************************************************************" + echo "" + cecho y "Available instances:" + echo "" + + cat $INSTANCES_FILE + + to_delete='' + echo "" + while [ "$to_delete" == '' ] + do + read -p "* Which one would you like to delete? " choice + GRP=`cat $INSTANCES_FILE | grep "^$choice$"` + if [ "$GRP" != '' ]; then + to_delete=$choice + fi + done + echo "" + cecho r "Are you really sure to delete configuration, database and media attached to the " + cecho r "instance "$to_delete"?" + echo "" + read -p "* Type DELETE if you are sure: " choice + if [ "$choice" != "DELETE" ]; then + exit 1 + fi + + sed '/'$to_delete'/d' $INSTANCES_FILE > /tmp/new_instances + mv /tmp/new_instances $INSTANCES_FILE + + INSTANCE=$to_delete + rm -rf $ISHTAR_PATH/$INSTANCE + rm -f "$NGINX_AVAILABLE_PATH/ishtar-$INSTANCE.conf" + rm -f "$NGINX_ENABLE_PATH/ishtar-$INSTANCE.conf" + rm -f "$UWSGI_AVAILABLE_PATH/ishtar-$INSTANCE.ini" + rm -f "$UWSGI_ENABLE_PATH/ishtar-$INSTANCE.ini" + + DB_NAME="ishtar-$INSTANCE" + export DB_NAME + su postgres <<'EOF' + dropdb "$DB_NAME" + dropuser "$DB_NAME" +EOF + + echo "" + cecho g $to_delete" have been completly removed" + echo "" +} + +do_delete_instance diff --git a/install/ishtar-install b/install/ishtar-install new file mode 100755 index 000000000..36b937388 --- /dev/null +++ b/install/ishtar-install @@ -0,0 +1,430 @@ +#!/bin/bash + +set -e + +cecho() { + local code="\033[" + case "$1" in + black | bk) color="${code}0;30m";; + red | r) color="${code}1;31m";; + green | g) color="${code}1;32m";; + yellow | y) color="${code}1;33m";; + blue | b) color="${code}1;34m";; + purple | p) color="${code}1;35m";; + cyan | c) color="${code}1;36m";; + gray | gr) color="${code}0;37m";; + *) local text="$1" + esac + [ -z "$text" ] && local text="$color$2${code}0m" + echo -e "$text" +} + +command_exists() { + command -v "$@" > /dev/null 2>&1 +} + +# Check if this is a forked Linux distro +check_forked() { + # Check for lsb_release command existence, it usually exists in forked distros + if command_exists lsb_release; then + # Check if the `-u` option is supported + set +e + lsb_release -a -u > /dev/null 2>&1 + lsb_release_exit_code=$? + set -e + + # Check if the command has exited successfully, it means we're in a forked distro + if [ "$lsb_release_exit_code" = "0" ]; then + # Print info about current distro + cat <<-EOF + You're using '$lsb_dist' version '$dist_version'. +EOF + + # Get the upstream release info + lsb_dist=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'id' | cut -d ':' -f 2 | tr -d '[[:space:]]') + dist_version=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'codename' | cut -d ':' -f 2 | tr -d '[[:space:]]') + + # Print info about upstream distro + cat <<-EOF + Upstream release is '$lsb_dist' version '$dist_version'. +EOF + fi + fi +} + +do_install() { + + echo "" + cecho g "*******************************************************************************" + cecho g "++++++ Ishtar installation script ++++++" + cecho g "*******************************************************************************" + echo "" + + # check user + user="$(id -un 2>/dev/null || true)" + + sh_c='sh -c' + if [ "$user" != 'root' ]; then + if command_exists sudo; then + sh_c='sudo -E sh -c' + elif command_exists su; then + sh_c='su -c' + else + cecho r " Error: this installer needs the ability to run commands as root." + cecho r " We are unable to find either "sudo" or "su" available to make this happen." + exit 1 + fi + fi + + # check distribution + lsb_dist='' + dist_version='' + backports_activated='' + if command_exists lsb_release; then + lsb_dist="$(lsb_release -si)" + fi + if [ -z "$lsb_dist" ] && [ -r /etc/lsb-release ]; then + lsb_dist="$(. /etc/lsb-release && echo "$DISTRIB_ID")" + fi + if [ -z "$lsb_dist" ] && [ -r /etc/debian_version ]; then + lsb_dist='debian' + fi + if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then + lsb_dist='fedora' + fi + if [ -z "$lsb_dist" ] && [ -r /etc/oracle-release ]; then + lsb_dist='oracleserver' + fi + if [ -z "$lsb_dist" ]; then + if [ -r /etc/centos-release ] || [ -r /etc/redhat-release ]; then + lsb_dist='centos' + fi + fi + if [ -z "$lsb_dist" ] && [ -r /etc/os-release ]; then + lsb_dist="$(. /etc/os-release && echo "$ID")" + fi + + lsb_dist="$(echo "$lsb_dist" | tr '[:upper:]' '[:lower:]')" + + case "$lsb_dist" in + + ubuntu) + if command_exists lsb_release; then + dist_version="$(lsb_release --codename | cut -f2)" + fi + if [ -z "$dist_version" ] && [ -r /etc/lsb-release ]; then + dist_version="$(. /etc/lsb-release && echo "$DISTRIB_CODENAME")" + fi + ;; + + debian) + MAINBACKS=`cat /etc/apt/sources.list | grep jessie-backports |grep -v "^#"` + ALLBACKS='' + if [ "$(ls -A /etc/apt/sources.list.d/)" ]; then + ALLBACKS=`cat /etc/apt/sources.list.d/* | grep jessie-backports |grep -v "^#"` + fi + if [ "$ALLBACKS" != '' ] || [ "$MAINBACKS" != '' ]; then + backports_activated='true'; + fi + dist_version="$(cat /etc/debian_version | sed 's/\/.*//' | sed 's/\..*//')" + case "$dist_version" in + 8) + dist_version="jessie" + ;; + 7) + dist_version="wheezy" + ;; + esac + ;; + + oracleserver) + # need to switch lsb_dist to match yum repo URL + lsb_dist="oraclelinux" + dist_version="$(rpm -q --whatprovides redhat-release --queryformat "%{VERSION}\n" | sed 's/\/.*//' | sed 's/\..*//' | sed 's/Server*//')" + ;; + + fedora|centos) + dist_version="$(rpm -q --whatprovides redhat-release --queryformat "%{VERSION}\n" | sed 's/\/.*//' | sed 's/\..*//' | sed 's/Server*//')" + ;; + + *) + if command_exists lsb_release; then + dist_version="$(lsb_release --codename | cut -f2)" + fi + if [ -z "$dist_version" ] && [ -r /etc/os-release ]; then + dist_version="$(. /etc/os-release && echo "$VERSION_ID")" + fi + ;; + + + esac + + # Check if this is a forked Linux distro + check_forked + + case "$lsb_dist" in + ubuntu|debian) + ;; + *) + echo "" + cecho r " Sorry. Either your platform is not easily detectable or not supported by" + cecho r " this installer." + echo "" + exit 1 + esac + + default_db='' + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- + A PostgreSQL database is needed to install Ishtar. If you do not plan to use + a database host on another computer you need to install PostgreSQL. + +EOF + while [ "$default_db" == '' ] + do + cecho y '* Default PostgreSQL host? [localhost] ' + read choice + if [ "$choice" == '' ]; then + default_db='127.0.0.1' + elif [ "$choice" == 'localhost' ]; then + default_db='127.0.0.1' + else + default_db=$choice + fi + done + + webserver='' + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- + A webserver is needed to make Ishtar available to the outside. + Be carreful if another webserver is already configured, you'll have to serve + your pages on a different port. + +EOF + MSG="" + while [ "$webserver" == '' ] + do + cecho y '* Which webserver do you want to use? ([nginx]/none) ' + read choice + case "$choice" in + nginx ) webserver="nginx";; + none ) webserver="none";; + '' ) webserver="nginx";; + esac + done + + version='' + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- + Two version are usually available for Ishtar: develop/master. Develop is the + bleeding edge version and you can experience problems with this version. + Master is the safest choice. + +EOF + while [ "$version" == '' ] + do + cecho y "* Which version would you like to use? ([develop]/master) " + read choice + case "$choice" in + develop ) version="develop";; + master ) version="master";; + '' ) version="develop";; + esac + done + + etc_path="/etc/ishtar/" + if [ -d "$etc_path" ]; then + echo "" + cecho r "ERROR: it seems that "$etc_path" already exists. If this is a remnant " + cecho r "of an old installation please delete this path before installing." + echo "" + exit 1 + fi + + + install_path='' + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- + By default Ishtar base path is '/srv/'. With this base path Ishtar is + installed in '/srv/ishtar/choosen_version/'. + +EOF + while [ "$install_path" == '' ] + do + cecho y "* Which base install path for Ishtar? [/srv/]" + read choice + if [ -z "$choice" ]; then + install_path='/srv' + elif [ ! -d "$choice" ]; then + echo 'Not a valid path.' + else + install_path=$choice + fi + done + + full_install_path=$install_path'/ishtar/' + if [ -d "$full_install_path" ]; then + echo "" + cecho r "ERROR: it seems that "$full_install_path" already exists. If this is a " + cecho r "remnant of an old installation please delete this directory before installing." + echo "" + exit 1 + fi + + echo "" + cecho g "*******************************************************************************" + echo "" + + # Run setup for each distro accordingly + case "$lsb_dist" in + ubuntu|debian) + if [ "$dist_version" != "jessie" ] && [ "$dist_version" != "wheezy" ]; then + echo "" + cecho r " Sorry this script cannot manage your version of Debian/Ubuntu." + echo "" + exit 1 + fi + + echo "-------------------------------------------------------------------------------"; + cecho y "Update debian packages cache"; + echo ""; + export DEBIAN_FRONTEND=noninteractive + ( set -x; $sh_c 'sleep 3; apt-get update' ) + if ! command_exists git; then + echo "-------------------------------------------------------------------------------"; + cecho y "Installing git..."; + echo ""; + ( set -x; $sh_c 'sleep 3; apt-get install -y -q git' ) + fi + if ! command_exists apg; then + echo "-------------------------------------------------------------------------------"; + cecho y "Installing apg..."; + echo ""; + ( set -x; $sh_c 'sleep 3; apt-get install -y -q apg' ) + fi + if ! command_exists pip; then + echo "-------------------------------------------------------------------------------"; + cecho y "Installing pip..."; + echo ""; + ( set -x; $sh_c 'sleep 3; apt-get install -y -q python-pip' ) + fi + if [ "$webserver" == 'nginx' ]; then + echo "-------------------------------------------------------------------------------"; + cecho y "Installing nginx and uwsgi..."; + echo ""; + ( set -x; $sh_c 'sleep 3; apt-get install -y -q uwsgi uwsgi-plugin-python nginx' ) + fi + + if [ "$dist_version" == "wheezy" ]; then + if [ "$default_db" == '127.0.0.1' ]; then + echo "-------------------------------------------------------------------------------"; + cecho y "Installing postgresql" + echo "" + POSTGIS=postgresql-9.1-postgis + ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS ) + fi + + echo "-------------------------------------------------------------------------------"; + cecho y "Installing Ishtar dependencies" + echo ""; + ( set -x; $sh_c 'sleep 3; apt-get install -y -q python python-django \ + libjs-jquery libjs-jquery-ui python-pisa python-django-registration \ + python-utidylib python-lxml python-imaging python-django-south \ + python-psycopg2 python-gdal gettext python-unicodecsv memcached \ + python-tidylib python-django-extra-views python-memcache python-dbf' ) + + echo "-------------------------------------------------------------------------------"; + cecho y "Installing BeautifulSoup4" + echo ""; + + ( set -x; $sh_c 'pip install BeautifulSoup4==4.3.2' ) + echo "-------------------------------------------------------------------------------"; + cecho y "Installing django-simple-history" + echo ""; + ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@0fd9b8e9c6f36b0141367b502420efe92d4e21ce' ) + + fi + + if [ "$dist_version" == "jessie" ]; then + if [ "$backports_activated" != 'true' ]; then + echo "" + cecho r " In order to install Ishtar you have to activate Debian backports." + echo " To do that:" + echo "" + echo " echo 'deb http://ftp.debian.org/debian jessie-backports main contrib non-free' >> /etc/apt/sources.list" + echo "" + cecho p " Run again Ishtar installation script after that." + exit 1 + fi + + if [ "$default_db" == '127.0.0.1' ]; then + echo "-------------------------------------------------------------------------------"; + cecho y "Installing postgresql" + echo "" + POSTGIS=postgresql-9.4-postgis-2.3 + ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS ) + fi + echo "-------------------------------------------------------------------------------"; + cecho y "Installing Ishtar dependencies" + echo ""; + ( set -x; $sh_c 'sleep 3; apt-get install -t jessie-backports -y -q python python-django\ + python-django-registration' ) + ( set -x; $sh_c 'sleep 3; apt-get install -y -q \ + python-pisa python-bs4 python-django-formtools\ + python-tidylib python-lxml python-imaging python-html5lib \ + python-psycopg2 python-gdal gettext python-unicodecsv memcached \ + python-django-extra-views python-memcache python-dbf python-markdown' ) + echo "-------------------------------------------------------------------------------"; + cecho y "Installing django-simple-history" + echo ""; + ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@1.8.2#egg=django-simple-history' ) + echo "-------------------------------------------------------------------------------"; + cecho y "Installing python-secretary" + echo ""; + ( set -x; $sh_c 'pip install secretary==0.2.14' ) + cecho y "Installing python-ajax-select (available version in Debian is not compatible with backported Django)" + echo ""; + ( set -x; $sh_c 'pip install django-ajax-selects==1.4.3' ) + + fi + ;; + + esac + echo "-------------------------------------------------------------------------------"; + cecho y "Installing Ishtar sources" + echo ""; + + cd $install_path + if [ "$dist_version" == "wheezy" ]; then + ( set -x; git clone https://nimn@gitlab.com/iggdrasil/oook_replace.git 2> /dev/null ) + fi + ( set -x; git clone https://gitlab.com/iggdrasil/ishtar.git 2> /dev/null ) + cd ishtar + git fetch 2> /dev/null + git checkout $version 2> /dev/null + + mkdir -p $etc_path + echo "ISHTAR_PATH="$full_install_path > $etc_path"config" + echo "ISHTAR_DB="$default_db >> $etc_path"config" + echo "ISHTAR_WEBSERVER="$webserver >> $etc_path"config" + echo "# settings added to all instances" >> $etc_path"extra_settings.py" + echo "" + cecho g "*******************************************************************************" + echo ""; + cecho g "Installation done." + cecho g "Base configuration stored in: "$etc_path"config" + echo "" + echo "You can edit "$etc_path"extra_settings.py to add Django settings to all new" + echo "instances."; + echo ""; + cecho y "Next you will have to create an instance with: ./ishtar-prepare-instance" + echo ""; + +} + +do_install + diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance new file mode 100755 index 000000000..b05d7d16d --- /dev/null +++ b/install/ishtar-prepare-instance @@ -0,0 +1,331 @@ +#!/bin/bash + +set -e + +cecho() { + local code="\033[" + case "$1" in + black | bk) color="${code}0;30m";; + red | r) color="${code}1;31m";; + green | g) color="${code}1;32m";; + yellow | y) color="${code}1;33m";; + blue | b) color="${code}1;34m";; + purple | p) color="${code}1;35m";; + cyan | c) color="${code}1;36m";; + gray | gr) color="${code}0;37m";; + *) local text="$1" + esac + [ -z "$text" ] && local text="$color$2${code}0m" + echo -e "$text" +} + +do_install_instance() { + + NGINX_PORT=${NGINX_PORT-80} + NGINX_AVAILABLE_PATH='/etc/nginx/sites-available' + NGINX_ENABLE_PATH='/etc/nginx/sites-enabled' + UWSGI_AVAILABLE_PATH='/etc/uwsgi/apps-available' + UWSGI_ENABLE_PATH='/etc/uwsgi/apps-enabled' + PG_VERSION=9.4 + POSTGIS_VERSION=2.3.1 + + echo "" + cecho g "*******************************************************************************" + cecho g "++++++ Ishtar instance preparation script ++++++" + cecho g "*******************************************************************************" + echo "" + + # check user + user="$(id -un 2>/dev/null || true)" + + sh_c='sh -c' + if [ "$user" != 'root' ]; then + if command_exists sudo; then + sh_c='sudo -E sh -c' + elif command_exists su; then + sh_c='su -c' + else + cecho r " Error: this installer needs the ability to run commands as root." + cecho r " We are unable to find either "sudo" or "su" available to make this happen." + exit 1 + fi + fi + + export LANG=fr_FR.UTF-8 + if [ "$(locale 2>&1 >/dev/null|wc -l)" != 0 ]; then + cecho r "Unable to set LANG=$LANG properly" + cecho "Try: 'dpkg-reconfigure locales' or install the 'locales-all' package" + exit 1 + fi + + if [ ! -z '$CONFIG_PATH' ]; then + CONFIG_PATH="/etc/ishtar/" + fi + + if [ ! -f $CONFIG_PATH/config ]; then + echo ""; + cecho r ""$CONFIG_PATH" is not a valid config file." + echo "Have you properly install Ishtar sources?" + echo "Run ishtar-install before this script."; + echo ""; + exit 1; + fi + + source $CONFIG_PATH/config + + cd $ISHTAR_PATH + + INSTANCES_FILE=$CONFIG_PATH/instances + + if [ ! -f $INSTANCES_FILE ]; then + touch $INSTANCES_FILE + fi + + if [ -z '$INSTANCE' ]; then + if [ -d "$INSTANCE" ]; then + cecho r "Sorry, $INSTANCE already exists." + echo "Give another code name." + exit 1 + fi + + else + INSTANCE='' + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- + You should select a code name for this instance. This code name should have + only lower alphanumeric characters, with no spaces, no accents and should not + begin with an alphabetical character. The only special character allowed is + "_". + +EOF + while [ "$INSTANCE" == '' ] + do + cecho y "* Which instance code name? [my_ishtar_instance] " + read choice + if [ -z "$choice" ]; then + INSTANCE='my_ishtar_instance' + else + INSTANCE=$choice + fi + if [ -d "$INSTANCE" ]; then + echo "Sorry, $INSTANCE already exists. Give another name." + INSTANCE='' + fi + done + fi + + if [ ! -z '$URL' ]; then + URL='' + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- + You should select an url to join your instance. Only a full domain is + accepted. Don't forget to set up your DNS to point this url name to this + server. Only put the url not the protocol part (no http://). + For instance: ishtar.mydomain.org + +EOF + while [ "$URL" == '' ] + do + cecho y "* Which url? " + read choice + URL=$choice + done + fi + + DEST=$ISHTAR_PATH + + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- +EOF + echo "Preparing ishtar instance: $INSTANCE under $DEST" + echo "" + # register instance + echo "$INSTANCE" >> $INSTANCES_FILE + + mkdir -p /var/log/django + chown root:www-data /var/log/django + touch "/var/log/django/ishtar-$INSTANCE.log" + chown root:www-data "/var/log/django/ishtar-$INSTANCE.log" + chmod g+w "/var/log/django/ishtar-$INSTANCE.log" + + + cecho y " * duplicate example_project into our instance" + # Duplicate example_project into our instance: + cd $ISHTAR_PATH + cp -ra example_project $INSTANCE + + rm $INSTANCE/settings.py + ln -s $DEST/example_project/settings.py $DEST/$INSTANCE/settings.py + rm $INSTANCE/urls.py + ln -s $DEST/example_project/urls.py $DEST/$INSTANCE/urls.py + + # Permissions: + mkdir -p -m 755 "$INSTANCE/media" + mkdir -p -m 755 "$INSTANCE/media/imported" + mkdir -p -m 755 "$INSTANCE/media/upload" + chown -R www-data:www-data "$INSTANCE/media" + + # Preparing DB: + DB_HOST=${ISHTAR_DB-127.0.0.1} + DB_PORT=${ISHTAR_DB_PORT-5432} + DB_PASSWORD=${DB_PASSWORD-''} + DB_NAME="ishtar-$INSTANCE" + + # Generate a password on the fly if none was specified: + if [ -z "$DB_PASSWORD" ]; then + DB_PASSWORD=$(apg -a 0 -M ncl -n 1 -x 10 -m 10) + fi + + export PG_VERSION DB_HOST DB_PORT DB_PASSWORD DB_NAME POSTGIS_VERSION + su postgres <<'EOF' + echo " * Checking template_postgis" + if ! psql -l | grep -qs template_postgis; then + echo " - not present, creating" + createdb -E UTF8 template_postgis + psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis'" + psql -q -d template_postgis -f /usr/share/postgresql/$PG_VERSION/extensions/postgis--$POSTGIS_VERSION.sql + psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" + psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;" + psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" + else + echo " - already present" + fi + + echo " * Checking database $DB_NAME" + if ! psql -l | grep -qs "$DB_NAME"; then + echo " - not present, creating" + createuser --echo --adduser --createdb --encrypted $DB_NAME + psql --command "ALTER USER \""$DB_NAME"\" with password '"$DB_PASSWORD"';" + createdb -T template_postgis --echo --owner $DB_NAME --encoding UNICODE $DB_NAME + psql -d $DB_NAME -c "CREATE EXTENSION postgis;" + else + echo " - already present" + fi +EOF + + ### LOCAL SETTINGS + + cecho y " * creating config files" + # Set some variables to avoid changing sed calls too much compared to + # the initial install/install.sh script: + INSTALL_PATH=$DEST + INSTALL_PREFIX=$DEST + APP_DIR="$DEST/$INSTANCE" + DATE=`date +%F` + SECRET_KEY=$(apg -a 0 -M ncl -n 1 -x 10 -m 40) + + PORT_FILE=$CONFIG_PATH/last_uswgi_port + + if [ -f $PORT_FILE ]; then + UWSGI_PORT=`cat $PORT_FILE` + UWSGI_PORT=`expr $UWSGI_PORT + 1` + else + UWSGI_PORT=8889 + fi + echo $UWSGI_PORT > $PORT_FILE + + ### local_settings.py + + sed -s "s|#APP_NAME#|$INSTANCE|g;\ + s|#INSTALL_PATH#|$INSTALL_PATH|g;\ + s|#DB_HOST#|$DB_HOST|g;\ + s|#DB_NAME#|$DB_NAME|g;\ + s|#DB_PORT#|$DB_PORT|g;\ + s|#DB_PASSWORD#|$DB_PASSWORD|g;\ + s|#URL#|$URL|g;\ + s|#APP_DIR#|$APP_DIR|g;\ + s|#SECRET_KEY#|$SECRET_KEY|g;" \ + "install/local_settings.py.sample" > \ + "$INSTANCE/local_settings.py" + + if [ -f $CONFIG_PATH"extra_settings.py" ]; then + cat $CONFIG_PATH"extra_settings.py" >> "$INSTANCE/local_settings.py" + fi + + ### UWSGI + + sed -s "s|#APP_NAME#|$INSTANCE|g;\ + s|#INSTALL_PREFIX#|$INSTALL_PREFIX|g;\ + s|#URL#|$URL|g;\ + s|#UWSGI_PORT#|$UWSGI_PORT|g;" \ + "install/uwsgi.ini.template" > \ + "$INSTANCE/uwsgi.ini" + + ln -sf "$DEST/$INSTANCE/uwsgi.ini" \ + "$UWSGI_AVAILABLE_PATH/ishtar-$INSTANCE.ini" + ln -sf "$UWSGI_AVAILABLE_PATH/ishtar-$INSTANCE.ini" \ + "$UWSGI_ENABLE_PATH/ishtar-$INSTANCE.ini" + + ### NGINX + + sed -s "s|#APP_NAME#|$INSTANCE|g;\ + s|#UWSGI_PORT#|$UWSGI_PORT|g;\ + s|#NGINX_PORT#|$NGINX_PORT|g;\ + s|#INSTALL_PATH#|$INSTALL_PATH|g;\ + s|#URL#|$URL|g;" \ + "install/nginx.conf.template" > \ + "$INSTANCE/nginx.conf" + + ln -sf "$DEST/$INSTANCE/nginx.conf" \ + "$NGINX_AVAILABLE_PATH/ishtar-$INSTANCE.conf" + ln -sf "$NGINX_AVAILABLE_PATH/ishtar-$INSTANCE.conf" \ + "$NGINX_ENABLE_PATH/ishtar-$INSTANCE.conf" + + + cecho y " * collect static data" + cd $INSTANCE + ./manage.py collectstatic --noinput > /dev/null + cd - + + # only language available + LOCALE=fr + cecho y " * compile translations" + for d in archaeological_* ishtar_common; do + cd $d + ../$INSTANCE/manage.py compilemessages -l $LOCALE + cd - + done + + ### DB feeding + cd $INSTANCE + cecho y " * db feeding" + cecho y " - migrations" + ./manage.py migrate + + cecho y " - loading fixtures" + FIXTURES="$DEST/fixtures/initial_data-auth-fr.json $DEST/ishtar_common/fixtures/initial_data-fr.json $DEST/ishtar_common/fixtures/initial_importtypes-fr.json $DEST/archaeological_operations/fixtures/initial_data-fr.json $DEST/archaeological_operations/fixtures/initial_data_relation_type_norel-fr.json $DEST/archaeological_operations/fixtures/initial_data_relation_type-fr.json $DEST/archaeological_context_records/fixtures/initial_data-fr.json $DEST/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json $DEST/archaeological_context_records/fixtures/initial_data_relation_type-fr.json $DEST/archaeological_files/fixtures/initial_data-fr.json $DEST/archaeological_finds/fixtures/initial_data-fr.json $DEST/archaeological_warehouse/fixtures/initial_data-fr.json" + for data in $FIXTURES; do + echo $data; + ./manage.py loaddata $data; + done + + cecho y " - create superuser" + ./manage.py createsuperuser + + cecho y " - post install script" + cd .. + python ./install/post_install_script.py $INSTANCE $URL + + cat >&2 <<-'EOF' + +------------------------------------------------------------------------------- +EOF + cecho g " Your instance has been configured." + echo "" + cecho g " * instance name: "$INSTANCE + cecho g " * url: http://"$URL + + cat >&2 <<-'EOF' + + You should restart uwsgi and nginx: +EOF + cecho y "systemctl restart uwsgi nginx" + echo "" + echo " And then enjoy ishtar!" + echo "" +} + +do_install_instance diff --git a/install/ishtar-update b/install/ishtar-update new file mode 100755 index 000000000..3e2797c76 --- /dev/null +++ b/install/ishtar-update @@ -0,0 +1,103 @@ +#!/bin/bash + +set -e + +cecho() { + local code="\033[" + case "$1" in + black | bk) color="${code}0;30m";; + red | r) color="${code}1;31m";; + green | g) color="${code}1;32m";; + yellow | y) color="${code}1;33m";; + blue | b) color="${code}1;34m";; + purple | p) color="${code}1;35m";; + cyan | c) color="${code}1;36m";; + gray | gr) color="${code}0;37m";; + *) local text="$1" + esac + [ -z "$text" ] && local text="$color$2${code}0m" + echo -e "$text" +} + +update_instances() { + echo "" + cecho g "*******************************************************************************" + cecho g "++++++ Ishtar instance update instances ++++++" + cecho g "*******************************************************************************" + echo "" + + # check user + user="$(id -un 2>/dev/null || true)" + + sh_c='sh -c' + if [ "$user" != 'root' ]; then + if command_exists sudo; then + sh_c='sudo -E sh -c' + elif command_exists su; then + sh_c='su -c' + else + cecho r " Error: this installer needs the ability to run commands as root." + cecho r " We are unable to find either "sudo" or "su" available to make this happen." + exit 1 + fi + fi + + if [ ! -z '$CONFIG_PATH' ]; then + CONFIG_PATH="/etc/ishtar/" + fi + + if [ ! -f $CONFIG_PATH/config ]; then + echo ""; + cecho r ""$CONFIG_PATH" is not a valid config file." + echo "Have you properly install Ishtar sources?" + echo "Run ishtar-install before this script."; + echo ""; + exit 1; + fi + + source $CONFIG_PATH/config + + cd $ISHTAR_PATH + + cecho g "Update Ishtar library from git repository" + git pull + + INSTANCES_FILE=$CONFIG_PATH/instances + instances="$( (cat $INSTANCES_FILE 2>/dev/null || true) | xargs )" + + if [ -n "$instances" ]; then + translated='' + for instance in $instances; do + + if [ "$translated" == '' ]; then + cecho g "* Compile translations" + maybe_localized=$(cd $ISHTAR_PATH; find -maxdepth 2 -name 'locale') + for candidate in $maybe_localized; do + if find $ISHTAR_PATH/$candidate -name '*.po' >/dev/null 2>&1; then + app=${candidate%%/locale} + (cd $ISHTAR_PATH/$app; python $ISHTAR_PATH/$instance/manage.py compilemessages) + fi + done + translated='true' + fi + + cd $ISHTAR_PATH/$instance + cecho g "Instance: $instance" + cecho y " * collect static" + python manage.py collectstatic --noinput 2> /dev/null + cecho y " * database migrations" + python manage.py migrate + + done + fi + echo "" + cecho g "All instances have been updated" + cat >&2 <<-'EOF' + + You should restart uwsgi and nginx: +EOF + cecho y "systemctl restart uwsgi nginx" + echo "" +} + +update_instances diff --git a/install/local_settings.py.sample b/install/local_settings.py.sample index 459828c00..dbe4e7e62 100644 --- a/install/local_settings.py.sample +++ b/install/local_settings.py.sample @@ -6,23 +6,21 @@ DEBUG_TOOLBAR = False TEMPLATE_DEBUG = DEBUG SQL_DEBUG = False -APP_NAME = u"#PROJECT_NAME#" -PROJECT_SLUG = u"#PROJECT_NAME#" +PROJECT_SLUG = "#APP_NAME#" ROOT_URLCONF = '#APP_NAME#.urls' -STATIC_URL = '/static-#DATE#/' SECRET_KEY = "#SECRET_KEY#" LOGFILE = "/var/log/django/ishtar-#APP_NAME#.log" MEDIA_ROOT = "#APP_DIR#/media/" -ODT_TEMPLATE = "#INSTALL_PATH#/ishtar/ishtar_common/static/template.odt" +ODT_TEMPLATE = "#INSTALL_PATH#/ishtar_common/static/template.odt" + +ALLOWED_HOSTS = ["#URL#"] ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) -MANAGERS = ADMINS - DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', @@ -33,11 +31,3 @@ DATABASES = { 'PASSWORD': '#DB_PASSWORD#', } } - -# choose the extensions to install -EXTRA_APPS = [ - 'archaeological_files', - 'archaeological_context_records', - 'archaeological_warehouse', - 'archaeological_finds', -] diff --git a/install/nginx.conf.template b/install/nginx.conf.template index dd236d113..15333393b 100644 --- a/install/nginx.conf.template +++ b/install/nginx.conf.template @@ -1,28 +1,18 @@ server { listen #NGINX_PORT#; server_name #URL#; - root /srv/#DB_NAME#/ishtar/; + root #INSTALL_PATH#; access_log /var/log/django/#APP_NAME#-access.log; error_log /var/log/django/#APP_NAME#-error.log; client_max_body_size 20M; - location /static-#DATE#/ { # STATIC_URL - alias /srv/#DB_NAME#/ishtar/#APP_NAME#/static/; # STATIC_ROOT + location /static/ { # STATIC_URL + alias #INSTALL_PATH#/#APP_NAME#/static/; # STATIC_ROOT expires 30d; } location /media/ { # MEDIA_URL - alias /srv/#DB_NAME#/ishtar/#APP_NAME#/media/; # MEDIA_ROOT - expires 30d; - } - - location /tinymce/ { - alias /usr/share/tinymce/www/; - expires 30d; - } - - location /javascript/ { - alias /usr/share/javascript/; + alias #INSTALL_PATH#/#APP_NAME#/media/; # MEDIA_ROOT expires 30d; } diff --git a/install/post_install_script.py b/install/post_install_script.py new file mode 100644 index 000000000..141b738d0 --- /dev/null +++ b/install/post_install_script.py @@ -0,0 +1,28 @@ +import sys +import os +import django + +sys.path.append(os.path.abspath('.')) + +app_name, url = sys.argv[1], sys.argv[2] +os.environ.setdefault("DJANGO_SETTINGS_MODULE", app_name + ".settings") +django.setup() + +from django.contrib.sites.models import Site +from ishtar_common.models import IshtarSiteProfile + +q = Site.objects.filter(domain='example.com') + +if q.count(): + site = q.get() + site.domain = url + site.name = url + site.save() + +q = IshtarSiteProfile.objects.filter(slug='default') + +if q.count(): + profile = q.get() + profile.label = app_name + profile.slug = app_name + profile.save() diff --git a/install/uninstall.sh b/install/uninstall.sh deleted file mode 100755 index 71a5dae17..000000000 --- a/install/uninstall.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# only lower alpha-numeric char and '_' and must start with a letter -[ $APP_NAME ] || ( echo 'APP_NAME empty. Default to: "default".' ; ); -APP_NAME=${APP_NAME-default} -# don't forget the trailing slash -INSTALL_PREFIX=/srv/ - -read -r -p "Are you sure to delete "$APP_NAME" app? [y/N] " response -response=${response,,} # tolower -if [[ $response =~ ^(yes|y)$ ]] -then - echo '* deleting '$APP_NAME; -else - echo "canceled"; - exit; -fi - -# default for debian -UWSGI_AVAILABLE_PATH='/etc/uwsgi/apps-available/' -UWSGI_ENABLE_PATH='/etc/uwsgi/apps-enabled/' -NGINX_AVAILABLE_PATH='/etc/nginx/sites-available/' -NGINX_ENABLE_PATH='/etc/nginx/sites-enabled/' - -DB_NAME='ishtar'$APP_NAME -INSTALL_PATH=$INSTALL_PREFIX$DB_NAME - -rm -f $UWSGI_AVAILABLE_PATH$APP_NAME'.ini' -rm -f $UWSGI_ENABLE_PATH$APP_NAME'.ini' -rm -f $NGINX_AVAILABLE_PATH$APP_NAME'.conf' -rm -f $NGINX_ENABLE_PATH$APP_NAME'.conf' - -rm -rf $INSTALL_PATH - -echo "All file cleaned." -echo "You can delete database '"$DB_NAME"' to fully clean your installation." diff --git a/install/uwsgi.ini.template b/install/uwsgi.ini.template index 7a20c058c..51a4c5b7f 100644 --- a/install/uwsgi.ini.template +++ b/install/uwsgi.ini.template @@ -2,7 +2,7 @@ # variables projectname = #APP_NAME# projectdomain = #URL# -base = /srv/#DB_NAME#/ishtar/ +base = #INSTALL_PREFIX# # config plugins = python 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..a5d9624ee 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,33 @@ 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 TargetKeyGroupAdmin(admin.ModelAdmin): + list_display = ('name', 'all_user_can_use', 'all_user_can_modify', + 'available') + search_fields = ('name',) +admin_site.register(models.TargetKeyGroup, TargetKeyGroupAdmin) class TargetKeyAdmin(admin.ModelAdmin): @@ -284,32 +307,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 +337,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 +352,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 +360,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..b88fbff2f 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, @@ -74,20 +91,20 @@ class ImportFormater(object): self.force_new = force_new self.label = label - def reinit_db_target(self, db_target, nb=0): + def reinit_db_target(self, db_target, nb=0, user=None): if not self.formater: return if type(db_target) in (list, tuple): db_target = db_target[nb] if type(self.formater) not in (list, tuple): self.formater.db_target = db_target - self.formater.init_db_target() + self.formater.init_db_target(user=user) else: for idx, formater in enumerate(self.formater): formater.db_target = db_target - formater.init_db_target() + formater.init_db_target(user=user) - def init_db_target(self): + def init_db_target(self, user=None): pass def __unicode__(self): @@ -100,7 +117,7 @@ class ImportFormater(object): return def init(self, vals, output=None, choose_default=False, - import_instance=None): + import_instance=None, user=None): try: lst = iter(self.formater) except TypeError: @@ -109,7 +126,8 @@ class ImportFormater(object): if formater: formater.check(vals, output, self.comment, choose_default=choose_default, - import_instance=import_instance) + import_instance=import_instance, + user=user) def post_process(self, obj, context, value, owner=None): raise NotImplemented() @@ -135,12 +153,39 @@ class Formater(object): return value def check(self, values, output=None, comment='', choose_default=False, - import_instance=None): + import_instance=None, user=None): return - def init_db_target(self): + def init_db_target(self, user=None): pass + def _base_target_filter(self, user=None): + # set for all users + q_or = ( + Q(associated_import__isnull=True) & + Q(associated_user__isnull=True) & + Q(associated_group__isnull=True) + ) + if hasattr(self, 'import_instance') and self.import_instance: + # set for current import + q_or = q_or | Q(associated_import=self.import_instance) + if self.import_instance.associated_group: + # set for associated group + q_or = q_or | Q( + associated_group=self.import_instance.associated_group) + if user: + # set for current user + q_or = q_or | Q(associated_user=user) + return q_or + + def get_db_target_query(self, user=None): + if not self.db_target: + return + q = self.db_target.keys.filter(is_set=True) + q_or = self._base_target_filter(user) + q = q.filter(q_or) + return q + class ChoiceChecker(object): def report_new(self, comment): @@ -290,13 +335,12 @@ class StrChoiceFormater(Formater, ChoiceChecker): self.equiv_dict[value] = v self.init_db_target() - def init_db_target(self): + def init_db_target(self, user=None): if not self.db_target: return - q = self.db_target.keys.filter(is_set=True) - if self.import_instance: - q = q.filter(Q(associated_import=self.import_instance) | - Q(associated_import__isnull=True)) + + q = self.get_db_target_query(user) + for target_key in q.all(): key = target_key.key if not self.strict: @@ -330,7 +374,10 @@ class StrChoiceFormater(Formater, ChoiceChecker): return msgstr, idx def check(self, values, output=None, comment='', choose_default=False, - import_instance=None): + import_instance=None, user=None): + self.init_db_target(user) + + """ from ishtar_common.models import TargetKey if self.db_target: q = {'target': self.db_target, @@ -343,12 +390,12 @@ 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: pass - + """ if (not output or output == 'silent') and not choose_default: return if self.many_split: @@ -384,7 +431,7 @@ class StrChoiceFormater(Formater, ChoiceChecker): if self.model and v: v = self.model.objects.get(pk=v) self.equiv_dict[value] = v - self.add_key(v, value) + self.add_key(v, value, import_instance) self.new_keys[value] = v elif self.create and res == len(self.choices): self.equiv_dict[value] = self.new(base_value) @@ -395,17 +442,17 @@ class StrChoiceFormater(Formater, ChoiceChecker): self.equiv_dict[value] = None if self.equiv_dict[value] and self.db_target: from ishtar_common.models import TargetKey - q = {'target': self.db_target, 'key': value, - 'associated_import': import_instance, - } + q = {'target': self.db_target, 'key': value} query = TargetKey.objects.filter(**q) + query = query.filter(self._base_target_filter(user)) if query.count(): target = query.all()[0] target.value = self.equiv_dict[value] target.is_set = True target.save() else: - with transaction.commit_on_success(): + q['associated_import'] = import_instance + with transaction.atomic(): q['value'] = self.equiv_dict[value] q['is_set'] = True try: @@ -415,11 +462,13 @@ class StrChoiceFormater(Formater, ChoiceChecker): if output == 'db' and self.db_target: from ishtar_common.models import TargetKey for missing in self.missings: - q = {'target': self.db_target, 'key': missing, - 'associated_import': import_instance} - if TargetKey.objects.filter(**q).count(): + q = {'target': self.db_target, 'key': missing} + query = TargetKey.objects.filter(**q) + query = query.filter(self._base_target_filter(user)) + if query.count(): continue - with transaction.commit_on_success(): + with transaction.atomic(): + q['associated_import'] = import_instance try: TargetKey.objects.create(**q) except IntegrityError: @@ -430,7 +479,7 @@ class StrChoiceFormater(Formater, ChoiceChecker): def new(self, value): return - def add_key(self, obj, value): + def add_key(self, obj, value, importer=None): return def format(self, value): @@ -460,20 +509,20 @@ class TypeFormater(StrChoiceFormater): if self.import_instance: for item in model.objects.all(): self.choices.append((item.pk, unicode(item))) - for key in item.get_keys(importer_id=import_instance.pk): + for key in item.get_keys(importer=import_instance): self.equiv_dict[key] = item def prepare(self, value): return slugify(unicode(value).strip()) - def add_key(self, obj, value): - obj.add_key(slugify(value), force=True) + def add_key(self, obj, value, importer=None): + obj.add_key(slugify(value), force=True, importer=importer) def new(self, value): 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(): @@ -538,15 +587,16 @@ class StrToBoolean(Formater, ChoiceChecker): self.strict = strict self.db_target = db_target self.missings = set() - self.init_db_target() self.match_table = {} self.new_keys = {} self.import_instance = import_instance + self.init_db_target() - def init_db_target(self): + def init_db_target(self, user=None): if not self.db_target: return - for target_key in self.db_target.keys.filter(is_set=True).all(): + q = self.get_db_target_query(user) + for target_key in q.all(): key = self.prepare(target_key.key) if key in self.dct: continue @@ -560,7 +610,7 @@ class StrToBoolean(Formater, ChoiceChecker): return value def check(self, values, output=None, comment='', choose_default=False, - import_instance=None): + import_instance=None, user=None): if (not output or output == 'silent') and not choose_default: return msgstr = comment + u" - " @@ -812,7 +862,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,16 +875,20 @@ 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): + def initialize(self, table, output='silent', choose_default=False, + user=None): """ copy vals in columns and initialize formaters * output: - - 'silent': no associations - - 'cli': output by command line interface and stocked in the database - - 'db': output on the database with no interactive association + - silent: no associations + - cli: output by command line interface and stocked in the database + - db: output on the database with no interactive association (further exploitation by web interface) + - user: associated user """ assert output in ('silent', 'cli', 'db') vals = [] @@ -859,14 +913,17 @@ class Importer(object): db_targets.append( self.DB_TARGETS["{}-{}".format( idx + 1, field_name)]) - formater.reinit_db_target(db_targets) + formater.reinit_db_target(db_targets, user=user) formater.init(vals[idx], output, choose_default=choose_default, - import_instance=self.import_instance) + import_instance=self.import_instance, + user=user) - def importation(self, table, initialize=True, choose_default=False): + def importation(self, table, initialize=True, choose_default=False, + user=None): if initialize: - self.initialize(table, self.output, choose_default=choose_default) + self.initialize(table, self.output, + choose_default=choose_default, user=user) self._importation(table) def _associate_db_target_to_formaters(self): @@ -990,6 +1047,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 +1084,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 +1153,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 +1296,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 +1544,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 +1571,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..42e390925 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -27,7 +27,7 @@ from django.contrib.auth.models import User from django.core import validators from django.core.exceptions import ObjectDoesNotExist from django.forms.formsets import formset_factory -from django.forms.models import BaseModelFormSet +from django.forms.models import BaseModelFormSet, BaseFormSet from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ @@ -103,10 +103,26 @@ class NewItemForm(forms.Form): class NewImportForm(forms.ModelForm): + error_css_class = 'error' + required_css_class = 'required' + class Meta: model = models.Import - fields = ('name', 'importer_type', 'imported_file', 'imported_images', - 'conservative_import', 'encoding', 'skip_lines') + fields = ( + 'name', 'importer_type', 'imported_file', 'imported_images', + 'associated_group', 'conservative_import', 'encoding', 'skip_lines') + + def __init__(self, *args, **kwargs): + user = kwargs.pop('user') + super(NewImportForm, self).__init__(*args, **kwargs) + groups = models.TargetKeyGroup.objects.filter(available=True) + if not user.is_superuser: + groups = groups.filter(all_user_can_use=True) + if not groups.count(): + self.fields.pop('associated_group') + else: + self.fields['associated_group'].choices = [(None, '--')] + \ + [(g.pk, unicode(g)) for g in groups.all()] def clean(self): data = self.cleaned_data @@ -131,21 +147,47 @@ class TargetKeyForm(forms.ModelForm): 'key': forms.TextInput(attrs={'readonly': 'readonly'}), 'value': forms.Select(), } + target = widgets.SelectReadonlyField( + model=models.ImportTarget, label=_(u"Target")) + remember = forms.ChoiceField(label=_(u"Remember"), choices=[], + required=False) + NULL_VALUE = '<NONE>' def __init__(self, *args, **kwargs): + self.user = kwargs.pop('user') super(TargetKeyForm, self).__init__(*args, **kwargs) instance = getattr(self, 'instance', None) self.associated_import = None if instance and instance.pk: self.associated_import = instance.associated_import - self.fields['target'].widget.attrs['readonly'] = True + self.fields['target'].choices = [(instance.target.pk, + instance.target.verbose_name)] self.fields['key'].widget.attrs['readonly'] = True self.fields['key'].widget.attrs['title'] = unicode(instance) - self.fields['value'].widget.choices = list( - instance.target.get_choices()) + self.fields['value'].widget.choices = list( + instance.target.get_choices()) + self.fields['value'].widget.choices.insert( + 1, (self.NULL_VALUE, _(u"Set to NULL"))) + self.fields['key'].required = False + self.fields['target'].required = False self.fields['value'].required = False + choices = [ + ('import', _(u"this import only")), + ('me', _(u"me")), + ] + if self.associated_import and self.associated_import.associated_group \ + and (self.associated_import.associated_group.all_user_can_modify + or self.user.is_superuser): + choices += [ + ('group', unicode(_(u"the current group: {}")).format( + self.associated_import.associated_group))] + if self.user.is_superuser: + choices += [('all', _("all users"))] + self.fields['remember'].choices = choices + self.fields['remember'].widget.attrs['class'] = 'auto' + def clean_target(self): instance = getattr(self, 'instance', None) if instance and instance.pk: @@ -162,10 +204,49 @@ class TargetKeyForm(forms.ModelForm): def save(self, commit=True): super(TargetKeyForm, self).save(commit) - if self.cleaned_data.get('value'): - self.instance.is_set = True + if not self.cleaned_data.get('value') or not self.user: + return + if self.cleaned_data['value'] == self.NULL_VALUE: + self.instance.value = None + self.instance.is_set = True + + can_edit_group = \ + self.associated_import and \ + self.associated_import.associated_group and \ + (self.associated_import.associated_group.all_user_can_modify + or self.user.is_superuser) + + remember = self.cleaned_data.get('remember') + if remember == 'import' and self.associated_import: self.instance.associated_import = self.associated_import - self.instance.save() + self.instance.associated_user = None + self.instance.associated_group = None + elif remember == 'group' and can_edit_group: + self.instance.associated_import = None + self.instance.associated_user = None + self.instance.associated_group = \ + self.associated_import.associated_group + elif remember == 'all' and self.user.is_superuser: + self.instance.associated_import = None + self.instance.associated_user = None + self.instance.associated_group = None + else: + # for me! + self.instance.associated_import = None + self.instance.associated_user = self.user.ishtaruser + self.instance.associated_group = None + self.instance.save() + + +class TargetKeyFormset(BaseModelFormSet): + def __init__(self, *args, **kwargs): + self.user = kwargs.pop('user') + super(TargetKeyFormset, self).__init__(*args, **kwargs) + + def get_form_kwargs(self, index): + kwargs = super(TargetKeyFormset, self).get_form_kwargs(index) + kwargs['user'] = self.user + return kwargs class OrganizationForm(ManageOldType, NewItemForm): @@ -585,7 +666,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 +694,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(): @@ -698,9 +779,9 @@ class MergeFormSet(BaseModelFormSet): return super(BaseModelFormSet, self)._construct_form(i, **kwargs) def get_restricted_queryset(self): - ''' + """ Filter (from, to) when (to, from) is already here - ''' + """ q = self.queryset if self._cached_list: return self._cached_list 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/management/commands/update_external_ids.py b/ishtar_common/management/commands/update_external_ids.py new file mode 100644 index 000000000..f69a865d7 --- /dev/null +++ b/ishtar_common/management/commands/update_external_ids.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys + +from django.core.management.base import BaseCommand + +from archaeological_operations.models import Parcel +from archaeological_context_records.models import ContextRecord +from archaeological_finds.models import BaseFind, Find + + +class Command(BaseCommand): + help = "./manage.py ishtar_execute_admin_tasks\n\n"\ + "Launch pending administration tasks." + + def handle(self, *args, **options): + for model in [Parcel, ContextRecord, BaseFind, Find]: + updated = 0 + print("* {}".format(model)) + total = model.objects.count() + for idx, item in enumerate(model.objects.all()): + sys.stdout.write("\r{}/{} ".format(idx, total)) + sys.stdout.flush() + updated += 1 if item.update_external_id(save=True) else 0 + print("\rupdated: {} ".format(updated)) 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/0009_auto_20170829_1651.py b/ishtar_common/migrations/0009_auto_20170829_1651.py new file mode 100644 index 000000000..58893dff9 --- /dev/null +++ b/ishtar_common/migrations/0009_auto_20170829_1651.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-29 16:51 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0008_auto_20170826_1153'), + ] + + operations = [ + migrations.AlterField( + model_name='documenttemplate', + name='template', + field=models.FileField(upload_to=b'templates/%Y/', verbose_name='Template'), + ), + migrations.AlterField( + model_name='import', + name='error_file', + field=models.FileField(blank=True, max_length=255, null=True, upload_to=b'upload/imports/%Y/%m/', verbose_name='Error file'), + ), + migrations.AlterField( + model_name='import', + name='imported_file', + field=models.FileField(max_length=220, upload_to=b'upload/imports/%Y/%m/', verbose_name='Imported file'), + ), + migrations.AlterField( + model_name='import', + name='imported_images', + field=models.FileField(blank=True, max_length=220, null=True, upload_to=b'upload/imports/%Y/%m/', verbose_name='Associated images (zip file)'), + ), + migrations.AlterField( + model_name='import', + name='match_file', + field=models.FileField(blank=True, max_length=255, null=True, upload_to=b'upload/imports/%Y/%m/', verbose_name='Match file'), + ), + migrations.AlterField( + model_name='import', + name='result_file', + field=models.FileField(blank=True, max_length=255, null=True, upload_to=b'upload/imports/%Y/%m/', verbose_name='Result file'), + ), + migrations.AlterUniqueTogether( + name='importerdefaultvalues', + unique_together=set([('default_target', 'target')]), + ), + migrations.AlterUniqueTogether( + name='importerduplicatefield', + unique_together=set([('column', 'field_name')]), + ), + ] diff --git a/ishtar_common/migrations/0010_auto_20170829_1716.py b/ishtar_common/migrations/0010_auto_20170829_1716.py new file mode 100644 index 000000000..6e7e1a50e --- /dev/null +++ b/ishtar_common/migrations/0010_auto_20170829_1716.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-29 17:16 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0009_auto_20170829_1651'), + ] + + operations = [ + migrations.CreateModel( + name='TargetKeyGroup', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.TextField(unique=True, verbose_name='Name')), + ('all_user_can_use', models.BooleanField(default=False, verbose_name='All user can user it')), + ('all_user_can_modify', models.BooleanField(default=False, verbose_name='All user can modify it')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'verbose_name': 'Importer - Target key group', + 'verbose_name_plural': 'Importer - Target key groups', + }, + ), + migrations.AddField( + model_name='import', + name='associated_group', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ishtar_common.TargetKeyGroup'), + ), + migrations.AddField( + model_name='targetkey', + name='associated_group', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ishtar_common.TargetKeyGroup'), + ), + ] diff --git a/ishtar_common/migrations/0011_auto_20170918_1913.py b/ishtar_common/migrations/0011_auto_20170918_1913.py new file mode 100644 index 000000000..30ae07fd8 --- /dev/null +++ b/ishtar_common/migrations/0011_auto_20170918_1913.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-09-18 19:13 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0010_auto_20170829_1716'), + ] + + operations = [ + migrations.AlterModelOptions( + name='targetkey', + options={'ordering': ('target', 'key'), 'verbose_name': 'Importer - Target key', 'verbose_name_plural': 'Importer - Targets keys'}, + ), + migrations.AddField( + model_name='itemkey', + name='group', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ishtar_common.TargetKeyGroup'), + ), + migrations.AddField( + model_name='itemkey', + name='user', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ishtar_common.IshtarUser'), + ), + migrations.AlterField( + model_name='import', + name='associated_group', + field=models.ForeignKey(blank=True, help_text='If a group is selected, target key saved in this group will be used.', null=True, on_delete=django.db.models.deletion.CASCADE, to='ishtar_common.TargetKeyGroup'), + ), + migrations.AlterField( + model_name='import', + name='conservative_import', + field=models.BooleanField(default=False, help_text='If set to true, do not overload existing values.', verbose_name='Conservative import'), + ), + migrations.AlterField( + model_name='import', + name='name', + field=models.CharField(max_length=500, null=True, verbose_name='Name'), + ), + migrations.AlterField( + model_name='import', + name='skip_lines', + field=models.IntegerField(default=1, help_text='Number of header lines in your file (can be 0).', verbose_name='Skip lines'), + ), + ] 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..b0b050c6c 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, TargetKeyGroup + +__all__ = [ + 'ImporterModel', 'ImporterType', 'ImporterDefault', 'ImporterDefaultValues', + 'ImporterColumn', 'ImporterDuplicateField', 'Regexp', 'ImportTarget', + 'TargetKey', 'FormaterType', 'Import', 'TargetKeyGroup' +] 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)] @@ -508,7 +522,7 @@ class GeneralType(Cached, models.Model): return u"" @classmethod - def _get_initial_types(cls, initial, type_pks): + def _get_initial_types(cls, initial, type_pks, instance=False): new_vals = [] if not initial: return [] @@ -523,7 +537,10 @@ class GeneralType(Cached, models.Model): continue try: extra_type = cls.objects.get(pk=pk) - new_vals.append((extra_type.pk, unicode(extra_type))) + if instance: + new_vals.append(extra_type) + else: + new_vals.append((extra_type.pk, unicode(extra_type))) except cls.DoesNotExist: continue return new_vals @@ -700,33 +717,43 @@ class GeneralType(Cached, models.Model): self.generate_key(force=True) return obj - def add_key(self, key, force=False, importer=None): + def add_key(self, key, force=False, importer=None, group=None, + user=None): content_type = ContentType.objects.get_for_model(self.__class__) if not importer and not force and ItemKey.objects.filter( key=key, content_type=content_type).count(): return + filtr = {'key': key, 'content_type': content_type} + if group: + filtr['group'] = group + elif user: + filtr['user'] = user + else: + filtr['importer'] = importer if force: - ItemKey.objects.filter(key=key, content_type=content_type, - importer=importer)\ - .exclude(object_id=self.pk).delete() - ItemKey.objects.get_or_create( - object_id=self.pk, key=key, content_type=content_type, - importer=importer - ) + ItemKey.objects.filter(**filtr).exclude(object_id=self.pk).delete() + filtr['object_id'] = self.pk + ItemKey.objects.get_or_create(**filtr) def generate_key(self, force=False): for key in (slugify(self.label), self.txt_idx): self.add_key(key) - def get_keys(self, importer_id=None): + def get_keys(self, importer): keys = [self.txt_idx] content_type = ContentType.objects.get_for_model(self.__class__) - query = Q(content_type=content_type, object_id=self.pk, - importer__isnull=True) - if importer_id: - query |= Q(content_type=content_type, object_id=self.pk, - importer__pk=importer_id) - q = ItemKey.objects.filter(query) + base_q = Q(content_type=content_type, object_id=self.pk) + subquery = Q(importer__isnull=True, user__isnull=True, + group__isnull=True) + subquery |= Q(user__isnull=True, group__isnull=True, + importer=importer) + if importer.user: + subquery |= Q(user=importer.user, group__isnull=True, + importer=importer) + if importer.associated_group: + subquery |= Q(user__isnull=True, group=importer.associated_group, + importer=importer) + q = ItemKey.objects.filter(base_q & subquery) for ik in q.exclude(key=self.txt_idx).all(): keys.append(ik.key) return keys @@ -738,55 +765,29 @@ 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")) + user = models.ForeignKey('IshtarUser', blank=True, null=True) + group = models.ForeignKey(TargetKeyGroup, blank=True, null=True) 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 +796,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 +847,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,8 +870,44 @@ 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): + """ + Historized item with external ID management + """ IS_BASKET = False + EXTERNAL_ID_KEY = '' + EXTERNAL_ID_DEPENDENCIES = [] history_modifier = models.ForeignKey( User, related_name='+', on_delete=models.SET_NULL, verbose_name=_(u"Last editor"), blank=True, null=True) @@ -881,12 +918,20 @@ class BaseHistorizedItem(Imported): class Meta: abstract = True - def save(self, *args, **kwargs): - assert hasattr(self, 'history_modifier') - if not self.id: - self.history_creator = self.history_modifier - super(BaseHistorizedItem, self).save(*args, **kwargs) - return True + def update_external_id(self, save=False): + if not self.EXTERNAL_ID_KEY or ( + self.external_id and not self.auto_external_id): + return + external_id = get_external_id(self.EXTERNAL_ID_KEY, self) + if external_id == self.external_id: + return + self.auto_external_id = True + self.external_id = external_id + self._cached_label_checked = False + if save: + self.skip_history_when_saving = True + self.save() + return external_id def get_previous(self, step=None, date=None, strict=True): """ @@ -916,8 +961,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 +986,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): @@ -1016,16 +1061,37 @@ class BaseHistorizedItem(Imported): items.append('00000000') return u"-".join([unicode(item) for item in items]) + def save(self, *args, **kwargs): + created = not self.pk + if not getattr(self, 'skip_history_when_saving', False): + assert hasattr(self, 'history_modifier') + if created: + self.history_creator = self.history_modifier + # external ID can have related item not available before save + external_id_updated = kwargs.pop('external_id_updated') \ + if 'external_id_updated' in kwargs else False + if not created and not external_id_updated: + self.update_external_id() + super(BaseHistorizedItem, self).save(*args, **kwargs) + if created and self.update_external_id(): + # force resave for external ID creation + self.skip_history_when_saving = True + self._updated_id = True + return self.save(external_id_updated=True) + for dep in self.EXTERNAL_ID_DEPENDENCIES: + for obj in getattr(self, dep).all(): + obj.update_external_id(save=True) + return True + class GeneralRelationType(GeneralType): order = models.IntegerField(_(u"Order"), default=1) 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 +1229,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 +1248,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 +1266,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 +1463,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 +1474,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 +1622,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 +1639,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 +1663,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 +1826,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 +1905,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 +1926,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 +1966,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 +2041,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 +2133,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 +2214,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 +2231,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 +2242,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 +2268,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 +2279,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 +2344,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 +2406,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 +2427,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 +2434,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)) @@ -3126,7 +2521,8 @@ class OperationType(GeneralType): items = items.exclude(txt_idx__in=exclude) current_preventive, current_lst = None, None item_list = list(items.order_by(*cls._meta.ordering).all()) - new_vals = cls._get_initial_types(initial, [i.pk for i in item_list]) + new_vals = cls._get_initial_types(initial, [i.pk for i in item_list], + instance=True) item_list += new_vals for item in item_list: if not current_lst or item.preventive != current_preventive: @@ -3156,7 +2552,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..d82d0580f --- /dev/null +++ b/ishtar_common/models_imports.py @@ -0,0 +1,950 @@ +#!/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.functional import cached_property +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 + """ + fields = {} + for field in model._meta.get_fields(): + fields[field.name] = field + 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 + + @cached_property + def verbose_name(self): + if not self.column.description: + return self.target[:50] + desc = self.column.description + desc = desc[0].lower() + desc[1:] + return u"{} - {}".format(self.target[:50], desc) + + 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 TargetKeyGroup(models.Model): + """ + Group of target keys for imports. + """ + name = models.TextField(_(u"Name"), unique=True) + all_user_can_use = models.BooleanField(_(u"All user can user it"), + default=False) + all_user_can_modify = models.BooleanField(_(u"All user can modify it"), + default=False) + available = models.BooleanField(_(u"Available"), default=True) + + class Meta: + verbose_name = _(u"Importer - Target key group") + verbose_name_plural = _(u"Importer - Target key groups") + + def __unicode__(self): + return self.name + + +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 one particular + import (associated_import), one particular user (associated_user), + one particular group (associated_group) or to all imports + (associated_import, associated_user and associated_group 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) + associated_group = models.ForeignKey(TargetKeyGroup, 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") + ordering = ('target', 'key') + + 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: + keys = {} + if self.associated_group: + keys['group'] = self.associated_group + if self.associated_user: + keys['user'] = self.associated_user + else: + keys['importer'] = self.associated_import + v.add_key(self.key, **keys) + 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 + 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, 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) + associated_group = models.ForeignKey( + TargetKeyGroup, blank=True, null=True, + help_text=_(u"If a group is selected, target key saved in this group " + u"will be used.") + ) + encoding = models.CharField(_(u"Encoding"), choices=ENCODINGS, + default=u'utf-8', max_length=15) + skip_lines = models.IntegerField( + _(u"Skip lines"), default=1, + help_text=_(u"Number of header lines in your file (can be 0).")) + 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=_(u'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, user=None): + self.state = 'AP' + self.save() + self.get_importer_instance().initialize(self.data_table, + user=user, 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, user=self.user) + # 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/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/static/media/style.css b/ishtar_common/static/media/style.css index 468b6557e..4f0330502 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -217,6 +217,10 @@ select{ width:370px; } +.form select.auto{ + width: auto; +} + /*label{display:block}*/ label:first-letter { @@ -858,6 +862,11 @@ ul.form-flex li li label { text-align:left; } +.helptext{ + font-style: italic; + font-size: 0.9em; +} + .help_text{ display:none; font-size:0.9em; 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/blocks/readonly_input.html b/ishtar_common/templates/blocks/readonly_input.html new file mode 100644 index 000000000..41a0c1305 --- /dev/null +++ b/ishtar_common/templates/blocks/readonly_input.html @@ -0,0 +1,2 @@ +{% for group_name, group_choices, group_index in widget.optgroups %}{% for option in group_choices %} + {% include option.template_name with widget=option %}{% endfor %}{% endfor %} diff --git a/ishtar_common/templates/blocks/readonly_input_option.html b/ishtar_common/templates/blocks/readonly_input_option.html new file mode 100644 index 000000000..b4ac473f0 --- /dev/null +++ b/ishtar_common/templates/blocks/readonly_input_option.html @@ -0,0 +1 @@ +{% if widget.attrs.selected %}<input type="hidden" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value.0 }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />{% endif %} 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/form.html b/ishtar_common/templates/ishtar/form.html index 539bd0408..236818c66 100644 --- a/ishtar_common/templates/ishtar/form.html +++ b/ishtar_common/templates/ishtar/form.html @@ -5,6 +5,9 @@ <div class='form'> <form enctype="multipart/form-data" action="." method="post"{% if confirm %} onsubmit='return confirm("{{confirm}}");'{% endif %}>{% csrf_token %} + {% for error in form.non_field_errors %} + <p>{{ error }}</p> + {% endfor %} <table> {{form}} </table> diff --git a/ishtar_common/templates/ishtar/formset_import_match.html b/ishtar_common/templates/ishtar/formset_import_match.html new file mode 100644 index 000000000..f37938771 --- /dev/null +++ b/ishtar_common/templates/ishtar/formset_import_match.html @@ -0,0 +1,55 @@ +{% extends "base.html" %} +{% load i18n %} +{% block content %} +<h2>{{page_name}}</h2> +<p><a href="{% url 'current_imports' %}">{% trans "Back to import list" %}</a></p> +<div class='form' id='global-vars'> +<form action="." method="post">{% csrf_token %} + + {% if extra_formset.non_form_errors %} + <div class='errors'>{{extra_formset.non_form_errors.as_ul}}</div>{% endif %} + + {{ formset.management_form }} + {% for hidden in frm.hidden_fields %} {{ hidden }} {% endfor %} + + <div id="{{formset.prefix}}"> + {% for frm in formset %}{% ifchanged frm.target.value %} + {# <table> #}{% if not forloop.first%}</table>{% endif %} + <table class='clean-table'> + <caption>{{ frm.target.field.choices.0.1 }}</caption> + <tr> + <th>{% trans "Key" %}</th> + <th>{% trans "Value" %}</th> + <th>{% trans "For" %}</th> + </tr> + {% endifchanged %} + <tr> + <td> + {{frm.id}} + {{frm.target}} + {{frm.key}} + </td> + <td> + {{frm.value}} + </td> + <td> + {{frm.remember}} + </td> + </tr> + {% if forloop.last %} + </table>{% endif %} + {% endfor %} + + {% if frm.errors %}<ul>{% for error in frm.errors.values %} + <li>{{error}}</li>{% endfor%}</ul>{% endif %} + {% for field in frm %} + {{field}} + {%endfor%} + + </div> + +<input type="submit" value="{% trans 'Validate' %}"/> +</form> +</div> +<p><a href="{% url 'current_imports' %}">{% trans "Back to import list" %}</a></p> +{% endblock %} 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..ad83b4a87 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): @@ -119,7 +95,8 @@ class CommandsTestCase(TestCase): """ from archaeological_operations.models import Parcel p = Parcel.objects.create( - town=models.Town.objects.create(name='test', numero_insee='25000')) + town=models.Town.objects.create(name='test', numero_insee='25000'), + ) parcel_nb = Parcel.objects.count() out = StringIO() call_command('clean_ishtar', stdout=out) @@ -132,7 +109,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 +136,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 +148,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 +163,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 +174,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 +263,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 +327,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 +349,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 +369,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 +732,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 +864,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 +993,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 +1011,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 +1065,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 234dcd826..997acd7df 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): @@ -582,7 +587,24 @@ def format_val(val): HIERARCHIC_LEVELS = 5 HIERARCHIC_FIELDS = ['periods', 'period', 'unit', 'material_types', - 'material_type', 'conservatory_state'] + 'material_type', 'conservatory_state', 'object_types'] + + +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=[], @@ -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,9 @@ 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 +689,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 +706,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: @@ -711,6 +734,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[], q = Q(**{req_key: val}) reqs |= q and_reqs.append(reqs) + pinned_search = "" if 'submited' not in request_items and full != 'shortcut': # default search @@ -730,7 +754,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 +880,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 +1035,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 +1127,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 +1170,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 +1190,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 +1210,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 +1247,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 +1260,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 +1269,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 +1301,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 +1309,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 +1324,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 +1336,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 +1348,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 +1367,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 +1389,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 +1411,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 +1443,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 +1463,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 +1478,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 +1543,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 +1595,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 @@ -1659,6 +1665,11 @@ class NewImportView(IshtarMixin, LoginRequiredMixin, CreateView): def get_success_url(self): return reverse('current_imports') + def get_form_kwargs(self): + kwargs = super(NewImportView, self).get_form_kwargs() + kwargs['user'] = self.request.user + return kwargs + def form_valid(self, form): user = models.IshtarUser.objects.get(pk=self.request.user.pk) self.object = form.save(user=user) @@ -1698,7 +1709,7 @@ class ImportListView(IshtarMixin, LoginRequiredMixin, ListView): return HttpResponseRedirect(reverse('import_delete', kwargs={'pk': imprt.pk})) elif action == 'A': - imprt.initialize() + imprt.initialize(user=self.request.user.ishtaruser) elif action == 'I': imprt.importation() elif action == 'AC': @@ -1719,18 +1730,24 @@ class ImportOldListView(ImportListView): class ImportLinkView(IshtarMixin, LoginRequiredMixin, ModelFormSetView): - template_name = 'ishtar/formset.html' + template_name = 'ishtar/formset_import_match.html' model = models.TargetKey page_name = _(u"Link unmatched items") extra = 0 form_class = forms.TargetKeyForm + formset_class = forms.TargetKeyFormset + + def get_formset_kwargs(self): + kwargs = super(ImportLinkView, self).get_formset_kwargs() + kwargs['user'] = self.request.user + return kwargs def get_queryset(self): return self.model.objects.filter( is_set=False, associated_import=self.kwargs['pk']) def get_success_url(self): - return reverse('current_imports') + return reverse('import_link_unmatched', args=[self.kwargs['pk']]) class ImportDeleteView(IshtarMixin, LoginRequiredMixin, DeleteView): diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 42a93ddaa..4efb4c3fb 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 @@ -44,6 +45,61 @@ logger = logging.getLogger(__name__) reverse_lazy = lazy(reverse, unicode) +class SelectReadonly(forms.Select): + template_name = 'blocks/readonly_input.html' + option_template_name = 'blocks/readonly_input_option.html' + + def __init__(self, attrs=None, choices=(), model=None, available=None): + super(SelectReadonly, self).__init__(attrs, choices) + self.available = available + self.model = model + + def get_choices(self, value): + q = self.model.objects + if self.available: + q = q.filter(available=True) + if value: + q = q.filter(pk=value) + for i in q.all(): + if hasattr(self.model, 'verbose_name'): + label = i.verbose_name + else: + label = unicode(i) + yield (i.pk, label) + + def render(self, name, value, attrs=None, choices=()): + if value: + self.choices = list(self.get_choices(value)) + value = self.choices[0][0] + return super(SelectReadonly, self).render(name, value, attrs) + + +class SelectReadonlyField(forms.ChoiceField): + def __init__(self, choices=(), required=True, widget=None, label=None, + initial=None, help_text='', *args, **kwargs): + self.available = False + self.model = None + if 'model' in kwargs: + self.model = kwargs.pop('model') + if 'available' in kwargs: + self.available = kwargs.pop('available') + widget = SelectReadonly(model=self.model, available=self.available) + super(SelectReadonlyField, self).__init__( + choices, required, widget, label, initial, help_text, *args, + **kwargs) + + def get_q(self): + q = self.model.objects + if self.available: + q = q.filter(available=True) + return q + + def valid_value(self, value): + if not self.model: + return super(SelectReadonlyField, self).valid_value(value) + return bool(self.get_q().filter(pk=value).count()) + + class Select2Multiple(forms.SelectMultiple): def __init__(self, attrs=None, choices=(), remote=None, model=None, available=None): @@ -80,8 +136,11 @@ class Select2Multiple(forms.SelectMultiple): if self.remote in ('None', 'false'): # test on lazy object is buggy... so we have this ugly test self.remote = None - if not choices and not self.remote and self.model: - choices = self.get_choices() + if not choices: + if not self.remote and self.model: + choices = self.get_choices() + if hasattr(self, 'choices') and self.choices: + choices = self.choices new_attrs = self.attrs.copy() new_attrs.update(attrs) attrs = new_attrs @@ -134,8 +193,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 +214,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 +249,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 +264,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 +290,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 +325,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 +376,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 +489,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 +548,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 +601,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 +647,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 +753,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 +804,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): diff --git a/old/__init__.py b/old/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/old/__init__.py diff --git a/ishtar_common/ooo_replace.py b/old/ooo_replace.py index 18c4e1878..cff5c2acc 100644 --- a/ishtar_common/ooo_replace.py +++ b/old/ooo_replace.py @@ -21,7 +21,7 @@ import locale import re from zipfile import ZipFile, ZIP_DEFLATED from cStringIO import StringIO -from xml.etree.cElementTree import ElementTree, fromstring +from xml.etree.cElementTree import ElementTree, fromstring, register_namespace from django.conf import settings from ooo_translation import ooo_translation @@ -38,7 +38,36 @@ def translate_context(context, locale): new_context[new_key] = context[k] return new_context -OOO_NS = "{urn:oasis:names:tc:opendocument:xmlns:text:1.0}" +OOO_MAIN_NS = "{urn:oasis:names:tc:opendocument:xmlns:text:1.0}" + +OOO_NS = { + "office": "urn:oasis:names:tc:opendocument:xmlns:office:1.0", + "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0", + "text": "urn:oasis:names:tc:opendocument:xmlns:text:1.0", + "table": "urn:oasis:names:tc:opendocument:xmlns:table:1.0", + "draw": "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0", + "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0", + "xlink": "http://www.w3.org/1999/xlink", + "dc": "http://purl.org/dc/elements/1.1/", + "meta": "urn:oasis:names:tc:opendocument:xmlns:meta:1.0", + "number": "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0", + "svg": "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0", + "chart": "urn:oasis:names:tc:opendocument:xmlns:chart:1.0", + "dr3d": "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0", + "math": "http://www.w3.org/1998/Math/MathML", + "form": "urn:oasis:names:tc:opendocument:xmlns:form:1.0", + "script": "urn:oasis:names:tc:opendocument:xmlns:script:1.0", + "ooo": "http://openoffice.org/2004/office", + "ooow": "http://openoffice.org/2004/writer", + "oooc": "http://openoffice.org/2004/calc", + "dom": "http://www.w3.org/2001/xml-events", + "rpt": "http://openoffice.org/2005/report", + "of": "urn:oasis:names:tc:opendocument:xmlns:of:1.2", + "xhtml": "http://www.w3.org/1999/xhtml", + "grddl": "http://www.w3.org/2003/g/data-view#", + "tableooo": "http://openoffice.org/2009/table", + "css3t": "http://www.w3.org/TR/css3-text/", +} def _set_value_from_formula(value, context, default_value): @@ -159,8 +188,8 @@ 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") + for p in content.findall(".//" + OOO_MAIN_NS + xp): + name = p.get(OOO_MAIN_NS + "name") if name in context: value = context[name] p.text = _format_value(value, default_value) @@ -168,11 +197,11 @@ def _ooo_replace(content, context, missing_keys, default_value=''): 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") + for p in content.findall(".//" + OOO_MAIN_NS + "conditional-text"): + condition = p.get(OOO_MAIN_NS + "condition") res = 'true' if _parse_condition(condition, context, default_value) \ else 'false' - value = p.get(OOO_NS + 'string-value-if-' + res) + value = p.get(OOO_MAIN_NS + 'string-value-if-' + res) value = _format_value(value, default_value) if value.strip() in context: value = context[value.strip()] @@ -192,6 +221,8 @@ def ooo_replace(infile, outfile, context, default_value=''): values = {} missing_keys = set() + for k in OOO_NS: + register_namespace(k, OOO_NS[k]) for xml_file in ('content.xml', 'styles.xml'): content = ElementTree(fromstring(inzip.read(xml_file))) values[xml_file] = _ooo_replace(content, context, missing_keys, diff --git a/ishtar_common/ooo_translation.py b/old/ooo_translation.py index 5a3d4cb84..5a3d4cb84 100644 --- a/ishtar_common/ooo_translation.py +++ b/old/ooo_translation.py diff --git a/requirements.txt b/requirements.txt index eae7f38a2..2b41343a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,26 @@ -psycopg2==2.4.5 -django-registration==0.8 -django==1.4 -south>=0.7.3,<0.7.99 -Pillow>=1.1.6 +psycopg2==2.5.4 +django-registration==2.2 +django==1.11 +Pillow==3.4.2 pisa==3.0.33 -reportlab==2.5 -dbf==0.88.16 -python-memcached==1.48 -unicodecsv==0.9.0 +reportlab==3.1.8 +dbf==0.96.003 +python-memcached==1.57 +unicodecsv==0.14.1 pytidylib==0.2.1 -lxml>=3.3.1 +lxml==3.4.0 html5lib==0.999 django-extra-views==0.2.4 beautifulsoup4==4.3.2 -markdown==2.1.1 +markdown==2.5.1 +django-ajax-selects==1.6.0 + +django-formtools==2.0 + +secretary==0.2.14 + +-e git+https://github.com/treyhunner/django-simple-history.git@1.8.2#egg=django-simple-history + +django-extensions==1.7.4 diff --git a/scripts/migrate_from_v1_to_v2.sql b/scripts/migrate_from_v1_to_v2.sql new file mode 100644 index 000000000..7d40e5c54 --- /dev/null +++ b/scripts/migrate_from_v1_to_v2.sql @@ -0,0 +1,2 @@ +ALTER TABLE auth_user ALTER last_login DROP NOT NULL; +ALTER TABLE django_content_type DROP COLUMN name; diff --git a/simple_history b/simple_history deleted file mode 120000 index 2f560733b..000000000 --- a/simple_history +++ /dev/null @@ -1 +0,0 @@ -django-simple-history/simple_history/
\ No newline at end of file diff --git a/static/gis/js/OLMapWidget.js b/static/gis/js/OLMapWidget.js new file mode 100644 index 000000000..c101c65fc --- /dev/null +++ b/static/gis/js/OLMapWidget.js @@ -0,0 +1,376 @@ +(function() { +/** + * Transforms an array of features to a single feature with the merged + * geometry of geom_type + */ +OpenLayers.Util.properFeatures = function(features, geom_type) { + if (features.constructor == Array) { + var geoms = []; + for (var i=0; i<features.length; i++) { + geoms.push(features[i].geometry); + } + var geom = new geom_type(geoms); + features = new OpenLayers.Feature.Vector(geom); + } + return features; +} + +/** + * @requires OpenLayers/Format/WKT.js + */ + +/** + * Class: OpenLayers.Format.DjangoWKT + * Class for reading Well-Known Text, with workarounds to successfully parse + * geometries and collections as returned by django.contrib.gis.geos. + * + * Inherits from: + * - <OpenLayers.Format.WKT> + */ + +OpenLayers.Format.DjangoWKT = OpenLayers.Class(OpenLayers.Format.WKT, { + initialize: function(options) { + OpenLayers.Format.WKT.prototype.initialize.apply(this, [options]); + this.regExes.justComma = /\s*,\s*/; + }, + + parse: { + 'point': function(str) { + var coords = OpenLayers.String.trim(str).split(this.regExes.spaces); + return new OpenLayers.Feature.Vector( + new OpenLayers.Geometry.Point(coords[0], coords[1]) + ); + }, + + 'multipoint': function(str) { + var point; + var points = OpenLayers.String.trim(str).split(this.regExes.justComma); + var components = []; + for(var i=0, len=points.length; i<len; ++i) { + point = points[i].replace(this.regExes.trimParens, '$1'); + components.push(this.parse.point.apply(this, [point]).geometry); + } + return new OpenLayers.Feature.Vector( + new OpenLayers.Geometry.MultiPoint(components) + ); + }, + + 'linestring': function(str) { + var points = OpenLayers.String.trim(str).split(','); + var components = []; + for(var i=0, len=points.length; i<len; ++i) { + components.push(this.parse.point.apply(this, [points[i]]).geometry); + } + return new OpenLayers.Feature.Vector( + new OpenLayers.Geometry.LineString(components) + ); + }, + + 'multilinestring': function(str) { + var line; + var lines = OpenLayers.String.trim(str).split(this.regExes.parenComma); + var components = []; + for(var i=0, len=lines.length; i<len; ++i) { + line = lines[i].replace(this.regExes.trimParens, '$1'); + components.push(this.parse.linestring.apply(this, [line]).geometry); + } + return new OpenLayers.Feature.Vector( + new OpenLayers.Geometry.MultiLineString(components) + ); + }, + + 'polygon': function(str) { + var ring, linestring, linearring; + var rings = OpenLayers.String.trim(str).split(this.regExes.parenComma); + var components = []; + for(var i=0, len=rings.length; i<len; ++i) { + ring = rings[i].replace(this.regExes.trimParens, '$1'); + linestring = this.parse.linestring.apply(this, [ring]).geometry; + linearring = new OpenLayers.Geometry.LinearRing(linestring.components); + components.push(linearring); + } + return new OpenLayers.Feature.Vector( + new OpenLayers.Geometry.Polygon(components) + ); + }, + + 'multipolygon': function(str) { + var polygon; + var polygons = OpenLayers.String.trim(str).split(this.regExes.doubleParenComma); + var components = []; + for(var i=0, len=polygons.length; i<len; ++i) { + polygon = polygons[i].replace(this.regExes.trimParens, '$1'); + components.push(this.parse.polygon.apply(this, [polygon]).geometry); + } + return new OpenLayers.Feature.Vector( + new OpenLayers.Geometry.MultiPolygon(components) + ); + }, + + 'geometrycollection': function(str) { + // separate components of the collection with | + str = str.replace(/,\s*([A-Za-z])/g, '|$1'); + var wktArray = OpenLayers.String.trim(str).split('|'); + var components = []; + for(var i=0, len=wktArray.length; i<len; ++i) { + components.push(OpenLayers.Format.WKT.prototype.read.apply(this,[wktArray[i]])); + } + return components; + } + }, + + extractGeometry: function(geometry) { + var type = geometry.CLASS_NAME.split('.')[2].toLowerCase(); + if (!this.extract[type]) { + return null; + } + if (this.internalProjection && this.externalProjection) { + geometry = geometry.clone(); + geometry.transform(this.internalProjection, this.externalProjection); + } + var wktType = type == 'collection' ? 'GEOMETRYCOLLECTION' : type.toUpperCase(); + var data = wktType + '(' + this.extract[type].apply(this, [geometry]) + ')'; + return data; + }, + + /** + * Patched write: successfully writes WKT for geometries and + * geometrycollections. + */ + write: function(features) { + var collection, geometry, type, data, isCollection; + isCollection = features.geometry.CLASS_NAME == "OpenLayers.Geometry.Collection"; + var pieces = []; + if (isCollection) { + collection = features.geometry.components; + pieces.push('GEOMETRYCOLLECTION('); + for (var i=0, len=collection.length; i<len; ++i) { + if (i>0) { + pieces.push(','); + } + pieces.push(this.extractGeometry(collection[i])); + } + pieces.push(')'); + } else { + pieces.push(this.extractGeometry(features.geometry)); + } + return pieces.join(''); + }, + + CLASS_NAME: "OpenLayers.Format.DjangoWKT" +}); + +function MapWidget(options) { + this.map = null; + this.controls = null; + this.panel = null; + this.layers = {}; + this.wkt_f = new OpenLayers.Format.DjangoWKT(); + + // Mapping from OGRGeomType name to OpenLayers.Geometry name + if (options['geom_name'] == 'Unknown') options['geom_type'] = OpenLayers.Geometry; + else if (options['geom_name'] == 'GeometryCollection') options['geom_type'] = OpenLayers.Geometry.Collection; + else options['geom_type'] = eval('OpenLayers.Geometry.' + options['geom_name']); + + // Default options + this.options = { + color: 'ee9900', + default_lat: 0, + default_lon: 0, + default_zoom: 4, + is_collection: options.geom_name.indexOf('Multi') > -1 || options.geom_name.indexOf('Collection') > -1, + layerswitcher: false, + map_options: {}, + map_srid: 4326, + modifiable: true, + mouse_position: false, + opacity: 0.4, + point_zoom: 12, + scale_text: false, + scrollable: true + }; + + // Altering using user-provided options + for (var property in options) { + if (options.hasOwnProperty(property)) { + this.options[property] = options[property]; + } + } + + this.map = this.create_map(); + + var defaults_style = { + 'fillColor': '#' + this.options.color, + 'fillOpacity': this.options.opacity, + 'strokeColor': '#' + this.options.color + }; + if (this.options.geom_name == 'LineString') { + defaults_style['strokeWidth'] = 3; + } + var styleMap = new OpenLayers.StyleMap({'default': OpenLayers.Util.applyDefaults(defaults_style, OpenLayers.Feature.Vector.style['default'])}); + this.layers.vector = new OpenLayers.Layer.Vector(" " + this.options.name, {styleMap: styleMap}); + this.map.addLayer(this.layers.vector); + var wkt = document.getElementById(this.options.id).value; + if (wkt) { + var feat = OpenLayers.Util.properFeatures(this.read_wkt(wkt), this.options.geom_type); + this.write_wkt(feat); + if (this.options.is_collection) { + for (var i=0; i<this.num_geom; i++) { + this.layers.vector.addFeatures([new OpenLayers.Feature.Vector(feat.geometry.components[i].clone())]); + } + } else { + this.layers.vector.addFeatures([feat]); + } + this.map.zoomToExtent(feat.geometry.getBounds()); + if (this.options.geom_name == 'Point') { + this.map.zoomTo(this.options.point_zoom); + } + } else { + this.map.setCenter(this.defaultCenter(), this.options.default_zoom); + } + this.layers.vector.events.on({'featuremodified': this.modify_wkt, scope: this}); + this.layers.vector.events.on({'featureadded': this.add_wkt, scope: this}); + + this.getControls(this.layers.vector); + this.panel.addControls(this.controls); + this.map.addControl(this.panel); + this.addSelectControl(); + + if (this.options.mouse_position) { + this.map.addControl(new OpenLayers.Control.MousePosition()); + } + if (this.options.scale_text) { + this.map.addControl(new OpenLayers.Control.Scale()); + } + if (this.options.layerswitcher) { + this.map.addControl(new OpenLayers.Control.LayerSwitcher()); + } + if (!this.options.scrollable) { + this.map.getControlsByClass('OpenLayers.Control.Navigation')[0].disableZoomWheel(); + } + if (wkt) { + if (this.options.modifiable) { + this.enableEditing(); + } + } else { + this.enableDrawing(); + } +} + +MapWidget.prototype.create_map = function() { + var map = new OpenLayers.Map(this.options.map_id, this.options.map_options); + if (this.options.base_layer) this.layers.base = this.options.base_layer; + else this.layers.base = new OpenLayers.Layer.WMS('OpenLayers WMS', 'http://vmap0.tiles.osgeo.org/wms/vmap0', {layers: 'basic'}); + map.addLayer(this.layers.base); + return map +}; + +MapWidget.prototype.get_ewkt = function(feat) { + return "SRID=" + this.options.map_srid + ";" + this.wkt_f.write(feat); +}; + +MapWidget.prototype.read_wkt = function(wkt) { + var prefix = 'SRID=' + this.options.map_srid + ';' + if (wkt.indexOf(prefix) === 0) { + wkt = wkt.slice(prefix.length); + } + return this.wkt_f.read(wkt); +}; + +MapWidget.prototype.write_wkt = function(feat) { + feat = OpenLayers.Util.properFeatures(feat, this.options.geom_type); + if (this.options.is_collection) { + this.num_geom = feat.geometry.components.length; + } else { + this.num_geom = 1; + } + document.getElementById(this.options.id).value = this.get_ewkt(feat); +}; + +MapWidget.prototype.add_wkt = function(event) { + if (this.options.is_collection) { + var feat = new OpenLayers.Feature.Vector(new this.options.geom_type()); + for (var i=0; i<this.layers.vector.features.length; i++) { + feat.geometry.addComponents([this.layers.vector.features[i].geometry]); + } + this.write_wkt(feat); + } else { + if (this.layers.vector.features.length > 1) { + old_feats = [this.layers.vector.features[0]]; + this.layers.vector.removeFeatures(old_feats); + this.layers.vector.destroyFeatures(old_feats); + } + this.write_wkt(event.feature); + } +}; + +MapWidget.prototype.modify_wkt = function(event) { + if (this.options.is_collection) { + if (this.options.geom_name == 'MultiPoint') { + this.add_wkt(event); + return; + } else { + var feat = new OpenLayers.Feature.Vector(new this.options.geom_type()); + for (var i=0; i<this.num_geom; i++) { + feat.geometry.addComponents([this.layers.vector.features[i].geometry]); + } + this.write_wkt(feat); + } + } else { + this.write_wkt(event.feature); + } +}; + +MapWidget.prototype.deleteFeatures = function() { + this.layers.vector.removeFeatures(this.layers.vector.features); + this.layers.vector.destroyFeatures(); +}; + +MapWidget.prototype.clearFeatures = function() { + this.deleteFeatures(); + document.getElementById(this.options.id).value = ''; + this.map.setCenter(this.defaultCenter(), this.options.default_zoom); +}; + +MapWidget.prototype.defaultCenter = function() { + var center = new OpenLayers.LonLat(this.options.default_lon, this.options.default_lat); + if (this.options.map_srid) { + return center.transform(new OpenLayers.Projection("EPSG:4326"), this.map.getProjectionObject()); + } + return center; +}; + +MapWidget.prototype.addSelectControl = function() { + var select = new OpenLayers.Control.SelectFeature(this.layers.vector, {'toggle': true, 'clickout': true}); + this.map.addControl(select); + select.activate(); +}; + +MapWidget.prototype.enableDrawing = function () { + this.map.getControlsByClass('OpenLayers.Control.DrawFeature')[0].activate(); +}; + +MapWidget.prototype.enableEditing = function () { + this.map.getControlsByClass('OpenLayers.Control.ModifyFeature')[0].activate(); +}; + +MapWidget.prototype.getControls = function(layer) { + this.panel = new OpenLayers.Control.Panel({'displayClass': 'olControlEditingToolbar'}); + this.controls = [new OpenLayers.Control.Navigation()]; + if (!this.options.modifiable && layer.features.length) + return; + if (this.options.geom_name.indexOf('LineString') >= 0 || this.options.geom_name == 'GeometryCollection' || this.options.geom_name == 'Unknown') { + this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Path, {'displayClass': 'olControlDrawFeaturePath'})); + } + if (this.options.geom_name.indexOf('Polygon') >= 0 || this.options.geom_name == 'GeometryCollection' || this.options.geom_name == 'Unknown') { + this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Polygon, {'displayClass': 'olControlDrawFeaturePolygon'})); + } + if (this.options.geom_name.indexOf('Point') >= 0 || this.options.geom_name == 'GeometryCollection' || this.options.geom_name == 'Unknown') { + this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Point, {'displayClass': 'olControlDrawFeaturePoint'})); + } + if (this.options.modifiable) { + this.controls.push(new OpenLayers.Control.ModifyFeature(layer, {'displayClass': 'olControlModifyFeature'})); + } +}; +window.MapWidget = MapWidget; +})(); diff --git a/version.py b/version.py index 749b0954b..42b630409 100644 --- a/version.py +++ b/version.py @@ -1,4 +1,5 @@ -VERSION = (1, 0, 0) +# 1.99.10 +VERSION = (1, 99, 10) def get_version(): |