diff options
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/__init__.py | 1 | ||||
| -rw-r--r-- | archaeological_operations/admin.py | 138 | ||||
| -rw-r--r-- | archaeological_operations/fixtures/initial_data-fr.json | 5817 | ||||
| -rw-r--r-- | archaeological_operations/fixtures/initial_data_relation_type-fr.json | 45 | ||||
| -rw-r--r-- | archaeological_operations/fixtures/initial_data_relation_type_norel-fr.json | 41 | ||||
| -rw-r--r-- | archaeological_operations/fixtures/periods-fr.json | 492 | ||||
| -rw-r--r-- | archaeological_operations/forms.py | 71 | ||||
| -rw-r--r-- | archaeological_operations/lookups.py | 76 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0001_initial.py | 1038 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0002_auto_20170414_2123.py | 365 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0003_views.py | 16 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0004_auto_20170802_1557.py | 31 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0005_auto_20170804_1741.py | 19 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0006_auto_20170804_2024.py | 46 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0007_auto_20170826_1152.py | 47 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0008_auto_20170829_1639.py | 36 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0068_auto__chg_field_historicaloperation_code_patriarche__chg_field_operati.py | 873 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0069_auto__chg_field_operationsource_external_id.py | 846 | ||||
| -rw-r--r-- | archaeological_operations/models.py | 144 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0001_initial.py | 655 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0002_views.py (renamed from archaeological_operations/migrations/0002_views.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0003_auto__add_field_operationtype_preventive.py (renamed from archaeological_operations/migrations/0003_auto__add_field_operationtype_preventive.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0004_auto__chg_field_historicaloperation_year__chg_field_operation_year.py (renamed from archaeological_operations/migrations/0004_auto__chg_field_historicaloperation_year__chg_field_operation_year.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0005_auto__chg_field_historicaloperation_operation_code__chg_field_operatio.py (renamed from archaeological_operations/migrations/0005_auto__chg_field_historicaloperation_operation_code__chg_field_operatio.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0006_auto__add_field_operationsource_reference__add_field_operationsource_i.py (renamed from archaeological_operations/migrations/0006_auto__add_field_operationsource_reference__add_field_operationsource_i.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0007_auto__chg_field_administrativeact_ref_sra__chg_field_historicaladminis.py (renamed from archaeological_operations/migrations/0007_auto__chg_field_administrativeact_ref_sra__chg_field_historicaladminis.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0008_auto__chg_field_operationsource_index__chg_field_operationsource_title.py (renamed from archaeological_operations/migrations/0008_auto__chg_field_operationsource_index__chg_field_operationsource_title.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0009_auto__add_field_historicaloperation_cached_label__add_field_operation_.py (renamed from archaeological_operations/migrations/0009_auto__add_field_historicaloperation_cached_label__add_field_operation_.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0010_auto__chg_field_historicaloperation_cached_label__chg_field_operation_.py (renamed from archaeological_operations/migrations/0010_auto__chg_field_historicaloperation_cached_label__chg_field_operation_.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0011_auto__add_field_historicaloperation_report_delivery_date__add_field_op.py (renamed from archaeological_operations/migrations/0011_auto__add_field_historicaloperation_report_delivery_date__add_field_op.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0012_auto.py (renamed from archaeological_operations/migrations/0012_auto.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0013_auto__add_field_acttype_code.py (renamed from archaeological_operations/migrations/0013_auto__add_field_acttype_code.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0014_auto__add_archaeologicalsite.py (renamed from archaeological_operations/migrations/0014_auto__add_archaeologicalsite.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0015_auto__add_unique_archaeologicalsite_reference.py (renamed from archaeological_operations/migrations/0015_auto__add_unique_archaeologicalsite_reference.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0016_auto__add_field_acttype_indexed__add_field_historicaladministrativeact.py (renamed from archaeological_operations/migrations/0016_auto__add_field_acttype_indexed__add_field_historicaladministrativeact.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0017_rename_in_charge_to_scientist.py (renamed from archaeological_operations/migrations/0017_rename_in_charge_to_scientist.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0018_auto__add_field_historicaloperation_in_charge_id__add_field_operation_.py (renamed from archaeological_operations/migrations/0018_auto__add_field_historicaloperation_in_charge_id__add_field_operation_.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0019_auto__add_field_historicaloperation_operator_id__add_field_operation_o.py (renamed from archaeological_operations/migrations/0019_auto__add_field_historicaloperation_operator_id__add_field_operation_o.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0020_auto__add_field_parcel_history_creator__add_field_historicaloperation_.py (renamed from archaeological_operations/migrations/0020_auto__add_field_parcel_history_creator__add_field_historicaloperation_.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0021_init_history_creator.py (renamed from archaeological_operations/migrations/0021_init_history_creator.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0022_auto__add_field_operationtype_order.py (renamed from archaeological_operations/migrations/0022_auto__add_field_operationtype_order.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0023_add_year_administrativact.py (renamed from archaeological_operations/migrations/0023_add_year_administrativact.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0024_reinit_history_creator.py (renamed from archaeological_operations/migrations/0024_reinit_history_creator.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0025_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py (renamed from archaeological_operations/migrations/0025_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0026_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py (renamed from archaeological_operations/migrations/0026_auto__chg_field_historicaladministrativeact_act_object__chg_field_admi.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0027_auto__add_field_historicaloperation_creation_date__add_field_operation.py (renamed from archaeological_operations/migrations/0027_auto__add_field_historicaloperation_creation_date__add_field_operation.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0028_init_creation_date.py (renamed from archaeological_operations/migrations/0028_init_creation_date.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0029_auto__chg_field_historicaloperation_creation_date__chg_field_operation.py (renamed from archaeological_operations/migrations/0029_auto__chg_field_historicaloperation_creation_date__chg_field_operation.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0030_auto__chg_field_parcel_history_creator__chg_field_parcel_history_modif.py (renamed from archaeological_operations/migrations/0030_auto__chg_field_parcel_history_creator__chg_field_parcel_history_modif.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0031_auto__add_field_parcel_address.py (renamed from archaeological_operations/migrations/0031_auto__add_field_parcel_address.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0032_auto__add_field_operationsource_support_type__add_field_operationsourc.py (renamed from archaeological_operations/migrations/0032_auto__add_field_operationsource_support_type__add_field_operationsourc.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0033_auto__add_field_parcel_external_id.py (renamed from archaeological_operations/migrations/0033_auto__add_field_parcel_external_id.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0034_auto__add_field_operationsource_external_id.py (renamed from archaeological_operations/migrations/0034_auto__add_field_operationsource_external_id.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0035_auto.py (renamed from archaeological_operations/migrations/0035_auto.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0036_auto.py (renamed from archaeological_operations/migrations/0036_auto.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0037_auto__chg_field_parcel_parcel_number__chg_field_operationtype_txt_idx_.py (renamed from archaeological_operations/migrations/0037_auto__chg_field_parcel_parcel_number__chg_field_operationtype_txt_idx_.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0038_auto__add_unique_operation_code_patriarche.py (renamed from archaeological_operations/migrations/0038_auto__add_unique_operation_code_patriarche.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0039_auto__add_recordrelations__add_relationtype.py (renamed from archaeological_operations/migrations/0039_auto__add_recordrelations__add_relationtype.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0040_auto__chg_field_parcel_external_id.py (renamed from archaeological_operations/migrations/0040_auto__chg_field_parcel_external_id.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0041_rename_ope_type_2_ope_type_old.py (renamed from archaeological_operations/migrations/0041_rename_ope_type_2_ope_type_old.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0042_rename_ope_type_2_ope_type_old_2.py (renamed from archaeological_operations/migrations/0042_rename_ope_type_2_ope_type_old_2.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0043_auto__add_field_historicaladministrativeact_departments_label__add_fie.py (renamed from archaeological_operations/migrations/0043_auto__add_field_historicaladministrativeact_departments_label__add_fie.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0044_auto__add_field_historicaloperation_virtual_operation__add_field_histo.py (renamed from archaeological_operations/migrations/0044_auto__add_field_historicaloperation_virtual_operation__add_field_histo.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0045_auto__chg_field_historicaloperation_common_name__chg_field_operation_c.py (renamed from archaeological_operations/migrations/0045_auto__chg_field_historicaloperation_common_name__chg_field_operation_c.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0046_auto__add_reportstate__add_field_historicaloperation_report_processing.py (renamed from archaeological_operations/migrations/0046_auto__add_reportstate__add_field_historicaloperation_report_processing.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0047_auto__add_field_operationsource_duplicate__chg_field_operationsource_i.py (renamed from archaeological_operations/migrations/0047_auto__add_field_operationsource_duplicate__chg_field_operationsource_i.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0048_auto__add_field_operationsource_receipt_date_in_documentation.py (renamed from archaeological_operations/migrations/0048_auto__add_field_operationsource_receipt_date_in_documentation.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py (renamed from archaeological_operations/migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0050_auto__chg_field_historicaloperation_code_dracar__chg_field_operation_c.py (renamed from archaeological_operations/migrations/0050_auto__chg_field_historicaloperation_code_dracar__chg_field_operation_c.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0051_auto__add_field_historicaloperation_point__add_field_historicaloperati.py (renamed from archaeological_operations/migrations/0051_auto__add_field_historicaloperation_point__add_field_historicaloperati.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0052_auto__add_field_relationtype_short_label.py (renamed from archaeological_operations/migrations/0052_auto__add_field_relationtype_short_label.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0053_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py (renamed from archaeological_operations/migrations/0053_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0054_auto__add_field_parcel_auto_external_id.py (renamed from archaeological_operations/migrations/0054_auto__add_field_parcel_auto_external_id.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0055_auto__add_field_parcel_public_domain.py (renamed from archaeological_operations/migrations/0055_auto__add_field_parcel_public_domain.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0056_auto__chg_field_parcel_section.py (renamed from archaeological_operations/migrations/0056_auto__chg_field_parcel_section.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0057_rename_code_dracar_to_old_code.py (renamed from archaeological_operations/migrations/0057_rename_code_dracar_to_old_code.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0058_auto__add_field_operationsource_image__add_field_operationsource_thumb.py (renamed from archaeological_operations/migrations/0058_auto__add_field_operationsource_image__add_field_operationsource_thumb.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0059_auto__add_field_historicaloperation_documentation_deadline__add_field_.py (renamed from archaeological_operations/migrations/0059_auto__add_field_historicaloperation_documentation_deadline__add_field_.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0060_auto__add_field_historicaloperation_scientific_documentation_comment__.py (renamed from archaeological_operations/migrations/0060_auto__add_field_historicaloperation_scientific_documentation_comment__.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0061_regenerate_cached_label.py (renamed from archaeological_operations/migrations/0061_regenerate_cached_label.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0062_auto__chg_field_operationsource_image__chg_field_operationsource_thumb.py (renamed from archaeological_operations/migrations/0062_auto__chg_field_operationsource_image__chg_field_operationsource_thumb.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py (renamed from archaeological_operations/migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0064_fix_old_operationtype.py (renamed from archaeological_operations/migrations/0064_fix_old_operationtype.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0065_auto__add_field_historicaloperation_address__add_field_operation_addre.py (renamed from archaeological_operations/migrations/0065_auto__add_field_historicaloperation_address__add_field_operation_addre.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0066_regenerate_cached_label.py (renamed from archaeological_operations/migrations/0066_regenerate_cached_label.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/0067_auto.py (renamed from archaeological_operations/migrations/0067_auto.py) | 0 | ||||
| -rw-r--r-- | archaeological_operations/old_migrations/__init__.py | 0 | ||||
| -rw-r--r-- | archaeological_operations/tests.py | 437 | ||||
| -rw-r--r-- | archaeological_operations/tests/MCC-operations-example.csv | 2 | ||||
| -rwxr-xr-x | archaeological_operations/tests/document_reference.odt | bin | 0 -> 11155 bytes | |||
| -rw-r--r-- | archaeological_operations/urls.py | 70 | ||||
| -rw-r--r-- | archaeological_operations/views.py | 40 | ||||
| -rw-r--r-- | archaeological_operations/widgets.py | 11 | ||||
| -rw-r--r-- | archaeological_operations/wizards.py | 15 |
94 files changed, 5222 insertions, 6150 deletions
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 |
