diff options
Diffstat (limited to 'archaeological_context_records')
56 files changed, 2237 insertions, 2052 deletions
diff --git a/archaeological_context_records/__init__.py b/archaeological_context_records/__init__.py index e69de29bb..8b0803727 100644 --- a/archaeological_context_records/__init__.py +++ b/archaeological_context_records/__init__.py @@ -0,0 +1 @@ +default_app_config = 'ishtar_common.apps.ArchaeologicalContextRecordConfig' diff --git a/archaeological_context_records/admin.py b/archaeological_context_records/admin.py index 567f50014..2733fa2ff 100644 --- a/archaeological_context_records/admin.py +++ b/archaeological_context_records/admin.py @@ -17,31 +17,55 @@ # See the file COPYING for details. +from ajax_select import make_ajax_form +from ajax_select.fields import AutoCompleteSelectField + +from django import forms from django.contrib import admin +from django.contrib.gis.forms import PointField, PolygonField, OSMWidget +from django.utils.translation import ugettext_lazy as _ +from ishtar_common.apps import admin_site from ishtar_common.admin import HistorizedObjectAdmin, GeneralTypeAdmin import models class DatingAdmin(admin.ModelAdmin): - list_display = ('period', 'start_date', 'end_date', 'dating_type', - 'quality') + list_display = ('period', 'context_records_lbl', 'finds_lbl') list_filter = ("period", 'dating_type', 'quality') model = models.Dating + search_fields = ['context_records__cached_label', 'period__label', + 'find__cached_label'] + readonly_fields = ['context_records_lbl', 'finds_lbl'] + +admin_site.register(models.Dating, DatingAdmin) + -admin.site.register(models.Dating, DatingAdmin) +class AdminContextRecordForm(forms.ModelForm): + class Meta: + model = models.ContextRecord + exclude = [] + point_2d = PointField(label=_(u"Point"), required=False, + widget=OSMWidget) + polygon = PolygonField(label=_(u"Polygon"), required=False, + widget=OSMWidget) + operation = AutoCompleteSelectField('operation') + parcel = AutoCompleteSelectField('parcel') class ContextRecordAdmin(HistorizedObjectAdmin): - list_display = ('label', 'length', 'width', - 'thickness', 'depth') - list_filter = ('documentations',) - search_fields = ('label', 'parcel__operation__common_name', - 'datings__period__label') + list_display = ('label', 'operation', 'parcel') + list_filter = ('unit',) + search_fields = ('label', 'parcel__operation__cached_label', + 'parcel__section', 'parcel__parcel_number') model = models.ContextRecord + form = AdminContextRecordForm + readonly_fields = HistorizedObjectAdmin.readonly_fields + [ + 'imports', 'cached_label', 'datings' + ] -admin.site.register(models.ContextRecord, ContextRecordAdmin) +admin_site.register(models.ContextRecord, ContextRecordAdmin) class ContextRecordSourceAdmin(admin.ModelAdmin): @@ -49,41 +73,50 @@ class ContextRecordSourceAdmin(admin.ModelAdmin): list_filter = ('source_type',) search_fields = ('title', ) model = models.ContextRecordSource + form = make_ajax_form(model, { + "context_record": 'context_record', + 'authors': 'author' + }) -admin.site.register(models.ContextRecordSource, ContextRecordSourceAdmin) +admin_site.register(models.ContextRecordSource, ContextRecordSourceAdmin) class RecordRelationsAdmin(admin.ModelAdmin): list_display = ('left_record', 'relation_type', 'right_record') list_filter = ('relation_type',) + model = models.RecordRelations + form = make_ajax_form(model, { + 'left_record': 'context_record', + 'right_record': 'context_record', + }) -admin.site.register(models.RecordRelations, RecordRelationsAdmin) +admin_site.register(models.RecordRelations, RecordRelationsAdmin) class RelationTypeAdmin(admin.ModelAdmin): list_display = ('label', 'txt_idx', 'tiny_label', 'available', 'symmetrical', 'inverse_relation', 'order', 'comment') -admin.site.register(models.RelationType, RelationTypeAdmin) +admin_site.register(models.RelationType, RelationTypeAdmin) class UnitAdmin(admin.ModelAdmin): list_display = ['label', 'txt_idx', 'parent', 'available', 'order', 'comment'] -admin.site.register(models.Unit, UnitAdmin) +admin_site.register(models.Unit, UnitAdmin) class IdentificationTypeAdmin(admin.ModelAdmin): list_display = ['label', 'txt_idx', 'available', 'order', 'comment'] -admin.site.register(models.IdentificationType, IdentificationTypeAdmin) +admin_site.register(models.IdentificationType, IdentificationTypeAdmin) general_models = [ models.DatingType, models.DatingQuality, models.DocumentationType, models.ActivityType, models.ExcavationTechnicType] for model in general_models: - admin.site.register(model, GeneralTypeAdmin) + admin_site.register(model, GeneralTypeAdmin) diff --git a/archaeological_context_records/fixtures/initial_data-fr.json b/archaeological_context_records/fixtures/initial_data-fr.json index f43b46a2a..89406c37b 100644 --- a/archaeological_context_records/fixtures/initial_data-fr.json +++ b/archaeological_context_records/fixtures/initial_data-fr.json @@ -1,682 +1,494 @@ [ - { - "pk": 1, - "model": "archaeological_context_records.datingquality", - "fields": { - "comment": "Datation fond\u00e9e sur des faits", - "available": true, - "txt_idx": "sure", - "label": "Av\u00e9r\u00e9e" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.datingquality", - "fields": { - "comment": "Datation \u00e0 v\u00e9rifier", - "available": true, - "txt_idx": "estimated", - "label": "Estim\u00e9e " - } - }, - { - "pk": 1, - "model": "archaeological_context_records.activitytype", - "fields": { - "comment": "Unit\u00e9 d'enregistrement qui n'est pas directement d'origine anthropique. ", - "available": true, - "txt_idx": "natural", - "order": 1000, - "label": "Naturelle" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.activitytype", - "fields": { - "comment": "Unit\u00e9 \u00e9labor\u00e9e par l'homme, comme un mur ou un sol am\u00e9nag\u00e9 par exemple.", - "available": true, - "txt_idx": "construction", - "order": 1100, - "label": "Construction" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.activitytype", - "fields": { - "comment": "Unit\u00e9 li\u00e9e \u00e0 l'anthropisation elle-m\u00eame.", - "available": true, - "txt_idx": "occupation", - "order": 1300, - "label": "Occupation" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.activitytype", - "fields": { - "comment": "Unit\u00e9 r\u00e9sultant de l'arr\u00eat d'anthropisation.", - "available": true, - "txt_idx": "desertion", - "order": 1500, - "label": "Abandon" - } - }, - { - "pk": 14, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "unknown", - "order": 10, - "label": "Ind\u00e9termin\u00e9" - } - }, - { - "pk": 12, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "windthrow", - "order": 1000, - "label": "Chablis" - } - }, - { - "pk": 11, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "colluvial_unit", - "order": 1000, - "label": "Colluvions" - } - }, - { - "pk": 13, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "filling", - "order": 1000, - "label": "Comblement" - } - }, - { - "pk": 10, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "digging", - "order": 1000, - "label": "Creusement" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "masonry", - "order": 1000, - "label": "Ma\u00e7onnerie" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "wall", - "order": 1000, - "label": "Mur" - } - }, - { - "pk": 5, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "desertion_level", - "order": 1000, - "label": "Niveau d'abandon" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "occupation_level", - "order": 1000, - "label": "Niveau d'occupation" - } - }, - { - "pk": 6, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "geological_level", - "order": 1000, - "label": "Niveau g\u00e9ologique" - } - }, - { - "pk": 9, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "foundation_level", - "order": 1000, - "label": "Radier" - } - }, - { - "pk": 7, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "embankment", - "order": 1000, - "label": "Remblai" - } - }, - { - "pk": 8, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "archaeological_soil", - "order": 1000, - "label": "Sol arch\u00e9ologique" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.identificationtype", - "fields": { - "comment": "Niveau cultiv\u00e9 ou non, actuel.", - "available": true, - "txt_idx": "soil", - "order": 1000, - "label": "Terre v\u00e9g\u00e9tale" - } - }, - { - "pk": 15, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Anomalie", - "order": 100, - "txt_idx": "anomaly" - } - }, - { - "pk": 10, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "Unit\u00e9 repr\u00e9sentant une partie d'un niveau d\u00e9coup\u00e9 en carr\u00e9s r\u00e9f\u00e9renc\u00e9s.", - "available": true, - "parent": null, - "label": "Carr\u00e9", - "order": 100, - "txt_idx": "square" - } - }, - { - "pk": 16, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Fait", - "order": 100, - "txt_idx": "fact" - } - }, - { - "pk": 9, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "Unit\u00e9 g\u00e9n\u00e9rale (d'ordinaire virtuelle) pouvant regrouper du mobilier trouv\u00e9 en dehors d'un contexte spatialis\u00e9 : mobilier trouv\u00e9 lors d'un d\u00e9capage, sous une semelle d'un fouilleur, dans les d\u00e9blais, etc.", - "available": true, - "parent": null, - "label": "Hors contexte", - "order": 100, - "txt_idx": "not_in_context" - } - }, - { - "pk": 18, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Log", - "order": 100, - "txt_idx": "log" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "Cette unit\u00e9 n'a pas de volume.", - "available": true, - "parent": 17, - "label": "N\u00e9gative", - "order": 100, - "txt_idx": "negative" - } - }, - { - "pk": 13, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Secteur", - "order": 100, - "txt_idx": "sector" - } - }, - { - "pk": 12, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Structure", - "order": 100, - "txt_idx": "structure" - } - }, - { - "pk": 11, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Tranch\u00e9e", - "order": 100, - "txt_idx": "trench" - } - }, - { - "pk": 17, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "US", - "order": 100, - "txt_idx": "stratigraphic-unit" - } - }, - { - "pk": 14, - "model": "archaeological_context_records.unit", - "fields": { - "comment": "", - "available": true, - "parent": null, - "label": "Zone", - "order": 100, - "txt_idx": "zone" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.datingtype", - "fields": { - "comment": "D'apr\u00e8s une datation de type C14, OSL, TL, arch\u00e9omagn\u00e9tisme, etc, fournissant une date en BP cal avec une marge.", - "available": true, - "txt_idx": "from_absolute_dating", - "label": "D'apr\u00e8s datation absolue" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.datingtype", - "fields": { - "comment": "Une \u00e9tude du mobilier est la source de datation.", - "available": true, - "txt_idx": "from_artefact", - "label": "D'apr\u00e8s \u00e9tude du mobilier" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE en remplissant une autre (qui doit \u00eatre vraisemblablement une US de creusement)", - "available": true, - "tiny_label": "", - "label": "Comble", - "symmetrical": false, - "inverse_relation": 10, - "order": 1, - "txt_idx": "filling" - } - }, - { - "pk": 10, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE remplie par une autre", - "available": true, - "tiny_label": "", - "label": "Combl\u00e9e par", - "symmetrical": false, - "inverse_relation": 2, - "order": 1, - "txt_idx": "filled_by" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE en coupant une autre", - "available": true, - "tiny_label": "", - "label": "Coupe", - "symmetrical": false, - "inverse_relation": 8, - "order": 1, - "txt_idx": "cutting" - } - }, - { - "pk": 8, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE recoup\u00e9e par une autre", - "available": true, - "tiny_label": "", - "label": "Coup\u00e9e par", - "symmetrical": false, - "inverse_relation": 1, - "order": 1, - "txt_idx": "cutted" - } - }, - { - "pk": 9, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE \u00e9quivalant \u00e0 une autre", - "available": true, - "tiny_label": null, - "label": "\u00c9quivaut \u00e0", - "symmetrical": true, - "inverse_relation": null, - "order": 1, - "txt_idx": "equals" - } - }, - { - "pk": 6, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE faisant partie d'une autre", - "available": true, - "tiny_label": "", - "label": "Incluse dans", - "symmetrical": false, - "inverse_relation": 5, - "order": 1, - "txt_idx": "is_included" - } - }, - { - "pk": 5, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE en incluant (regroupant) d'autres (ex: tranch\u00e9e / structures ou entre structure / US, etc.)", - "available": true, - "tiny_label": "", - "label": "Inclut", - "symmetrical": false, - "inverse_relation": 6, - "order": 1, - "txt_idx": "include" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "\u00c0 pr\u00e9ciser ", - "available": true, - "tiny_label": "", - "label": "Relation indirecte", - "symmetrical": true, - "inverse_relation": null, - "order": 1, - "txt_idx": "indirect_relation" - } - }, - { - "pk": 7, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE situ\u00e9e en-dessous d'une autre", - "available": true, - "tiny_label": "", - "label": "Sous", - "symmetrical": false, - "inverse_relation": 3, - "order": 1, - "txt_idx": "is_below" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.relationtype", - "fields": { - "comment": "UE situ\u00e9e au-dessus d'une autre", - "available": true, - "tiny_label": "", - "label": "Sur", - "symmetrical": false, - "inverse_relation": 7, - "order": 1, - "txt_idx": "is_above" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-overflowing-cut", - "label": "Coupe manuelle d\u00e9bordante" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "mechanical-overflowing-cut", - "label": "Coupe m\u00e9canique d\u00e9bordante" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "mechanical-stripping", - "label": "D\u00e9capage m\u00e9canique" - } - }, - { - "pk": 6, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "100-percent-excavated", - "label": "Fouill\u00e9e \u00e0 100%" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "25-percent-excavated", - "label": "Fouill\u00e9e \u00e0 25%" - } - }, - { - "pk": 5, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "50-percent-excavated", - "label": "Fouill\u00e9e \u00e0 50%" - } - }, - { - "pk": 7, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-dig", - "label": "Fouille manuelle" - } - }, - { - "pk": 10, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-dig-by-planimetry", - "label": "Fouille manuelle en planim\u00e9trie" - } - }, - { - "pk": 9, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-dig-by-half", - "label": "Fouille manuelle par moiti\u00e9" - } - }, - { - "pk": 8, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "manual-dig-by-quarter", - "label": "Fouille manuelle par quart" - } - }, - { - "pk": 11, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "mechanical-dig", - "label": "Fouille m\u00e9canique" - } - }, - { - "pk": 12, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "not-digged", - "label": "Non fouill\u00e9e" - } - }, - { - "pk": 13, - "model": "archaeological_context_records.excavationtechnictype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "tested", - "label": "Test\u00e9e" - } - }, - { - "pk": 2, - "model": "archaeological_context_records.documentationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "section", - "label": "Coupe" - } - }, - { - "pk": 3, - "model": "archaeological_context_records.documentationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "photo", - "label": "Photo" - } - }, - { - "pk": 4, - "model": "archaeological_context_records.documentationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "map", - "label": "Plan" - } - }, - { - "pk": 1, - "model": "archaeological_context_records.documentationtype", - "fields": { - "comment": "", - "available": true, - "txt_idx": "has-furniture", - "label": "Pr\u00e9sence de mobilier" - } - } -]
\ No newline at end of file +{ + "model": "archaeological_context_records.datingquality", + "fields": { + "label": "Av\u00e9r\u00e9e", + "txt_idx": "sure", + "comment": "Datation fond\u00e9e sur des faits", + "available": true + } +}, +{ + "model": "archaeological_context_records.datingquality", + "fields": { + "label": "Estim\u00e9e ", + "txt_idx": "estimated", + "comment": "Datation \u00e0 v\u00e9rifier", + "available": true + } +}, +{ + "model": "archaeological_context_records.activitytype", + "fields": { + "label": "Naturelle", + "txt_idx": "natural", + "comment": "Unit\u00e9 d'enregistrement qui n'est pas directement d'origine anthropique. ", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.activitytype", + "fields": { + "label": "Construction", + "txt_idx": "construction", + "comment": "Unit\u00e9 \u00e9labor\u00e9e par l'homme, comme un mur ou un sol am\u00e9nag\u00e9 par exemple.", + "available": true, + "order": 1100 + } +}, +{ + "model": "archaeological_context_records.activitytype", + "fields": { + "label": "Abandon", + "txt_idx": "desertion", + "comment": "Unit\u00e9 r\u00e9sultant de l'arr\u00eat d'anthropisation.", + "available": true, + "order": 1500 + } +}, +{ + "model": "archaeological_context_records.activitytype", + "fields": { + "label": "Occupation", + "txt_idx": "occupation", + "comment": "Unit\u00e9 li\u00e9e \u00e0 l'anthropisation elle-m\u00eame.", + "available": true, + "order": 1300 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Terre v\u00e9g\u00e9tale", + "txt_idx": "soil", + "comment": "Niveau cultiv\u00e9 ou non, actuel.", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Ma\u00e7onnerie", + "txt_idx": "masonry", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Mur", + "txt_idx": "wall", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Niveau d'occupation", + "txt_idx": "occupation_level", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Niveau d'abandon", + "txt_idx": "desertion_level", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Niveau g\u00e9ologique", + "txt_idx": "geological_level", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Remblai", + "txt_idx": "embankment", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Sol arch\u00e9ologique", + "txt_idx": "archaeological_soil", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Radier", + "txt_idx": "foundation_level", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Creusement", + "txt_idx": "digging", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Colluvions", + "txt_idx": "colluvial_unit", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Chablis", + "txt_idx": "windthrow", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Comblement", + "txt_idx": "filling", + "comment": "", + "available": true, + "order": 1000 + } +}, +{ + "model": "archaeological_context_records.identificationtype", + "fields": { + "label": "Ind\u00e9termin\u00e9", + "txt_idx": "unknown", + "comment": "", + "available": true, + "order": 10 + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "US", + "txt_idx": "stratigraphic-unit", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Hors contexte", + "txt_idx": "not_in_context", + "comment": "Unit\u00e9 g\u00e9n\u00e9rale (d'ordinaire virtuelle) pouvant regrouper du mobilier trouv\u00e9 en dehors d'un contexte spatialis\u00e9 : mobilier trouv\u00e9 lors d'un d\u00e9capage, sous une semelle d'un fouilleur, dans les d\u00e9blais, etc.", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Carr\u00e9", + "txt_idx": "square", + "comment": "Unit\u00e9 repr\u00e9sentant une partie d'un niveau d\u00e9coup\u00e9 en carr\u00e9s r\u00e9f\u00e9renc\u00e9s.", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Tranch\u00e9e", + "txt_idx": "trench", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Structure", + "txt_idx": "structure", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Secteur", + "txt_idx": "sector", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Zone", + "txt_idx": "zone", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Anomalie", + "txt_idx": "anomaly", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Fait", + "txt_idx": "fact", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "N\u00e9gative", + "txt_idx": "negative", + "comment": "Cette unit\u00e9 n'a pas de volume.", + "available": true, + "order": 100, + "parent": [ + "stratigraphic-unit" + ] + } +}, +{ + "model": "archaeological_context_records.unit", + "fields": { + "label": "Log", + "txt_idx": "log", + "comment": "", + "available": true, + "order": 100, + "parent": null + } +}, +{ + "model": "archaeological_context_records.datingtype", + "fields": { + "label": "D'apr\u00e8s datation absolue", + "txt_idx": "from_absolute_dating", + "comment": "D'apr\u00e8s une datation de type C14, OSL, TL, arch\u00e9omagn\u00e9tisme, etc, fournissant une date en BP cal avec une marge.", + "available": true + } +}, +{ + "model": "archaeological_context_records.datingtype", + "fields": { + "label": "D'apr\u00e8s \u00e9tude du mobilier", + "txt_idx": "from_artefact", + "comment": "Une \u00e9tude du mobilier est la source de datation.", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Coupe manuelle d\u00e9bordante", + "txt_idx": "manual-overflowing-cut", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Coupe m\u00e9canique d\u00e9bordante", + "txt_idx": "mechanical-overflowing-cut", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "D\u00e9capage m\u00e9canique", + "txt_idx": "mechanical-stripping", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouill\u00e9e \u00e0 25%", + "txt_idx": "25-percent-excavated", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouill\u00e9e \u00e0 50%", + "txt_idx": "50-percent-excavated", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouill\u00e9e \u00e0 100%", + "txt_idx": "100-percent-excavated", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille manuelle", + "txt_idx": "manual-dig", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille manuelle par quart", + "txt_idx": "manual-dig-by-quarter", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille manuelle par moiti\u00e9", + "txt_idx": "manual-dig-by-half", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille manuelle en planim\u00e9trie", + "txt_idx": "manual-dig-by-planimetry", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Fouille m\u00e9canique", + "txt_idx": "mechanical-dig", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Non fouill\u00e9e", + "txt_idx": "not-digged", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.excavationtechnictype", + "fields": { + "label": "Test\u00e9e", + "txt_idx": "tested", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.documentationtype", + "fields": { + "label": "Pr\u00e9sence de mobilier", + "txt_idx": "has-furniture", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.documentationtype", + "fields": { + "label": "Coupe", + "txt_idx": "section", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.documentationtype", + "fields": { + "label": "Photo", + "txt_idx": "photo", + "comment": "", + "available": true + } +}, +{ + "model": "archaeological_context_records.documentationtype", + "fields": { + "label": "Plan", + "txt_idx": "map", + "comment": "", + "available": true + } +} +] diff --git a/archaeological_context_records/fixtures/initial_data_relation_type-fr.json b/archaeological_context_records/fixtures/initial_data_relation_type-fr.json new file mode 100644 index 000000000..0f3bee39c --- /dev/null +++ b/archaeological_context_records/fixtures/initial_data_relation_type-fr.json @@ -0,0 +1,148 @@ +[ +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Coupe", + "txt_idx": "cutting", + "comment": "UE en coupant une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "cutted" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Comble", + "txt_idx": "filling", + "comment": "UE en remplissant une autre (qui doit \u00eatre vraisemblablement une US de creusement)", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "filled_by" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Sur", + "txt_idx": "is_above", + "comment": "UE situ\u00e9e au-dessus d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "is_below" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Relation indirecte", + "txt_idx": "indirect_relation", + "comment": "\u00c0 pr\u00e9ciser ", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Inclut", + "txt_idx": "include", + "comment": "UE en incluant (regroupant) d'autres (ex: tranch\u00e9e / structures ou entre structure / US, etc.)", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "is_included" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Incluse dans", + "txt_idx": "is_included", + "comment": "UE faisant partie d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "include" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Sous", + "txt_idx": "is_below", + "comment": "UE situ\u00e9e en-dessous d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "is_above" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Coup\u00e9e par", + "txt_idx": "cutted", + "comment": "UE recoup\u00e9e par une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "cutting" + ] + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "\u00c9quivaut \u00e0", + "txt_idx": "equals", + "comment": "UE \u00e9quivalant \u00e0 une autre", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": null, + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Combl\u00e9e par", + "txt_idx": "filled_by", + "comment": "UE remplie par une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": [ + "filling" + ] + } +} +] diff --git a/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json b/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json new file mode 100644 index 000000000..871c2a541 --- /dev/null +++ b/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json @@ -0,0 +1,132 @@ +[ +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Coupe", + "txt_idx": "cutting", + "comment": "UE en coupant une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Comble", + "txt_idx": "filling", + "comment": "UE en remplissant une autre (qui doit \u00eatre vraisemblablement une US de creusement)", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Sur", + "txt_idx": "is_above", + "comment": "UE situ\u00e9e au-dessus d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Relation indirecte", + "txt_idx": "indirect_relation", + "comment": "\u00c0 pr\u00e9ciser ", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Inclut", + "txt_idx": "include", + "comment": "UE en incluant (regroupant) d'autres (ex: tranch\u00e9e / structures ou entre structure / US, etc.)", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Incluse dans", + "txt_idx": "is_included", + "comment": "UE faisant partie d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Sous", + "txt_idx": "is_below", + "comment": "UE situ\u00e9e en-dessous d'une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Coup\u00e9e par", + "txt_idx": "cutted", + "comment": "UE recoup\u00e9e par une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "\u00c9quivaut \u00e0", + "txt_idx": "equals", + "comment": "UE \u00e9quivalant \u00e0 une autre", + "available": true, + "order": 1, + "symmetrical": true, + "tiny_label": null, + "inverse_relation": null + } +}, +{ + "model": "archaeological_context_records.relationtype", + "fields": { + "label": "Combl\u00e9e par", + "txt_idx": "filled_by", + "comment": "UE remplie par une autre", + "available": true, + "order": 1, + "symmetrical": false, + "tiny_label": "", + "inverse_relation": null + } +} +] diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 86a371538..e5c244fde 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -293,13 +293,6 @@ class RecordRelationsForm(OpeRecordRelationsForm): crs = None if 'data' in kwargs and 'CONTEXT_RECORDS' in kwargs['data']: crs = kwargs['data']['CONTEXT_RECORDS'] - # clean data if not "real" data - prefix_value = kwargs['prefix'] + '-right_record' - if not [k for k in kwargs['data'].keys() - if k.startswith(prefix_value) and kwargs['data'][k]]: - kwargs['data'] = None - if 'files' in kwargs: - kwargs.pop('files') super(RecordRelationsForm, self).__init__(*args, **kwargs) self.fields['relation_type'].choices = \ models.RelationType.get_types( diff --git a/archaeological_context_records/lookups.py b/archaeological_context_records/lookups.py new file mode 100644 index 000000000..92115d98b --- /dev/null +++ b/archaeological_context_records/lookups.py @@ -0,0 +1,23 @@ +from ajax_select import register, LookupChannel + +from django.db.models import Q + +from archaeological_context_records import models + + +@register('context_record') +class ContextRecordLookup(LookupChannel): + model = models.ContextRecord + + def get_query(self, q, request): + query = Q() + for term in q.strip().split(' '): + subquery = ( + Q(cached_label__icontains=term) | + Q(parcel__town__name__icontains=term) + ) + query &= subquery + return self.model.objects.filter(query).order_by('cached_label')[:20] + + def format_item_display(self, item): + return u"<span class='ajax-label'>%s</span>" % item.cached_label diff --git a/archaeological_context_records/migrations/0001_initial.py b/archaeological_context_records/migrations/0001_initial.py index 599a6d4f7..743659f01 100644 --- a/archaeological_context_records/migrations/0001_initial.py +++ b/archaeological_context_records/migrations/0001_initial.py @@ -1,587 +1,318 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import models, migrations +import re +import django.contrib.gis.db.models.fields +import django.db.models.deletion +from django.conf import settings +import ishtar_common.models +import django.core.validators -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'DatingType' - db.create_table('archaeological_context_records_datingtype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('archaeological_context_records', ['DatingType']) +class Migration(migrations.Migration): - # Adding model 'DatingQuality' - db.create_table('archaeological_context_records_datingquality', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('archaeological_context_records', ['DatingQuality']) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - # Adding model 'Dating' - db.create_table('archaeological_context_records_dating', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('period', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.Period'])), - ('start_date', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('dating_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.DatingType'], null=True, blank=True)), - ('quality', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.DatingQuality'], null=True, blank=True)), - )) - db.send_create_signal('archaeological_context_records', ['Dating']) - - # Adding model 'Unit' - db.create_table('archaeological_context_records_unit', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.Unit'], null=True, blank=True)), - )) - db.send_create_signal('archaeological_context_records', ['Unit']) - - # Adding model 'ActivityType' - db.create_table('archaeological_context_records_activitytype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('archaeological_context_records', ['ActivityType']) - - # Adding model 'IdentificationType' - db.create_table('archaeological_context_records_identificationtype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), - ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('order', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('archaeological_context_records', ['IdentificationType']) - - # Adding model 'HistoricalContextRecord' - db.create_table('archaeological_context_records_historicalcontextrecord', ( - ('id', self.gf('django.db.models.fields.IntegerField')(db_index=True, blank=True)), - ('history_modifier_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('parcel_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('operation_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('thickness', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('depth', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('location', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), - ('unit_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('has_furniture', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('filling', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('interpretation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('taq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('taq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('tpq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('tpq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('identification_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('activity_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('history_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('history_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('history_user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)), - ('history_type', self.gf('django.db.models.fields.CharField')(max_length=1)), - )) - db.send_create_signal('archaeological_context_records', ['HistoricalContextRecord']) - - # Adding model 'ContextRecord' - db.create_table('archaeological_context_records_contextrecord', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('history_modifier', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), - ('parcel', self.gf('django.db.models.fields.related.ForeignKey')(related_name='context_record', to=orm['archaeological_operations.Parcel'])), - ('operation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='context_record', to=orm['archaeological_operations.Operation'])), - ('label', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('thickness', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('depth', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('location', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), - ('unit', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['archaeological_context_records.Unit'])), - ('has_furniture', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), - ('filling', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('interpretation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('taq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('taq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('tpq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('tpq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), - ('identification', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.IdentificationType'], null=True, blank=True)), - ('activity', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.ActivityType'], null=True, blank=True)), - )) - db.send_create_signal('archaeological_context_records', ['ContextRecord']) - - # Adding M2M table for field datings on 'ContextRecord' - db.create_table('archaeological_context_records_contextrecord_datings', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('contextrecord', models.ForeignKey(orm['archaeological_context_records.contextrecord'], null=False)), - ('dating', models.ForeignKey(orm['archaeological_context_records.dating'], null=False)) - )) - db.create_unique('archaeological_context_records_contextrecord_datings', ['contextrecord_id', 'dating_id']) - - # Adding model 'ContextRecordSource' - db.create_table('archaeological_context_records_contextrecordsource', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), - ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), - ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), - ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('context_record', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_context_records.ContextRecord'])), - )) - db.send_create_signal('archaeological_context_records', ['ContextRecordSource']) - - # Adding M2M table for field authors on 'ContextRecordSource' - db.create_table('archaeological_context_records_contextrecordsource_authors', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('contextrecordsource', models.ForeignKey(orm['archaeological_context_records.contextrecordsource'], null=False)), - ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) - )) - db.create_unique('archaeological_context_records_contextrecordsource_authors', ['contextrecordsource_id', 'author_id']) - - - def backwards(self, orm): - # Deleting model 'DatingType' - db.delete_table('archaeological_context_records_datingtype') - - # Deleting model 'DatingQuality' - db.delete_table('archaeological_context_records_datingquality') - - # Deleting model 'Dating' - db.delete_table('archaeological_context_records_dating') - - # Deleting model 'Unit' - db.delete_table('archaeological_context_records_unit') - - # Deleting model 'ActivityType' - db.delete_table('archaeological_context_records_activitytype') - - # Deleting model 'IdentificationType' - db.delete_table('archaeological_context_records_identificationtype') - - # Deleting model 'HistoricalContextRecord' - db.delete_table('archaeological_context_records_historicalcontextrecord') - - # Deleting model 'ContextRecord' - db.delete_table('archaeological_context_records_contextrecord') - - # Removing M2M table for field datings on 'ContextRecord' - db.delete_table('archaeological_context_records_contextrecord_datings') - - # Deleting model 'ContextRecordSource' - db.delete_table('archaeological_context_records_contextrecordsource') - - # Removing M2M table for field authors on 'ContextRecordSource' - db.delete_table('archaeological_context_records_contextrecordsource_authors') - - - models = { - 'archaeological_context_records.activitytype': { - 'Meta': {'object_name': 'ActivityType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_context_records.contextrecord': { - 'Meta': {'object_name': 'ContextRecord'}, - 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), - 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), - 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.contextrecordsource': { - 'Meta': {'object_name': 'ContextRecordSource'}, - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), - 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) - }, - 'archaeological_context_records.dating': { - 'Meta': {'object_name': 'Dating'}, - 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), - 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.datingquality': { - 'Meta': {'object_name': 'DatingQuality'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_context_records.datingtype': { - 'Meta': {'object_name': 'DatingType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_context_records.historicalcontextrecord': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, - 'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.identificationtype': { - 'Meta': {'object_name': 'IdentificationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_context_records.unit': { - 'Meta': {'object_name': 'Unit'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_files.file': { - 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), - 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'object_name': 'FileType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'object_name': 'PermitType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'object_name': 'Operation'}, - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operationtype': { - 'Meta': {'object_name': 'OperationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'object_name': 'Parcel'}, - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.period': { - 'Meta': {'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'object_name': 'RemainType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'ishtar_common.arrondissement': { - 'Meta': {'object_name': 'Arrondissement'}, - 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.author': { - 'Meta': {'object_name': 'Author'}, - 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}) - }, - 'ishtar_common.authortype': { - 'Meta': {'object_name': 'AuthorType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ishtar_common.canton': { - 'Meta': {'object_name': 'Canton'}, - 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.department': { - 'Meta': {'ordering': "['number']", 'object_name': 'Department'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) - }, - 'ishtar_common.organization': { - 'Meta': {'object_name': 'Organization'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.organizationtype': { - 'Meta': {'object_name': 'OrganizationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ishtar_common.person': { - 'Meta': {'object_name': 'Person'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'person_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.PersonType']"}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'surname': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.persontype': { - 'Meta': {'object_name': 'PersonType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'rights': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.WizardStep']", 'symmetrical': 'False'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ishtar_common.sourcetype': { - 'Meta': {'object_name': 'SourceType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ishtar_common.town': { - 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, - 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), - 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), - 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.wizard': { - 'Meta': {'ordering': "['url_name']", 'object_name': 'Wizard'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'url_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - 'ishtar_common.wizardstep': { - 'Meta': {'ordering': "['wizard', 'order']", 'object_name': 'WizardStep'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'url_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'wizard': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Wizard']"}) - } - } - - complete_apps = ['archaeological_context_records']
\ No newline at end of file + operations = [ + migrations.CreateModel( + name='RecordRelationView', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + 'db_table': 'record_relations', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ActivityType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(verbose_name='Order')), + ], + options={ + 'ordering': ('order',), + 'verbose_name': 'Activity Type', + 'verbose_name_plural': 'Activity Types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ContextRecord', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('label', models.CharField(max_length=200, verbose_name='ID')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='General comment', blank=True)), + ('opening_date', models.DateField(null=True, verbose_name="Date d'ouverture", blank=True)), + ('closing_date', models.DateField(null=True, verbose_name='End date', blank=True)), + ('length', models.FloatField(null=True, verbose_name='Length (m)', blank=True)), + ('width', models.FloatField(null=True, verbose_name='Width (m)', blank=True)), + ('thickness', models.FloatField(null=True, verbose_name='Thickness (m)', blank=True)), + ('diameter', models.FloatField(null=True, verbose_name='Diameter (m)', blank=True)), + ('depth', models.FloatField(null=True, verbose_name='Depth (m)', blank=True)), + ('depth_of_appearance', models.FloatField(null=True, verbose_name='Depth of appearance (m)', blank=True)), + ('location', models.TextField(help_text='A short description of the location of the context record', null=True, verbose_name='Location', blank=True)), + ('datings_comment', models.TextField(null=True, verbose_name='Comment on datings', blank=True)), + ('filling', models.TextField(null=True, verbose_name='Filling', blank=True)), + ('interpretation', models.TextField(null=True, verbose_name='Interpretation', blank=True)), + ('taq', models.IntegerField(help_text='"Terminus Ante Quem" the context record can\'t have been created after this date', null=True, verbose_name='TAQ', blank=True)), + ('taq_estimated', models.IntegerField(help_text='Estimation of a "Terminus Ante Quem"', null=True, verbose_name='Estimated TAQ', blank=True)), + ('tpq', models.IntegerField(help_text='"Terminus Post Quem" the context record can\'t have been created before this date', null=True, verbose_name='TPQ', blank=True)), + ('tpq_estimated', models.IntegerField(help_text='Estimation of a "Terminus Post Quem"', null=True, verbose_name='Estimated TPQ', blank=True)), + ('point', django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point', blank=True)), + ('polygon', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, verbose_name='Polygon', blank=True)), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', blank=True)), + ], + options={ + 'ordering': ('cached_label',), + 'verbose_name': 'Context Record', + 'verbose_name_plural': 'Context Record', + 'permissions': (('view_contextrecord', "Peut voir toutes les Unit\xe9s d'Enregistrement"), ('view_own_contextrecord', "Peut voir sa propre Unit\xe9 d'Enregistrement"), ('add_own_contextrecord', "Peut ajouter sa propre Unit\xe9 d'Enregistrement"), ('change_own_contextrecord', "Peut modifier sa propre Unit\xe9 d'Enregistrement"), ('delete_own_contextrecord', "Peut supprimer sa propre Unit\xe9 d'Enregistrement")), + }, + bases=(models.Model, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter, ishtar_common.models.ShortMenuItem), + ), + migrations.CreateModel( + name='ContextRecordSource', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('image', models.ImageField(max_length=255, null=True, upload_to=b'upload/', blank=True)), + ('thumbnail', models.ImageField(max_length=255, null=True, upload_to=b'upload/thumbs/', blank=True)), + ('title', models.CharField(max_length=300, verbose_name='Title')), + ('external_id', models.TextField(max_length=300, null=True, verbose_name='External ID', blank=True)), + ('scale', models.CharField(max_length=30, null=True, verbose_name='Scale', blank=True)), + ('associated_url', models.URLField(null=True, verbose_name='Numerical ressource (web address)', blank=True)), + ('receipt_date', models.DateField(null=True, verbose_name='Receipt date', blank=True)), + ('creation_date', models.DateField(null=True, verbose_name='Creation date', blank=True)), + ('receipt_date_in_documentation', models.DateField(null=True, verbose_name='Receipt date in documentation', blank=True)), + ('item_number', models.IntegerField(default=1, verbose_name='Item number')), + ('reference', models.CharField(max_length=100, null=True, verbose_name='Ref.', blank=True)), + ('internal_reference', models.CharField(max_length=100, null=True, verbose_name='Internal ref.', blank=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('additional_information', models.TextField(null=True, verbose_name='Additional information', blank=True)), + ('duplicate', models.BooleanField(default=False, verbose_name='Has a duplicate')), + ], + options={ + 'verbose_name': 'Context record documentation', + 'verbose_name_plural': 'Context record documentations', + 'permissions': (('view_contextrecordsource', 'Can view all Context record sources'), ('view_own_contextrecordsource', 'Can view own Context record source'), ('add_own_contextrecordsource', 'Can add own Context record source'), ('change_own_contextrecordsource', 'Can change own Context record source'), ('delete_own_contextrecordsource', 'Can delete own Context record source')), + }, + bases=(ishtar_common.models.OwnPerms, models.Model), + ), + migrations.CreateModel( + name='Dating', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('start_date', models.IntegerField(null=True, verbose_name='Start date', blank=True)), + ('end_date', models.IntegerField(null=True, verbose_name='End date', blank=True)), + ('precise_dating', models.TextField(null=True, verbose_name='Precise dating', blank=True)), + ], + options={ + 'verbose_name': 'Dating', + 'verbose_name_plural': 'Datings', + }, + ), + migrations.CreateModel( + name='DatingQuality', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Dating quality type', + 'verbose_name_plural': 'Dating quality types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='DatingType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Dating type', + 'verbose_name_plural': 'Dating types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='DocumentationType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Documentation type', + 'verbose_name_plural': 'Documentation types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ExcavationTechnicType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Excavation technique type', + 'verbose_name_plural': 'Excavation technique types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='HistoricalContextRecord', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('image', models.TextField(max_length=255, null=True, blank=True)), + ('thumbnail', models.TextField(max_length=255, null=True, blank=True)), + ('external_id', models.TextField(null=True, verbose_name='External ID', blank=True)), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('label', models.CharField(max_length=200, verbose_name='ID')), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('comment', models.TextField(null=True, verbose_name='General comment', blank=True)), + ('opening_date', models.DateField(null=True, verbose_name="Date d'ouverture", blank=True)), + ('closing_date', models.DateField(null=True, verbose_name='End date', blank=True)), + ('length', models.FloatField(null=True, verbose_name='Length (m)', blank=True)), + ('width', models.FloatField(null=True, verbose_name='Width (m)', blank=True)), + ('thickness', models.FloatField(null=True, verbose_name='Thickness (m)', blank=True)), + ('diameter', models.FloatField(null=True, verbose_name='Diameter (m)', blank=True)), + ('depth', models.FloatField(null=True, verbose_name='Depth (m)', blank=True)), + ('depth_of_appearance', models.FloatField(null=True, verbose_name='Depth of appearance (m)', blank=True)), + ('location', models.TextField(help_text='A short description of the location of the context record', null=True, verbose_name='Location', blank=True)), + ('datings_comment', models.TextField(null=True, verbose_name='Comment on datings', blank=True)), + ('filling', models.TextField(null=True, verbose_name='Filling', blank=True)), + ('interpretation', models.TextField(null=True, verbose_name='Interpretation', blank=True)), + ('taq', models.IntegerField(help_text='"Terminus Ante Quem" the context record can\'t have been created after this date', null=True, verbose_name='TAQ', blank=True)), + ('taq_estimated', models.IntegerField(help_text='Estimation of a "Terminus Ante Quem"', null=True, verbose_name='Estimated TAQ', blank=True)), + ('tpq', models.IntegerField(help_text='"Terminus Post Quem" the context record can\'t have been created before this date', null=True, verbose_name='TPQ', blank=True)), + ('tpq_estimated', models.IntegerField(help_text='Estimation of a "Terminus Post Quem"', null=True, verbose_name='Estimated TPQ', blank=True)), + ('point', django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point', blank=True)), + ('polygon', django.contrib.gis.db.models.fields.PolygonField(srid=4326, null=True, verbose_name='Polygon', blank=True)), + ('cached_label', models.TextField(null=True, verbose_name='Cached name', blank=True)), + ('history_id', models.AutoField(serialize=False, primary_key=True)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), + ('activity', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.ActivityType', null=True)), + ('excavation_technic', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.ExcavationTechnicType', null=True)), + ('history_creator', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('history_modifier', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ('history_user', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical Context Record', + }, + ), + migrations.CreateModel( + name='IdentificationType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(verbose_name='Order')), + ], + options={ + 'ordering': ('order', 'label'), + 'verbose_name': 'Identification Type', + 'verbose_name_plural': 'Identification Types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='RecordRelations', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('left_record', models.ForeignKey(related_name='right_relations', to='archaeological_context_records.ContextRecord')), + ], + options={ + 'verbose_name': 'Record relation', + 'verbose_name_plural': 'Record relations', + }, + bases=(ishtar_common.models.GeneralRecordRelations, models.Model), + ), + migrations.CreateModel( + name='RelationType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=1, verbose_name='Order')), + ('symmetrical', models.BooleanField(verbose_name='Symmetrical')), + ('tiny_label', models.CharField(max_length=50, null=True, verbose_name='Tiny label', blank=True)), + ('inverse_relation', models.ForeignKey(verbose_name='Inverse relation', blank=True, to='archaeological_context_records.RelationType', null=True)), + ], + options={ + 'ordering': ('order', 'label'), + 'verbose_name': 'Relation type', + 'verbose_name_plural': 'Relation types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Unit', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=100, verbose_name='Label')), + ('txt_idx', models.CharField(unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])), + ('comment', models.TextField(null=True, verbose_name='Comment', blank=True)), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(verbose_name='Order')), + ('parent', models.ForeignKey(verbose_name='Parent context record type', blank=True, to='archaeological_context_records.Unit', null=True)), + ], + options={ + 'ordering': ('order', 'label'), + 'verbose_name': 'Context record Type', + 'verbose_name_plural': 'Context record Types', + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.AddField( + model_name='recordrelations', + name='relation_type', + field=models.ForeignKey(to='archaeological_context_records.RelationType'), + ), + migrations.AddField( + model_name='recordrelations', + name='right_record', + field=models.ForeignKey(related_name='left_relations', to='archaeological_context_records.ContextRecord'), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='identification', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.IdentificationType', null=True), + ), + ] diff --git a/archaeological_context_records/migrations/0002_auto_20170414_2123.py b/archaeological_context_records/migrations/0002_auto_20170414_2123.py new file mode 100644 index 000000000..ba54b3e65 --- /dev/null +++ b/archaeological_context_records/migrations/0002_auto_20170414_2123.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0001_initial'), + ('archaeological_context_records', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='historicalcontextrecord', + name='operation', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_operations.Operation', null=True), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='parcel', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_operations.Parcel', null=True), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='unit', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='archaeological_context_records.Unit', null=True), + ), + migrations.AddField( + model_name='dating', + name='dating_type', + field=models.ForeignKey(verbose_name='Dating type', blank=True, to='archaeological_context_records.DatingType', null=True), + ), + migrations.AddField( + model_name='dating', + name='period', + field=models.ForeignKey(verbose_name='Period', to='archaeological_operations.Period'), + ), + migrations.AddField( + model_name='dating', + name='quality', + field=models.ForeignKey(verbose_name='Quality', blank=True, to='archaeological_context_records.DatingQuality', null=True), + ), + ] diff --git a/archaeological_context_records/migrations/0003_auto_20170414_2123.py b/archaeological_context_records/migrations/0003_auto_20170414_2123.py new file mode 100644 index 000000000..87bc70ebb --- /dev/null +++ b/archaeological_context_records/migrations/0003_auto_20170414_2123.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0001_initial'), + ('archaeological_context_records', '0002_auto_20170414_2123'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('ishtar_common', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='contextrecordsource', + name='authors', + field=models.ManyToManyField(related_name='contextrecordsource_related', verbose_name='Authors', to='ishtar_common.Author'), + ), + migrations.AddField( + model_name='contextrecordsource', + name='context_record', + field=models.ForeignKey(related_name='source', verbose_name='Context record', to='archaeological_context_records.ContextRecord'), + ), + migrations.AddField( + model_name='contextrecordsource', + name='format_type', + field=models.ForeignKey(verbose_name='Format', blank=True, to='ishtar_common.Format', null=True), + ), + migrations.AddField( + model_name='contextrecordsource', + name='source_type', + field=models.ForeignKey(verbose_name='Type', to='ishtar_common.SourceType'), + ), + migrations.AddField( + model_name='contextrecordsource', + name='support_type', + field=models.ForeignKey(verbose_name='Support', blank=True, to='ishtar_common.SupportType', null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='activity', + field=models.ForeignKey(verbose_name='Activity', blank=True, to='archaeological_context_records.ActivityType', null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='datings', + field=models.ManyToManyField(related_name='context_records', to='archaeological_context_records.Dating'), + ), + migrations.AddField( + model_name='contextrecord', + name='documentations', + field=models.ManyToManyField(to='archaeological_context_records.DocumentationType', blank=True), + ), + migrations.AddField( + model_name='contextrecord', + name='excavation_technic', + field=models.ForeignKey(verbose_name='Excavation technique', blank=True, to='archaeological_context_records.ExcavationTechnicType', null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='history_creator', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Creator', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='history_modifier', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Last editor', blank=True, to=settings.AUTH_USER_MODEL, null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='identification', + field=models.ForeignKey(verbose_name='Identification', blank=True, to='archaeological_context_records.IdentificationType', null=True), + ), + migrations.AddField( + model_name='contextrecord', + name='imports', + field=models.ManyToManyField(related_name='imported_archaeological_context_records_contextrecord', to='ishtar_common.Import', blank=True), + ), + migrations.AddField( + model_name='contextrecord', + name='operation', + field=models.ForeignKey(related_name='context_record', verbose_name='Operation', to='archaeological_operations.Operation'), + ), + migrations.AddField( + model_name='contextrecord', + name='parcel', + field=models.ForeignKey(related_name='context_record', verbose_name='Parcel', to='archaeological_operations.Parcel'), + ), + migrations.AddField( + model_name='contextrecord', + name='related_context_records', + field=models.ManyToManyField(to='archaeological_context_records.ContextRecord', through='archaeological_context_records.RecordRelations', blank=True), + ), + migrations.AddField( + model_name='contextrecord', + name='unit', + field=models.ForeignKey(related_name='+', verbose_name='Context record type', blank=True, to='archaeological_context_records.Unit', null=True), + ), + ] diff --git a/archaeological_context_records/migrations/0004_views.py b/archaeological_context_records/migrations/0004_views.py new file mode 100644 index 000000000..77116ef85 --- /dev/null +++ b/archaeological_context_records/migrations/0004_views.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations +from archaeological_context_records.models import RecordRelationView, CRBulkView + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0003_auto_20170414_2123'), + ] + + operations = [ + migrations.RunSQL(RecordRelationView.CREATE_SQL + + CRBulkView.CREATE_SQL), + ] diff --git a/archaeological_context_records/migrations/0005_auto_20170802_1557.py b/archaeological_context_records/migrations/0005_auto_20170802_1557.py new file mode 100644 index 000000000..3e4f9028b --- /dev/null +++ b/archaeological_context_records/migrations/0005_auto_20170802_1557.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0004_views'), + ] + + operations = [ + migrations.AlterModelOptions( + name='contextrecord', + options={'ordering': ('cached_label',), 'verbose_name': 'Context Record', 'verbose_name_plural': 'Context Record', 'permissions': (('view_contextrecord', 'Can view all Context Records'), ('view_own_contextrecord', 'Can view own Context Record'), ('add_own_contextrecord', 'Can add own Context Record'), ('change_own_contextrecord', 'Can change own Context Record'), ('delete_own_contextrecord', 'Can delete own Context Record'))}, + ), + migrations.AlterField( + model_name='contextrecord', + name='closing_date', + field=models.DateField(null=True, verbose_name='Closing date', blank=True), + ), + migrations.AlterField( + model_name='contextrecord', + name='opening_date', + field=models.DateField(null=True, verbose_name='Opening date', blank=True), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='closing_date', + field=models.DateField(null=True, verbose_name='Closing date', blank=True), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='opening_date', + field=models.DateField(null=True, verbose_name='Opening date', blank=True), + ), + ] diff --git a/archaeological_context_records/migrations/0006_auto_20170804_1741.py b/archaeological_context_records/migrations/0006_auto_20170804_1741.py new file mode 100644 index 000000000..1286c1e07 --- /dev/null +++ b/archaeological_context_records/migrations/0006_auto_20170804_1741.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.contrib.gis.db.models.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0005_auto_20170802_1557'), + ] + + operations = [ + migrations.AddField( + model_name='contextrecord', + name='point_2d', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, verbose_name='Point (2D)', blank=True), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='point_2d', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, null=True, verbose_name='Point (2D)', blank=True), + ), + ] diff --git a/archaeological_context_records/migrations/0007_auto_20170804_2024.py b/archaeological_context_records/migrations/0007_auto_20170804_2024.py new file mode 100644 index 000000000..b6d8be87c --- /dev/null +++ b/archaeological_context_records/migrations/0007_auto_20170804_2024.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import re +import django.contrib.gis.db.models.fields +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0006_auto_20170804_1741'), + ] + + operations = [ + migrations.AlterField( + model_name='activitytype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='contextrecord', + name='point', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point (3D)', blank=True), + ), + migrations.AlterField( + model_name='datingquality', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='datingtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='documentationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='excavationtechnictype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='historicalcontextrecord', + name='point', + field=django.contrib.gis.db.models.fields.PointField(srid=4326, dim=3, null=True, verbose_name='Point (3D)', blank=True), + ), + migrations.AlterField( + model_name='identificationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='relationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + migrations.AlterField( + model_name='unit', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, max_length=100, verbose_name='Textual ID', validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+$'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')]), + ), + ] diff --git a/archaeological_context_records/migrations/0008_auto_20170826_1152.py b/archaeological_context_records/migrations/0008_auto_20170826_1152.py new file mode 100644 index 000000000..6c9cb4837 --- /dev/null +++ b/archaeological_context_records/migrations/0008_auto_20170826_1152.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-26 11:52 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0007_auto_20170804_2024'), + ] + + operations = [ + migrations.AlterField( + model_name='activitytype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='datingquality', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='datingtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='documentationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='excavationtechnictype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='identificationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='relationtype', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + migrations.AlterField( + model_name='unit', + name='txt_idx', + field=models.CharField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID'), + ), + ] diff --git a/archaeological_context_records/migrations/0009_auto_20170829_1639.py b/archaeological_context_records/migrations/0009_auto_20170829_1639.py new file mode 100644 index 000000000..25df86eb4 --- /dev/null +++ b/archaeological_context_records/migrations/0009_auto_20170829_1639.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-08-29 16:39 +from __future__ import unicode_literals + +from django.db import migrations, models +import ishtar_common.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0008_auto_20170826_1152'), + ] + + operations = [ + migrations.AlterField( + model_name='contextrecord', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='contextrecord', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='contextrecordsource', + name='image', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + migrations.AlterField( + model_name='contextrecordsource', + name='thumbnail', + field=models.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path), + ), + ] diff --git a/archaeological_context_records/migrations/0034_auto__chg_field_contextrecordsource_external_id.py b/archaeological_context_records/migrations/0034_auto__chg_field_contextrecordsource_external_id.py deleted file mode 100644 index 1c8348bbd..000000000 --- a/archaeological_context_records/migrations/0034_auto__chg_field_contextrecordsource_external_id.py +++ /dev/null @@ -1,681 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'ContextRecordSource.external_id' - db.alter_column('archaeological_context_records_contextrecordsource', 'external_id', self.gf('django.db.models.fields.TextField')(max_length=300, null=True)) - - def backwards(self, orm): - - # Changing field 'ContextRecordSource.external_id' - db.alter_column('archaeological_context_records_contextrecordsource', 'external_id', self.gf('django.db.models.fields.CharField')(max_length=12, null=True)) - - models = { - 'archaeological_context_records.activitytype': { - 'Meta': {'ordering': "('order',)", 'object_name': 'ActivityType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.contextrecord': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'ContextRecord'}, - 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), - 'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'documentations': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.DocumentationType']", 'null': 'True', 'blank': 'True'}), - 'excavation_technic': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ExcavationTechnicType']", 'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_context_records_contextrecord'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), - 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), - 'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), - 'related_context_records': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_context_records.ContextRecord']", 'null': 'True', 'through': "orm['archaeological_context_records.RecordRelations']", 'blank': 'True'}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), - 'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.contextrecordsource': { - 'Meta': {'object_name': 'ContextRecordSource'}, - 'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'contextrecordsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), - 'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) - }, - 'archaeological_context_records.dating': { - 'Meta': {'object_name': 'Dating'}, - 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), - 'precise_dating': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.datingquality': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DatingQuality'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.datingtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DatingType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.documentationtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'DocumentationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.excavationtechnictype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'ExcavationTechnicType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.historicalcontextrecord': { - 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, - 'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'closing_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'datings_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'depth': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'depth_of_appearance': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'diameter': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_technic_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'length': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'opening_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'dim': '3', 'null': 'True', 'blank': 'True'}), - 'polygon': ('django.contrib.gis.db.models.fields.PolygonField', [], {'null': 'True', 'blank': 'True'}), - 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thickness': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'width': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_context_records.identificationtype': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'IdentificationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.recordrelations': { - 'Meta': {'object_name': 'RecordRelations'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']"}), - 'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_context_records.ContextRecord']"}) - }, - 'archaeological_context_records.recordrelationview': { - 'Meta': {'unique_together': "(('id', 'right_record'),)", 'object_name': 'RecordRelationView', 'db_table': "'record_relations'", 'managed': 'False'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}), - 'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.RelationType']"}), - 'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'on_delete': 'models.DO_NOTHING', 'to': "orm['archaeological_context_records.ContextRecord']"}) - }, - 'archaeological_context_records.relationtype': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'RelationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.RelationType']", 'null': 'True', 'blank': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_context_records.unit': { - 'Meta': {'ordering': "('order', 'label')", 'object_name': 'Unit'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_files.file': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), - 'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), - 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), - 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), - 'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), - 'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), - 'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), - 'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), - 'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'total_developed_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'total_surface': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'default': '2017'}) - }, - 'archaeological_files.filetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_files.permittype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_files.saisinetype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.archaeologicalsite': { - 'Meta': {'object_name': 'ArchaeologicalSite'}, - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.operation': { - 'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, - 'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'code_patriarche': ('django.db.models.fields.TextField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'operation_collaborator'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Person']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), - 'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'finds_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), - 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), - 'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), - 'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), - 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'point': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}), - 'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), - 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), - 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), - 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), - 'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.parcel': { - 'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), - 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), - 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), - 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'archaeological_operations.period': { - 'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'end_date': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), - 'start_date': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.remaintype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'archaeological_operations.reportstate': { - 'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'ishtar_common.arrondissement': { - 'Meta': {'object_name': 'Arrondissement'}, - 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.author': { - 'Meta': {'ordering': "('author_type__order', 'person__name')", 'object_name': 'Author'}, - 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) - }, - 'ishtar_common.authortype': { - 'Meta': {'ordering': "['order', 'label']", 'object_name': 'AuthorType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.canton': { - 'Meta': {'object_name': 'Canton'}, - 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - 'ishtar_common.department': { - 'Meta': {'ordering': "['number']", 'object_name': 'Department'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}), - 'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.format': { - 'Meta': {'ordering': "['label']", 'object_name': 'Format'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.import': { - 'Meta': {'object_name': 'Import'}, - 'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}), - 'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}), - 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), - 'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) - }, - 'ishtar_common.importermodel': { - 'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}) - }, - 'ishtar_common.importertype': { - 'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'}, - 'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}), - 'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.ishtaruser': { - 'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, - 'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), - 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'ishtar_common.operationtype': { - 'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.organization': { - 'Meta': {'object_name': 'Organization'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), - 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), - 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}), - 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.organizationtype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.person': { - 'Meta': {'object_name': 'Person'}, - 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), - 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), - 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), - 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), - 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), - 'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), - 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}), - 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) - }, - 'ishtar_common.persontype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.sourcetype': { - 'Meta': {'ordering': "['label']", 'object_name': 'SourceType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.state': { - 'Meta': {'ordering': "['number']", 'object_name': 'State'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) - }, - 'ishtar_common.supporttype': { - 'Meta': {'object_name': 'SupportType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.titletype': { - 'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, - 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'ishtar_common.town': { - 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, - 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), - 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), - 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_town'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), - 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['archaeological_context_records']
\ No newline at end of file diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index f5df4e5ec..2f02ed9df 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -17,6 +17,8 @@ # See the file COPYING for details. +import time + from django.conf import settings from django.contrib.gis.db import models from django.core.urlresolvers import reverse @@ -24,13 +26,14 @@ from django.db import connection, transaction from django.db.models import Q from django.db.models.signals import post_delete, post_save from django.utils.translation import ugettext_lazy as _, ugettext, pgettext +from django.utils.text import slugify from ishtar_common.utils import cached_label_changed from ishtar_common.models import GeneralType, BaseHistorizedItem, \ HistoricalRecords, OwnPerms, ShortMenuItem, Source, GeneralRelationType,\ - GeneralRecordRelations, post_delete_record_relation, get_external_id, \ - ImageModel, post_save_cache, ValueGetter + GeneralRecordRelations, post_delete_record_relation, \ + ImageModel, post_save_cache, ValueGetter, BulkUpdatedItem from archaeological_operations.models import Operation, Period, Parcel @@ -74,6 +77,20 @@ class Dating(models.Model): return unicode(self.period) return u"%s (%s-%s)" % (self.period, start_date, end_date) + def context_records_lbl(self): + return u" - ".join( + [cr.cached_label for cr in self.context_records.all()] + ) + context_records_lbl.short_description = _(u"Context record") + context_records_lbl.admin_order_field = "context_records__cached_label" + + def finds_lbl(self): + return u" - ".join( + [f.cached_label for f in self.find.all()] + ) + finds_lbl.short_description = _(u"Find") + finds_lbl.admin_order_field = "find__cached_label" + @classmethod def fix_dating_association(cls, obj): """ @@ -172,10 +189,12 @@ class CRBulkView(object): """ -class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, - ValueGetter, ShortMenuItem): +class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, + ImageModel, OwnPerms, ValueGetter, ShortMenuItem): SHOW_URL = 'show-contextrecord' SLUG = 'contextrecord' + EXTERNAL_ID_KEY = 'context_record_external_id' + EXTERNAL_ID_DEPENDENCIES = ['base_finds'] TABLE_COLS = ['label', 'operation__common_name', 'parcel__town__name', 'parcel__label', 'unit'] if settings.COUNTRY == 'fr': @@ -199,7 +218,6 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, 'related_context_records': 'detailled_related_context_records' } } - IMAGE_PREFIX = 'context_records/' # search parameters EXTRA_REQUEST_KEYS = { @@ -248,9 +266,8 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, _(u"Location"), blank=True, null=True, help_text=_(u"A short description of the location of the context " u"record")) - datings = models.ManyToManyField(Dating) - documentations = models.ManyToManyField(DocumentationType, blank=True, - null=True) + datings = models.ManyToManyField(Dating, related_name='context_records') + documentations = models.ManyToManyField(DocumentationType, blank=True) datings_comment = models.TextField(_(u"Comment on datings"), blank=True, null=True) unit = models.ForeignKey(Unit, verbose_name=_(u"Context record type"), @@ -281,8 +298,9 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ExcavationTechnicType, blank=True, null=True, verbose_name=_(u"Excavation technique")) related_context_records = models.ManyToManyField( - 'ContextRecord', through='RecordRelations', blank=True, null=True) - point = models.PointField(_(u"Point"), blank=True, null=True, dim=3) + 'ContextRecord', through='RecordRelations', blank=True) + point_2d = models.PointField(_(u"Point (2D)"), blank=True, null=True) + point = models.PointField(_(u"Point (3D)"), blank=True, null=True, dim=3) polygon = models.PolygonField(_(u"Polygon"), blank=True, null=True) cached_label = models.TextField(_(u"Cached name"), null=True, blank=True) history = HistoricalRecords() @@ -291,15 +309,11 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, verbose_name = _(u"Context Record") verbose_name_plural = _(u"Context Record") permissions = ( - ("view_contextrecord", ugettext(u"Can view all Context Records")), - ("view_own_contextrecord", - ugettext(u"Can view own Context Record")), - ("add_own_contextrecord", - ugettext(u"Can add own Context Record")), - ("change_own_contextrecord", - ugettext(u"Can change own Context Record")), - ("delete_own_contextrecord", - ugettext(u"Can delete own Context Record")), + ("view_contextrecord", u"Can view all Context Records"), + ("view_own_contextrecord", u"Can view own Context Record"), + ("add_own_contextrecord", u"Can add own Context Record"), + ("change_own_contextrecord", u"Can change own Context Record"), + ("delete_own_contextrecord", u"Can delete own Context Record"), ) ordering = ('cached_label',) @@ -315,7 +329,13 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, return self.short_label @classmethod - def cached_label_bulk_update(cls, operation_id=None, parcel_id=None): + def cached_label_bulk_update(cls, operation_id=None, parcel_id=None, + transaction_id=None): + transaction_id, is_recursion = cls.bulk_recursion( + transaction_id, [operation_id, parcel_id]) + if is_recursion: + return + if operation_id: where = "operation_id = %s" args = [int(operation_id)] @@ -326,6 +346,8 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, kwargs = {'parcel_id': parcel_id} else: return + kwargs['transaction_id'] = transaction_id + sql = """ UPDATE "archaeological_context_records_contextrecord" AS cr SET cached_label = @@ -362,12 +384,10 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, """.format(main_ope_prefix=settings.ISHTAR_OPE_PREFIX, ope_prefix=settings.ISHTAR_DEF_OPE_PREFIX, join=settings.JOINT, where=where) - # with connection.cursor() as c: # django 1.8 - c = connection.cursor() - c.execute(sql, args) - transaction.commit_unless_managed() - cls._meta.get_field_by_name( - 'base_finds')[0].model.cached_label_bulk_update(**kwargs) + with connection.cursor() as c: + c.execute(sql, args) + cls._meta.get_field( + 'base_finds').related_model.cached_label_bulk_update(**kwargs) @property def short_label(self): @@ -379,11 +399,11 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, return reverse('show-contextrecord', args=[self.pk, '']) @classmethod - def get_query_owns(cls, user): - return (Q(operation__scientist=user.ishtaruser.person) | - Q(operation__in_charge=user.ishtaruser.person) | - Q(operation__collaborators__pk=user.ishtaruser.person.pk) | - Q(history_creator=user)) \ + def get_query_owns(cls, ishtaruser): + return (Q(operation__scientist=ishtaruser.person) | + Q(operation__in_charge=ishtaruser.person) | + Q(operation__collaborators__pk=ishtaruser.person.pk) | + Q(history_creator=ishtaruser.user_ptr)) \ & Q(operation__end_date__isnull=True) @classmethod @@ -429,6 +449,13 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, context_record_id=self.pk) return True + def _get_base_image_path(self): + ope = self.operation + return u"operation/{}/{}/{}/{}".format( + ope.year, ope.reference, self.SLUG, + slugify(self.label or u"00") + ) + @property def reference(self): if not self.operation: @@ -493,20 +520,6 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, from archaeological_finds.models import FindSource return FindSource.objects.filter(find__base_finds__context_record=self) - def save(self, *args, **kwargs): - returned = super(ContextRecord, self).save(*args, **kwargs) - updated = False - if not self.external_id or self.auto_external_id: - external_id = get_external_id('context_record_external_id', self) - if external_id != self.external_id: - updated = True - self.auto_external_id = True - self.external_id = external_id - if updated: - self._cached_label_checked = False - self.save() - return returned - def fix(self): """ Fix redundant m2m dating association (usually after imports) @@ -518,10 +531,6 @@ post_save.connect(cached_label_changed, sender=ContextRecord) class RelationType(GeneralRelationType): - inverse_relation = models.ForeignKey( - 'RelationType', verbose_name=_(u"Inverse relation"), blank=True, - null=True) - class Meta: verbose_name = _(u"Relation type") verbose_name_plural = _(u"Relation types") @@ -567,7 +576,7 @@ post_delete.connect(post_delete_record_relation, sender=RecordRelations) class RecordRelationView(models.Model): - """ + CREATE_SQL = """ CREATE VIEW record_relations AS SELECT DISTINCT right_record_id as id, right_record_id, @@ -579,6 +588,9 @@ class RecordRelationView(models.Model): CREATE RULE record_relations_del AS ON DELETE TO record_relations DO INSTEAD DELETE FROM record_relations where id=NULL; """ + DELETE_SQL = """ + DROP VIEW record_relations; + """ TABLE_COLS = [ "relation_type", "right_record__label", "right_record__unit", "right_record__parcel", @@ -648,15 +660,15 @@ class ContextRecordSource(Source): verbose_name_plural = _(u"Context record documentations") permissions = ( ("view_contextrecordsource", - ugettext(u"Can view all Context record sources")), + u"Can view all Context record sources"), ("view_own_contextrecordsource", - ugettext(u"Can view own Context record source")), + u"Can view own Context record source"), ("add_own_contextrecordsource", - ugettext(u"Can add own Context record source")), + u"Can add own Context record source"), ("change_own_contextrecordsource", - ugettext(u"Can change own Context record source")), + u"Can change own Context record source"), ("delete_own_contextrecordsource", - ugettext(u"Can delete own Context record source")), + u"Can delete own Context record source"), ) context_record = models.ForeignKey( ContextRecord, verbose_name=_(u"Context record"), @@ -674,3 +686,4 @@ class ContextRecordSource(Source): Q(context_record__operation__collaborators__pk= user.ishtaruser.person.pk)) \ & Q(context_record__operation__end_date__isnull=True) + diff --git a/archaeological_context_records/old_migrations/0001_initial.py b/archaeological_context_records/old_migrations/0001_initial.py new file mode 100644 index 000000000..599a6d4f7 --- /dev/null +++ b/archaeological_context_records/old_migrations/0001_initial.py @@ -0,0 +1,587 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'DatingType' + db.create_table('archaeological_context_records_datingtype', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + )) + db.send_create_signal('archaeological_context_records', ['DatingType']) + + # Adding model 'DatingQuality' + db.create_table('archaeological_context_records_datingquality', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + )) + db.send_create_signal('archaeological_context_records', ['DatingQuality']) + + # Adding model 'Dating' + db.create_table('archaeological_context_records_dating', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('period', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_operations.Period'])), + ('start_date', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('end_date', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('dating_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.DatingType'], null=True, blank=True)), + ('quality', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.DatingQuality'], null=True, blank=True)), + )) + db.send_create_signal('archaeological_context_records', ['Dating']) + + # Adding model 'Unit' + db.create_table('archaeological_context_records_unit', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.Unit'], null=True, blank=True)), + )) + db.send_create_signal('archaeological_context_records', ['Unit']) + + # Adding model 'ActivityType' + db.create_table('archaeological_context_records_activitytype', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + )) + db.send_create_signal('archaeological_context_records', ['ActivityType']) + + # Adding model 'IdentificationType' + db.create_table('archaeological_context_records_identificationtype', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('txt_idx', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), + ('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('available', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('order', self.gf('django.db.models.fields.IntegerField')()), + )) + db.send_create_signal('archaeological_context_records', ['IdentificationType']) + + # Adding model 'HistoricalContextRecord' + db.create_table('archaeological_context_records_historicalcontextrecord', ( + ('id', self.gf('django.db.models.fields.IntegerField')(db_index=True, blank=True)), + ('history_modifier_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('parcel_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('operation_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('thickness', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('depth', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('location', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), + ('unit_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('has_furniture', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('filling', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('interpretation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('taq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('taq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('tpq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('tpq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('identification_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('activity_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), + ('history_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('history_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('history_user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)), + ('history_type', self.gf('django.db.models.fields.CharField')(max_length=1)), + )) + db.send_create_signal('archaeological_context_records', ['HistoricalContextRecord']) + + # Adding model 'ContextRecord' + db.create_table('archaeological_context_records_contextrecord', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('history_modifier', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), + ('parcel', self.gf('django.db.models.fields.related.ForeignKey')(related_name='context_record', to=orm['archaeological_operations.Parcel'])), + ('operation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='context_record', to=orm['archaeological_operations.Operation'])), + ('label', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('length', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('width', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('thickness', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('depth', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('location', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), + ('unit', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['archaeological_context_records.Unit'])), + ('has_furniture', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)), + ('filling', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('interpretation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), + ('taq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('taq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('tpq', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('tpq_estimated', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('identification', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.IdentificationType'], null=True, blank=True)), + ('activity', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['archaeological_context_records.ActivityType'], null=True, blank=True)), + )) + db.send_create_signal('archaeological_context_records', ['ContextRecord']) + + # Adding M2M table for field datings on 'ContextRecord' + db.create_table('archaeological_context_records_contextrecord_datings', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('contextrecord', models.ForeignKey(orm['archaeological_context_records.contextrecord'], null=False)), + ('dating', models.ForeignKey(orm['archaeological_context_records.dating'], null=False)) + )) + db.create_unique('archaeological_context_records_contextrecord_datings', ['contextrecord_id', 'dating_id']) + + # Adding model 'ContextRecordSource' + db.create_table('archaeological_context_records_contextrecordsource', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), + ('source_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ishtar_common.SourceType'])), + ('associated_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), + ('receipt_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('creation_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + ('context_record', self.gf('django.db.models.fields.related.ForeignKey')(related_name='source', to=orm['archaeological_context_records.ContextRecord'])), + )) + db.send_create_signal('archaeological_context_records', ['ContextRecordSource']) + + # Adding M2M table for field authors on 'ContextRecordSource' + db.create_table('archaeological_context_records_contextrecordsource_authors', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('contextrecordsource', models.ForeignKey(orm['archaeological_context_records.contextrecordsource'], null=False)), + ('author', models.ForeignKey(orm['ishtar_common.author'], null=False)) + )) + db.create_unique('archaeological_context_records_contextrecordsource_authors', ['contextrecordsource_id', 'author_id']) + + + def backwards(self, orm): + # Deleting model 'DatingType' + db.delete_table('archaeological_context_records_datingtype') + + # Deleting model 'DatingQuality' + db.delete_table('archaeological_context_records_datingquality') + + # Deleting model 'Dating' + db.delete_table('archaeological_context_records_dating') + + # Deleting model 'Unit' + db.delete_table('archaeological_context_records_unit') + + # Deleting model 'ActivityType' + db.delete_table('archaeological_context_records_activitytype') + + # Deleting model 'IdentificationType' + db.delete_table('archaeological_context_records_identificationtype') + + # Deleting model 'HistoricalContextRecord' + db.delete_table('archaeological_context_records_historicalcontextrecord') + + # Deleting model 'ContextRecord' + db.delete_table('archaeological_context_records_contextrecord') + + # Removing M2M table for field datings on 'ContextRecord' + db.delete_table('archaeological_context_records_contextrecord_datings') + + # Deleting model 'ContextRecordSource' + db.delete_table('archaeological_context_records_contextrecordsource') + + # Removing M2M table for field authors on 'ContextRecordSource' + db.delete_table('archaeological_context_records_contextrecordsource_authors') + + + models = { + 'archaeological_context_records.activitytype': { + 'Meta': {'object_name': 'ActivityType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_context_records.contextrecord': { + 'Meta': {'object_name': 'ContextRecord'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.ActivityType']", 'null': 'True', 'blank': 'True'}), + 'datings': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_context_records.Dating']", 'symmetrical': 'False'}), + 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'identification': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.IdentificationType']", 'null': 'True', 'blank': 'True'}), + 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Operation']"}), + 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'context_record'", 'to': "orm['archaeological_operations.Parcel']"}), + 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'unit': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['archaeological_context_records.Unit']"}), + 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_context_records.contextrecordsource': { + 'Meta': {'object_name': 'ContextRecordSource'}, + 'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Author']", 'symmetrical': 'False'}), + 'context_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_context_records.ContextRecord']"}), + 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) + }, + 'archaeological_context_records.dating': { + 'Meta': {'object_name': 'Dating'}, + 'dating_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingType']", 'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'period': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']"}), + 'quality': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.DatingQuality']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_context_records.datingquality': { + 'Meta': {'object_name': 'DatingQuality'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_context_records.datingtype': { + 'Meta': {'object_name': 'DatingType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_context_records.historicalcontextrecord': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalContextRecord'}, + 'activity_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'depth': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'filling': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'has_furniture': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), + 'identification_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'interpretation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'parcel_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'taq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'taq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'thickness': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'tpq_estimated': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'unit_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_context_records.identificationtype': { + 'Meta': {'object_name': 'IdentificationType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_context_records.unit': { + 'Meta': {'object_name': 'Unit'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_context_records.Unit']", 'null': 'True', 'blank': 'True'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_files.file': { + 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), + 'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.Person']"}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}), + 'numeric_reference': ('django.db.models.fields.IntegerField', [], {}), + 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), + 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), + 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), + 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'default': '2012'}) + }, + 'archaeological_files.filetype': { + 'Meta': {'object_name': 'FileType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_files.permittype': { + 'Meta': {'object_name': 'PermitType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_files.saisinetype': { + 'Meta': {'object_name': 'SaisineType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'delay': ('django.db.models.fields.IntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.operation': { + 'Meta': {'object_name': 'Operation'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {}), + 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), + 'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), + 'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'periods': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), + 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), + 'year': ('django.db.models.fields.IntegerField', [], {}), + 'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.operationtype': { + 'Meta': {'object_name': 'OperationType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.parcel': { + 'Meta': {'object_name': 'Parcel'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), + 'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6'}), + 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), + 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.period': { + 'Meta': {'object_name': 'Period'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'end_date': ('django.db.models.fields.IntegerField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), + 'start_date': ('django.db.models.fields.IntegerField', [], {}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.remaintype': { + 'Meta': {'object_name': 'RemainType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'ishtar_common.arrondissement': { + 'Meta': {'object_name': 'Arrondissement'}, + 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + 'ishtar_common.author': { + 'Meta': {'object_name': 'Author'}, + 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}) + }, + 'ishtar_common.authortype': { + 'Meta': {'object_name': 'AuthorType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.canton': { + 'Meta': {'object_name': 'Canton'}, + 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + 'ishtar_common.department': { + 'Meta': {'ordering': "['number']", 'object_name': 'Department'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) + }, + 'ishtar_common.organization': { + 'Meta': {'object_name': 'Organization'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.organizationtype': { + 'Meta': {'object_name': 'OrganizationType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.person': { + 'Meta': {'object_name': 'Person'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'email': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'person_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.PersonType']"}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'surname': ('django.db.models.fields.CharField', [], {'max_length': '20'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '2'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.persontype': { + 'Meta': {'object_name': 'PersonType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'rights': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.WizardStep']", 'symmetrical': 'False'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.sourcetype': { + 'Meta': {'object_name': 'SourceType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.town': { + 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, + 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), + 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), + 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.wizard': { + 'Meta': {'ordering': "['url_name']", 'object_name': 'Wizard'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'url_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) + }, + 'ishtar_common.wizardstep': { + 'Meta': {'ordering': "['wizard', 'order']", 'object_name': 'WizardStep'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'url_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'wizard': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Wizard']"}) + } + } + + complete_apps = ['archaeological_context_records']
\ No newline at end of file diff --git a/archaeological_context_records/migrations/0002_auto__add_field_contextrecordsource_reference__add_field_contextrecord.py b/archaeological_context_records/old_migrations/0002_auto__add_field_contextrecordsource_reference__add_field_contextrecord.py index 07be02460..07be02460 100644 --- a/archaeological_context_records/migrations/0002_auto__add_field_contextrecordsource_reference__add_field_contextrecord.py +++ b/archaeological_context_records/old_migrations/0002_auto__add_field_contextrecordsource_reference__add_field_contextrecord.py diff --git a/archaeological_context_records/migrations/0003_auto__add_field_contextrecord_history_creator__add_field_historicalcon.py b/archaeological_context_records/old_migrations/0003_auto__add_field_contextrecord_history_creator__add_field_historicalcon.py index e00de4865..e00de4865 100644 --- a/archaeological_context_records/migrations/0003_auto__add_field_contextrecord_history_creator__add_field_historicalcon.py +++ b/archaeological_context_records/old_migrations/0003_auto__add_field_contextrecord_history_creator__add_field_historicalcon.py diff --git a/archaeological_context_records/migrations/0004_init_history_creator.py b/archaeological_context_records/old_migrations/0004_init_history_creator.py index b231214a4..b231214a4 100644 --- a/archaeological_context_records/migrations/0004_init_history_creator.py +++ b/archaeological_context_records/old_migrations/0004_init_history_creator.py diff --git a/archaeological_context_records/migrations/0005_reinit_history_creator.py b/archaeological_context_records/old_migrations/0005_reinit_history_creator.py index 7e4f62200..7e4f62200 100644 --- a/archaeological_context_records/migrations/0005_reinit_history_creator.py +++ b/archaeological_context_records/old_migrations/0005_reinit_history_creator.py diff --git a/archaeological_context_records/migrations/0006_auto__chg_field_contextrecord_history_creator__chg_field_contextrecord.py b/archaeological_context_records/old_migrations/0006_auto__chg_field_contextrecord_history_creator__chg_field_contextrecord.py index 0d9a3b5da..0d9a3b5da 100644 --- a/archaeological_context_records/migrations/0006_auto__chg_field_contextrecord_history_creator__chg_field_contextrecord.py +++ b/archaeological_context_records/old_migrations/0006_auto__chg_field_contextrecord_history_creator__chg_field_contextrecord.py diff --git a/archaeological_context_records/migrations/0007_auto__add_relationtype__add_recordrelations.py b/archaeological_context_records/old_migrations/0007_auto__add_relationtype__add_recordrelations.py index c9c7d2842..c9c7d2842 100644 --- a/archaeological_context_records/migrations/0007_auto__add_relationtype__add_recordrelations.py +++ b/archaeological_context_records/old_migrations/0007_auto__add_relationtype__add_recordrelations.py diff --git a/archaeological_context_records/migrations/0008_auto__add_field_contextrecord_external_id__add_field_contextrecord_com.py b/archaeological_context_records/old_migrations/0008_auto__add_field_contextrecord_external_id__add_field_contextrecord_com.py index 133406cf1..133406cf1 100644 --- a/archaeological_context_records/migrations/0008_auto__add_field_contextrecord_external_id__add_field_contextrecord_com.py +++ b/archaeological_context_records/old_migrations/0008_auto__add_field_contextrecord_external_id__add_field_contextrecord_com.py diff --git a/archaeological_context_records/migrations/0009_auto__add_field_contextrecordsource_external_id.py b/archaeological_context_records/old_migrations/0009_auto__add_field_contextrecordsource_external_id.py index cc0b83c99..cc0b83c99 100644 --- a/archaeological_context_records/migrations/0009_auto__add_field_contextrecordsource_external_id.py +++ b/archaeological_context_records/old_migrations/0009_auto__add_field_contextrecordsource_external_id.py diff --git a/archaeological_context_records/migrations/0010_auto.py b/archaeological_context_records/old_migrations/0010_auto.py index f04e73c4c..f04e73c4c 100644 --- a/archaeological_context_records/migrations/0010_auto.py +++ b/archaeological_context_records/old_migrations/0010_auto.py diff --git a/archaeological_context_records/migrations/0011_auto__chg_field_datingtype_txt_idx__chg_field_datingquality_txt_idx__c.py b/archaeological_context_records/old_migrations/0011_auto__chg_field_datingtype_txt_idx__chg_field_datingquality_txt_idx__c.py index dec4559be..dec4559be 100644 --- a/archaeological_context_records/migrations/0011_auto__chg_field_datingtype_txt_idx__chg_field_datingquality_txt_idx__c.py +++ b/archaeological_context_records/old_migrations/0011_auto__chg_field_datingtype_txt_idx__chg_field_datingquality_txt_idx__c.py diff --git a/archaeological_context_records/migrations/0012_auto__add_field_dating_precise_dating.py b/archaeological_context_records/old_migrations/0012_auto__add_field_dating_precise_dating.py index 3bd640ea3..3bd640ea3 100644 --- a/archaeological_context_records/migrations/0012_auto__add_field_dating_precise_dating.py +++ b/archaeological_context_records/old_migrations/0012_auto__add_field_dating_precise_dating.py diff --git a/archaeological_context_records/migrations/0013_auto__add_field_contextrecordsource_duplicate__chg_field_contextrecord.py b/archaeological_context_records/old_migrations/0013_auto__add_field_contextrecordsource_duplicate__chg_field_contextrecord.py index 2bed4037f..2bed4037f 100644 --- a/archaeological_context_records/migrations/0013_auto__add_field_contextrecordsource_duplicate__chg_field_contextrecord.py +++ b/archaeological_context_records/old_migrations/0013_auto__add_field_contextrecordsource_duplicate__chg_field_contextrecord.py diff --git a/archaeological_context_records/migrations/0014_auto__add_field_contextrecordsource_receipt_date_in_documentation.py b/archaeological_context_records/old_migrations/0014_auto__add_field_contextrecordsource_receipt_date_in_documentation.py index 61649e977..61649e977 100644 --- a/archaeological_context_records/migrations/0014_auto__add_field_contextrecordsource_receipt_date_in_documentation.py +++ b/archaeological_context_records/old_migrations/0014_auto__add_field_contextrecordsource_receipt_date_in_documentation.py diff --git a/archaeological_context_records/migrations/0015_auto__add_field_contextrecord_point__add_field_contextrecord_polygon__.py b/archaeological_context_records/old_migrations/0015_auto__add_field_contextrecord_point__add_field_contextrecord_polygon__.py index ba49c8e49..ba49c8e49 100644 --- a/archaeological_context_records/migrations/0015_auto__add_field_contextrecord_point__add_field_contextrecord_polygon__.py +++ b/archaeological_context_records/old_migrations/0015_auto__add_field_contextrecord_point__add_field_contextrecord_polygon__.py diff --git a/archaeological_context_records/migrations/0016_auto__add_field_relationtype_short_label.py b/archaeological_context_records/old_migrations/0016_auto__add_field_relationtype_short_label.py index 022de2e93..022de2e93 100644 --- a/archaeological_context_records/migrations/0016_auto__add_field_relationtype_short_label.py +++ b/archaeological_context_records/old_migrations/0016_auto__add_field_relationtype_short_label.py diff --git a/archaeological_context_records/migrations/0017_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py b/archaeological_context_records/old_migrations/0017_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py index fb49cce27..fb49cce27 100644 --- a/archaeological_context_records/migrations/0017_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py +++ b/archaeological_context_records/old_migrations/0017_auto__del_field_relationtype_short_label__add_field_relationtype_tiny_.py diff --git a/archaeological_context_records/migrations/0018_auto__chg_field_contextrecord_external_id__chg_field_historicalcontext.py b/archaeological_context_records/old_migrations/0018_auto__chg_field_contextrecord_external_id__chg_field_historicalcontext.py index 0a5d3c569..0a5d3c569 100644 --- a/archaeological_context_records/migrations/0018_auto__chg_field_contextrecord_external_id__chg_field_historicalcontext.py +++ b/archaeological_context_records/old_migrations/0018_auto__chg_field_contextrecord_external_id__chg_field_historicalcontext.py diff --git a/archaeological_context_records/migrations/0019_auto__add_field_contextrecord_auto_external_id__add_field_historicalco.py b/archaeological_context_records/old_migrations/0019_auto__add_field_contextrecord_auto_external_id__add_field_historicalco.py index 8a0d056e3..8a0d056e3 100644 --- a/archaeological_context_records/migrations/0019_auto__add_field_contextrecord_auto_external_id__add_field_historicalco.py +++ b/archaeological_context_records/old_migrations/0019_auto__add_field_contextrecord_auto_external_id__add_field_historicalco.py diff --git a/archaeological_context_records/migrations/0020_auto__add_field_contextrecord_datings_comment__add_field_historicalcon.py b/archaeological_context_records/old_migrations/0020_auto__add_field_contextrecord_datings_comment__add_field_historicalcon.py index c4600591e..c4600591e 100644 --- a/archaeological_context_records/migrations/0020_auto__add_field_contextrecord_datings_comment__add_field_historicalcon.py +++ b/archaeological_context_records/old_migrations/0020_auto__add_field_contextrecord_datings_comment__add_field_historicalcon.py diff --git a/archaeological_context_records/migrations/0021_auto__chg_field_contextrecord_depth__chg_field_contextrecord_thickness.py b/archaeological_context_records/old_migrations/0021_auto__chg_field_contextrecord_depth__chg_field_contextrecord_thickness.py index c48d595a7..c48d595a7 100644 --- a/archaeological_context_records/migrations/0021_auto__chg_field_contextrecord_depth__chg_field_contextrecord_thickness.py +++ b/archaeological_context_records/old_migrations/0021_auto__chg_field_contextrecord_depth__chg_field_contextrecord_thickness.py diff --git a/archaeological_context_records/migrations/0022_auto__add_field_contextrecord_image__add_field_contextrecord_thumbnail.py b/archaeological_context_records/old_migrations/0022_auto__add_field_contextrecord_image__add_field_contextrecord_thumbnail.py index 616951092..616951092 100644 --- a/archaeological_context_records/migrations/0022_auto__add_field_contextrecord_image__add_field_contextrecord_thumbnail.py +++ b/archaeological_context_records/old_migrations/0022_auto__add_field_contextrecord_image__add_field_contextrecord_thumbnail.py diff --git a/archaeological_context_records/migrations/0023_clean_parcels.py b/archaeological_context_records/old_migrations/0023_clean_parcels.py index cd38a1deb..cd38a1deb 100644 --- a/archaeological_context_records/migrations/0023_clean_parcels.py +++ b/archaeological_context_records/old_migrations/0023_clean_parcels.py diff --git a/archaeological_context_records/migrations/0024_auto__add_field_contextrecord_cached_label__add_field_historicalcontex.py b/archaeological_context_records/old_migrations/0024_auto__add_field_contextrecord_cached_label__add_field_historicalcontex.py index 675326715..675326715 100644 --- a/archaeological_context_records/migrations/0024_auto__add_field_contextrecord_cached_label__add_field_historicalcontex.py +++ b/archaeological_context_records/old_migrations/0024_auto__add_field_contextrecord_cached_label__add_field_historicalcontex.py diff --git a/archaeological_context_records/migrations/0025_generate_cached_label.py b/archaeological_context_records/old_migrations/0025_generate_cached_label.py index 1c559b21a..1c559b21a 100644 --- a/archaeological_context_records/migrations/0025_generate_cached_label.py +++ b/archaeological_context_records/old_migrations/0025_generate_cached_label.py diff --git a/archaeological_context_records/migrations/0026_auto__chg_field_contextrecord_image__chg_field_contextrecord_thumbnail.py b/archaeological_context_records/old_migrations/0026_auto__chg_field_contextrecord_image__chg_field_contextrecord_thumbnail.py index d17c902c5..d17c902c5 100644 --- a/archaeological_context_records/migrations/0026_auto__chg_field_contextrecord_image__chg_field_contextrecord_thumbnail.py +++ b/archaeological_context_records/old_migrations/0026_auto__chg_field_contextrecord_image__chg_field_contextrecord_thumbnail.py diff --git a/archaeological_context_records/migrations/0027_view_record_relations.py b/archaeological_context_records/old_migrations/0027_view_record_relations.py index ebf4a1349..ebf4a1349 100644 --- a/archaeological_context_records/migrations/0027_view_record_relations.py +++ b/archaeological_context_records/old_migrations/0027_view_record_relations.py diff --git a/archaeological_context_records/migrations/0028_auto__chg_field_contextrecord_location__chg_field_historicalcontextrec.py b/archaeological_context_records/old_migrations/0028_auto__chg_field_contextrecord_location__chg_field_historicalcontextrec.py index ef2c330cb..ef2c330cb 100644 --- a/archaeological_context_records/migrations/0028_auto__chg_field_contextrecord_location__chg_field_historicalcontextrec.py +++ b/archaeological_context_records/old_migrations/0028_auto__chg_field_contextrecord_location__chg_field_historicalcontextrec.py diff --git a/archaeological_context_records/migrations/0029_create_bulk_update_view.py b/archaeological_context_records/old_migrations/0029_create_bulk_update_view.py index 1dc20a752..1dc20a752 100644 --- a/archaeological_context_records/migrations/0029_create_bulk_update_view.py +++ b/archaeological_context_records/old_migrations/0029_create_bulk_update_view.py diff --git a/archaeological_context_records/migrations/0030_auto__add_excavationtechnictype__add_field_contextrecord_excavation_te.py b/archaeological_context_records/old_migrations/0030_auto__add_excavationtechnictype__add_field_contextrecord_excavation_te.py index 3a4097451..3a4097451 100644 --- a/archaeological_context_records/migrations/0030_auto__add_excavationtechnictype__add_field_contextrecord_excavation_te.py +++ b/archaeological_context_records/old_migrations/0030_auto__add_excavationtechnictype__add_field_contextrecord_excavation_te.py diff --git a/archaeological_context_records/migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py b/archaeological_context_records/old_migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py index f56f26e9f..f56f26e9f 100644 --- a/archaeological_context_records/migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py +++ b/archaeological_context_records/old_migrations/0031_auto__add_documentationtype__add_field_contextrecord_diameter__add_fie.py diff --git a/archaeological_context_records/migrations/0032_has_furniture_to_documentations.py b/archaeological_context_records/old_migrations/0032_has_furniture_to_documentations.py index 0b5de776a..0b5de776a 100644 --- a/archaeological_context_records/migrations/0032_has_furniture_to_documentations.py +++ b/archaeological_context_records/old_migrations/0032_has_furniture_to_documentations.py diff --git a/archaeological_context_records/migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py b/archaeological_context_records/old_migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py index 65c5d54da..65c5d54da 100644 --- a/archaeological_context_records/migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py +++ b/archaeological_context_records/old_migrations/0033_auto__del_field_contextrecord_has_furniture__del_field_historicalconte.py diff --git a/archaeological_context_records/old_migrations/__init__.py b/archaeological_context_records/old_migrations/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archaeological_context_records/old_migrations/__init__.py diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 0a5ea30fc..170c2d87c 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -95,7 +95,7 @@ <h3>{% trans "Localisation"%}</h3> <p><label>{%trans "Towns"%}</label> <span class='value'>{{ item.operation.towns.all|join:", " }}</span></p> <p><label>{%trans "Related operation"%}</label> -<span class='value'><a href="#" onclick='load_window("{% url show-operation item.operation.pk ''%}");'>{{ item.operation }}</a></span></p> +<span class='value'><a href="#" onclick='load_window("{% url "show-operation" item.operation.pk ''%}");'>{{ item.operation }}</a></span></p> {% else %}<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <label>{%trans "No operation linked to this context unit!"%}</label></p> {% endif %} diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index 7277eaef0..89b15fbbf 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -41,11 +41,19 @@ from archaeological_context_records import views CONTEXT_RECORD_FIXTURES = FILE_FIXTURES + [ settings.ROOT_PATH + '../archaeological_context_records/fixtures/initial_data-fr.json', + '../archaeological_context_records/fixtures/' + 'initial_data_relation_type_norel-fr.json', + '../archaeological_context_records/fixtures/' + 'initial_data_relation_type-fr.json', ] CONTEXT_RECORD_TOWNS_FIXTURES = FILE_TOWNS_FIXTURES + [ settings.ROOT_PATH + '../archaeological_context_records/fixtures/initial_data-fr.json', + '../archaeological_context_records/fixtures/' + 'initial_data_relation_type_norel-fr.json', + '../archaeological_context_records/fixtures/' + 'initial_data_relation_type-fr.json', ] @@ -374,7 +382,6 @@ class ContextRecordTest(ContextRecordInit, TestCase): self.assertEqual(obj.datings.count(), 2) - class ContextRecordSearchTest(ContextRecordInit, TestCase): fixtures = CONTEXT_RECORD_TOWNS_FIXTURES @@ -618,7 +625,7 @@ class ContextRecordWizardCreationTest(WizardTest, ContextRecordInit, TestCase): 'relations', {'right_record': self.related_cr.pk, 'relation_type': models.RelationType.objects.create( - label="Test").pk} + label="Test", symmetrical=False).pk} ) period = models.Period.objects.all()[0].pk diff --git a/archaeological_context_records/urls.py b/archaeological_context_records/urls.py index e89a76aef..86e4c3137 100644 --- a/archaeological_context_records/urls.py +++ b/archaeological_context_records/urls.py @@ -17,17 +17,16 @@ # See the file COPYING for details. -from django.conf.urls.defaults import * +from django.conf.urls import url from archaeological_context_records import models from ishtar_common.wizards import check_rights -import views +from archaeological_context_records import views # be careful: each check_rights must be relevant with ishtar_menu # forms -urlpatterns = patterns( - '', +urlpatterns = [ # Context records url(r'record_search/(?P<step>.+)?$', check_rights(['view_contextrecord', 'view_own_contextrecord'])( @@ -61,50 +60,47 @@ urlpatterns = patterns( check_rights(['change_contextrecord', 'change_own_contextrecord'])( views.record_source_deletion_wizard), name='record_source_deletion'), -) - -urlpatterns += patterns( - 'archaeological_context_records.views', - url(r'autocomplete-contextrecord/$', 'autocomplete_contextrecord', + url(r'autocomplete-contextrecord/$', views.autocomplete_contextrecord, name='autocomplete-contextrecord'), url(r'show-contextrecord(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_contextrecord', name=models.ContextRecord.SHOW_URL), + views.show_contextrecord, name=models.ContextRecord.SHOW_URL), # show-contextrecordrelation is only a view the id point to a context record url(r'show-contextrecord(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_contextrecord', name='show-contextrecordrelation'), + views.show_contextrecord, name='show-contextrecordrelation'), url(r'show-historized-contextrecord/(?P<pk>.+)?/(?P<date>.+)?$', - 'show_contextrecord', name='show-historized-contextrecord'), + views.show_contextrecord, name='show-historized-contextrecord'), url(r'revert-contextrecord/(?P<pk>.+)/(?P<date>.+)$', - 'revert_contextrecord', name='revert-contextrecord'), - url(r'get-contextrecord/own/(?P<type>.+)?$', 'get_contextrecord', + views.revert_contextrecord, name='revert-contextrecord'), + url(r'get-contextrecord/own/(?P<type>.+)?$', views.get_contextrecord, name='get-own-contextrecord', kwargs={'force_own': True}), - url(r'get-contextrecord/(?P<type>.+)?$', 'get_contextrecord', + url(r'get-contextrecord/(?P<type>.+)?$', views.get_contextrecord, name='get-contextrecord'), url(r'get-contextrecord-for-ope/own/(?P<type>.+)?$', - 'get_contextrecord_for_ope', + views.get_contextrecord_for_ope, name='get-own-contextrecord-for-ope', kwargs={'force_own': True}), url(r'get-contextrecord-for-ope/(?P<type>.+)?$', - 'get_contextrecord_for_ope', + views.get_contextrecord_for_ope, name='get-contextrecord-for-ope'), url(r'get-contextrecord-full/own/(?P<type>.+)?$', - 'get_contextrecord', name='get-own-contextrecord-full', + views.get_contextrecord, name='get-own-contextrecord-full', kwargs={'full': True, 'force_own': True}), url(r'get-contextrecord-full/(?P<type>.+)?$', - 'get_contextrecord', name='get-contextrecord-full', + views.get_contextrecord, name='get-contextrecord-full', kwargs={'full': True}), url(r'get-contextrecord-shortcut/(?P<type>.+)?$', - 'get_contextrecord', name='get-contextrecord-shortcut', + views.get_contextrecord, name='get-contextrecord-shortcut', kwargs={'full': 'shortcut'}), url(r'get-contextrecordrelation/(?P<type>.+)?$', - 'get_contextrecordrelation', name='get-contextrecordrelation'), + views.get_contextrecordrelation, name='get-contextrecordrelation'), url(r'get-contextrecordrelationdetail/(?P<type>.+)?$', - 'get_contextrecordrelationdetail', + views.get_contextrecordrelationdetail, name='get-contextrecordrelationdetail'), url(r'show-contextrecordsource(?:/(?P<pk>.+))?/(?P<type>.+)?$', - 'show_contextrecordsource', name=models.ContextRecordSource.SHOW_URL), + views.show_contextrecordsource, + name=models.ContextRecordSource.SHOW_URL), url(r'get-contexrecordsource/(?P<type>.+)?$', - 'get_contextrecordsource', name='get-contextrecordsource'), + views.get_contextrecordsource, name='get-contextrecordsource'), url(r'get-contexrecordsource-full/(?P<type>.+)?$', - 'get_contextrecordsource', name='get-contextrecordsource-full', + views.get_contextrecordsource, name='get-contextrecordsource-full', kwargs={'full': True}), -) +] diff --git a/archaeological_context_records/views.py b/archaeological_context_records/views.py index 250fdafc0..3bfe544be 100644 --- a/archaeological_context_records/views.py +++ b/archaeological_context_records/views.py @@ -43,9 +43,9 @@ def autocomplete_contextrecord(request): and not request.user.has_perm( 'archaeological_context_records.view_own_contextrecord', models.ArchaeologicalSite)): - return HttpResponse(mimetype='text/plain') + return HttpResponse(content_type='text/plain') if not request.GET.get('term'): - return HttpResponse(mimetype='text/plain') + return HttpResponse(content_type='text/plain') q = request.GET.get('term') query = Q() if request.GET.get('operation__pk'): @@ -62,7 +62,7 @@ def autocomplete_contextrecord(request): data = json.dumps([{'id': item.pk, 'value': unicode(item)[:60]} for item in items]) - return HttpResponse(data, mimetype='text/plain') + return HttpResponse(data, content_type='text/plain') get_contextrecord = get_item( models.ContextRecord, |
