summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-01-11 16:19:59 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-01-11 16:19:59 +0100
commit1e05946531d237dc954f46ddfc25a6b61c084a74 (patch)
tree8b9137dd9b68121db86e4e22dfdb7b7016a6f1ad /archaeological_context_records
parent4779acd3006e6d6b17babd13585a4d83fb8d2332 (diff)
parent9eced41d76545bd2921605b7b81bd14b875ce541 (diff)
downloadIshtar-1e05946531d237dc954f46ddfc25a6b61c084a74.tar.bz2
Ishtar-1e05946531d237dc954f46ddfc25a6b61c084a74.zip
Merge branch 'develop'
Diffstat (limited to 'archaeological_context_records')
-rw-r--r--archaeological_context_records/forms.py60
-rw-r--r--archaeological_context_records/locale/django.pot268
-rw-r--r--archaeological_context_records/migrations/0033_auto_20181203_1442.py590
-rw-r--r--archaeological_context_records/models.py20
-rw-r--r--archaeological_context_records/templates/ishtar/forms/qa_operation_contextrecord.html28
-rw-r--r--archaeological_context_records/templates/ishtar/sheet_contextrecord.html4
-rw-r--r--archaeological_context_records/urls.py6
-rw-r--r--archaeological_context_records/views.py25
8 files changed, 864 insertions, 137 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py
index a4577df40..8bd3db9f5 100644
--- a/archaeological_context_records/forms.py
+++ b/archaeological_context_records/forms.py
@@ -28,7 +28,13 @@ from django.core import validators
from django.forms.formsets import formset_factory
from django.utils.translation import ugettext_lazy as _
-import models
+from ishtar_common.models import valid_id, IshtarSiteProfile, Town
+from archaeological_context_records import models
+
+from ishtar_common.forms import FinalForm, FormSet, \
+ reverse_lazy, get_form_selection, TableSelect, ManageOldType, CustomForm, \
+ FieldType, CustomFormSearch, IshtarForm
+from ishtar_common.forms_common import get_town_field
from archaeological_operations.forms import OperationSelect, ParcelField, \
RecordRelationsForm as OpeRecordRelationsForm, RecordRelationsFormSetBase
from archaeological_operations.models import Period, Parcel, Operation, \
@@ -36,11 +42,6 @@ from archaeological_operations.models import Period, Parcel, Operation, \
from archaeological_operations.widgets import OAWidget
from bootstrap_datepicker.widgets import DatePicker
from ishtar_common import widgets
-from ishtar_common.forms import FinalForm, FormSet, \
- reverse_lazy, get_form_selection, TableSelect, ManageOldType, CustomForm, \
- FieldType, CustomFormSearch
-from ishtar_common.forms_common import get_town_field
-from ishtar_common.models import valid_id, IshtarSiteProfile, Town
class OperationFormSelection(CustomForm, forms.Form):
@@ -154,6 +155,8 @@ class RecordFormGeneral(CustomForm, ManageOldType):
)
label = forms.CharField(label=_(u"ID"),
validators=[validators.MaxLengthValidator(200)])
+ unit = forms.ChoiceField(label=_(u"Context record type"), required=False,
+ choices=[])
description = forms.CharField(label=_(u"Description"),
widget=forms.Textarea, required=False)
comment = forms.CharField(label=_(u"General comment"),
@@ -167,8 +170,6 @@ class RecordFormGeneral(CustomForm, ManageOldType):
depth = forms.FloatField(label=_(u"Depth (m)"), required=False)
depth_of_appearance = forms.FloatField(
label=_(u"Depth of appearance (m)"), required=False)
- unit = forms.ChoiceField(label=_(u"Context record type"), required=False,
- choices=[])
opening_date = forms.DateField(label=_(u"Opening date"),
widget=DatePicker, required=False)
closing_date = forms.DateField(label=_(u"Closing date"),
@@ -374,3 +375,46 @@ class RecordDeletionForm(FinalForm):
confirm_msg = " "
confirm_end_msg = _(u"Would you like to delete this context record?")
+
+class QAOperationCR(IshtarForm):
+ town = forms.ChoiceField(label=_(u"Town"), choices=[])
+ archaeological_site = forms.ChoiceField(
+ label=" ", choices=[], required=False,
+ help_text=_(u"Only the items associated to the operation can be "
+ u"selected.")
+ )
+ label = forms.CharField(label=_(u"ID"),
+ validators=[validators.MaxLengthValidator(200)])
+ unit = forms.ChoiceField(label=_(u"Context record type"), required=False,
+ choices=[])
+
+ TYPES = [
+ FieldType('unit', models.Unit),
+ ]
+
+ def __init__(self, *args, **kwargs):
+ self.items = kwargs.pop('items')
+ super(QAOperationCR, self).__init__(*args, **kwargs)
+ site_label = IshtarSiteProfile.get_default_site_label()
+ self.fields['archaeological_site'].label = site_label
+ self.fields['archaeological_site'].choices = [('', '--')]
+
+ if not self.items:
+ return
+ operation = self.items[0]
+ self.fields['town'].choices = [(t.pk, unicode(t))
+ for t in operation.towns.all()]
+ self.fields['archaeological_site'].choices += [
+ (site.pk, unicode(site))
+ for site in operation.archaeological_sites.all()
+ ]
+
+ def save(self, items):
+ operation = items[0]
+ cr = models.ContextRecord.objects.create(
+ town_id=self.cleaned_data['town'], operation=operation,
+ archaeological_site_id=
+ self.cleaned_data['archaeological_site'] or None,
+ label=self.cleaned_data['label'],
+ unit_id=self.cleaned_data['unit'] or None
+ )
diff --git a/archaeological_context_records/locale/django.pot b/archaeological_context_records/locale/django.pot
index fbd1d8d86..e76ef5dc7 100644
--- a/archaeological_context_records/locale/django.pot
+++ b/archaeological_context_records/locale/django.pot
@@ -13,242 +13,242 @@ msgstr ""
msgid "Point"
msgstr ""
-#: admin.py:51 models.py:410
+#: admin.py:51 models.py:427
msgid "Multi polygon"
msgstr ""
-#: forms.py:47 forms.py:53 models.py:352 wizards.py:81
+#: forms.py:48 forms.py:54 models.py:369 wizards.py:81
msgid "Operation"
msgstr ""
-#: forms.py:48
+#: forms.py:49
msgid "Context record - 010 - Operation choice"
msgstr ""
-#: forms.py:63
+#: forms.py:64
msgid "Context record - 001 - Search"
msgstr ""
-#: forms.py:66
+#: forms.py:67
msgid "Full text search"
msgstr ""
-#: forms.py:69 forms.py:155 models.py:357 models.py:737
+#: forms.py:70 forms.py:156 forms.py:386 models.py:374 models.py:754
msgid "ID"
msgstr ""
-#: forms.py:75
+#: forms.py:76
msgid "Code PATRIARCHE"
msgstr ""
-#: forms.py:76
+#: forms.py:77
msgid "Operation's year"
msgstr ""
-#: forms.py:78
+#: forms.py:79
msgid "Operation's number (index by year)"
msgstr ""
-#: forms.py:80 models.py:355
+#: forms.py:81 models.py:372
msgid "Archaeological site"
msgstr ""
-#: forms.py:86
+#: forms.py:87
msgid "Search within related operations"
msgstr ""
-#: forms.py:87 forms.py:288 models.py:66
+#: forms.py:88 forms.py:289 models.py:66
msgid "Period"
msgstr ""
-#: forms.py:88
+#: forms.py:89
msgid "Unit type"
msgstr ""
-#: forms.py:89 forms.py:148 models.py:231 models.py:232 models.py:347
-#: models.py:739
+#: forms.py:90 forms.py:149 models.py:248 models.py:249 models.py:364
+#: models.py:756
msgid "Parcel"
msgstr ""
-#: forms.py:91
+#: forms.py:92
msgid "Search within relations"
msgstr ""
-#: forms.py:115 views.py:95
+#: forms.py:116 views.py:99
msgid "Context record search"
msgstr ""
-#: forms.py:130
+#: forms.py:131
msgid "You should at least select one context record."
msgstr ""
-#: forms.py:136
+#: forms.py:137
msgid "General"
msgstr ""
-#: forms.py:137
+#: forms.py:138
msgid "Context record - 020 - General"
msgstr ""
-#: forms.py:149 models.py:228 models.py:229 models.py:350
+#: forms.py:150 forms.py:380 models.py:245 models.py:246 models.py:367
msgid "Town"
msgstr ""
-#: forms.py:152
+#: forms.py:153 forms.py:383
msgid "Only the items associated to the operation can be selected."
msgstr ""
-#: forms.py:157 models.py:358 models.py:740
+#: forms.py:158 forms.py:388 models.py:396 models.py:755
+msgid "Context record type"
+msgstr ""
+
+#: forms.py:160 models.py:375 models.py:757
#: templates/ishtar/sheet_contextrecord.html:45
msgid "Description"
msgstr ""
-#: forms.py:159 models.py:359
+#: forms.py:162 models.py:376
msgid "General comment"
msgstr ""
-#: forms.py:162 models.py:405
+#: forms.py:165 models.py:422
msgid "Excavation technique"
msgstr ""
-#: forms.py:163 models.py:363
+#: forms.py:166 models.py:380
msgid "Length (m)"
msgstr ""
-#: forms.py:164 models.py:364
+#: forms.py:167 models.py:381
msgid "Width (m)"
msgstr ""
-#: forms.py:165 models.py:365
+#: forms.py:168 models.py:382
msgid "Thickness (m)"
msgstr ""
-#: forms.py:166 models.py:367
+#: forms.py:169 models.py:384
msgid "Diameter (m)"
msgstr ""
-#: forms.py:167 models.py:368
+#: forms.py:170 models.py:385
msgid "Depth (m)"
msgstr ""
-#: forms.py:169 models.py:370
+#: forms.py:172 models.py:387
msgid "Depth of appearance (m)"
msgstr ""
-#: forms.py:170 models.py:379 models.py:738
-msgid "Context record type"
-msgstr ""
-
-#: forms.py:172 models.py:360
+#: forms.py:173 models.py:377
msgid "Opening date"
msgstr ""
-#: forms.py:174 models.py:362 templates/ishtar/sheet_contextrecord.html:140
+#: forms.py:175 models.py:379 templates/ishtar/sheet_contextrecord.html:140
msgid "Closing date"
msgstr ""
-#: forms.py:177
+#: forms.py:178
msgid "Documentation"
msgstr ""
-#: forms.py:180 models.py:372
+#: forms.py:181 models.py:389
msgid "Location"
msgstr ""
-#: forms.py:273
+#: forms.py:274
msgid "This ID already exists for this operation."
msgstr ""
-#: forms.py:277
+#: forms.py:278
msgid "You have to choose a town or a parcel."
msgstr ""
-#: forms.py:283 forms.py:304 models.py:77
+#: forms.py:284 forms.py:305 models.py:77
msgid "Dating"
msgstr ""
-#: forms.py:289 models.py:67
+#: forms.py:290 models.py:67
msgid "Start date"
msgstr ""
-#: forms.py:290 models.py:68
+#: forms.py:291 models.py:68
msgid "End date"
msgstr ""
-#: forms.py:291 models.py:71
+#: forms.py:292 models.py:71
msgid "Quality"
msgstr ""
-#: forms.py:292 models.py:45 models.py:69
+#: forms.py:293 models.py:45 models.py:69
msgid "Dating type"
msgstr ""
-#: forms.py:305
+#: forms.py:306
msgid "Context record - 030 - Dating"
msgstr ""
-#: forms.py:315 ishtar_menu.py:29 models.py:91
+#: forms.py:316 ishtar_menu.py:29 models.py:108 views.py:185
msgid "Context record"
msgstr ""
-#: forms.py:331
+#: forms.py:332
msgid "Relations"
msgstr ""
-#: forms.py:332
+#: forms.py:333
msgid "Context record - 050 - Relations"
msgstr ""
-#: forms.py:337 forms.py:348 models.py:382
+#: forms.py:338 forms.py:349 models.py:399
#: templates/ishtar/sheet_contextrecord.html:64
msgid "Interpretation"
msgstr ""
-#: forms.py:338
+#: forms.py:339
msgid "Context record - 040 - Interpretation"
msgstr ""
-#: forms.py:344
+#: forms.py:345
msgid "Comments on dating"
msgstr ""
-#: forms.py:346 models.py:381
+#: forms.py:347 models.py:398
msgid "Filling"
msgstr ""
-#: forms.py:350 models.py:402
+#: forms.py:351 models.py:419
msgid "Activity"
msgstr ""
-#: forms.py:352 models.py:400
+#: forms.py:353 models.py:417
msgid "Identification"
msgstr ""
-#: forms.py:354 models.py:385
+#: forms.py:355 models.py:402
msgid "TAQ"
msgstr ""
-#: forms.py:355 models.py:389
+#: forms.py:356 models.py:406
msgid "Estimated TAQ"
msgstr ""
-#: forms.py:357 models.py:392
+#: forms.py:358 models.py:409
msgid "TPQ"
msgstr ""
-#: forms.py:358 models.py:396
+#: forms.py:359 models.py:413
msgid "Estimated TPQ"
msgstr ""
-#: forms.py:368
+#: forms.py:369
msgid "Operation search"
msgstr ""
-#: forms.py:370
+#: forms.py:371
msgid "You should select an operation."
msgstr ""
-#: forms.py:375
+#: forms.py:376
msgid "Would you like to delete this context record?"
msgstr ""
@@ -288,263 +288,273 @@ msgstr ""
msgid "Datings"
msgstr ""
-#: models.py:98
+#: models.py:115
msgid "Find"
msgstr ""
-#: models.py:117 models.py:136 models.py:152
+#: models.py:134 models.py:153 models.py:169
msgid "Order"
msgstr ""
-#: models.py:119
+#: models.py:136
msgid "Parent context record type"
msgstr ""
-#: models.py:123
+#: models.py:140
msgid "Context record Type"
msgstr ""
-#: models.py:124
+#: models.py:141
msgid "Context record Types"
msgstr ""
-#: models.py:139
+#: models.py:156
msgid "Activity Type"
msgstr ""
-#: models.py:140
+#: models.py:157
msgid "Activity Types"
msgstr ""
-#: models.py:155
+#: models.py:172
msgid "Identification Type"
msgstr ""
-#: models.py:156
+#: models.py:173
msgid "Identification Types"
msgstr ""
-#: models.py:169
+#: models.py:186
msgid "Excavation technique type"
msgstr ""
-#: models.py:170
+#: models.py:187
msgid "Excavation technique types"
msgstr ""
-#: models.py:180
+#: models.py:197
msgid "Documentation type"
msgstr ""
-#: models.py:181
+#: models.py:198
msgid "Documentation types"
msgstr ""
-#: models.py:222 models.py:741
+#: models.py:239 models.py:758
msgid "Periods"
msgstr ""
-#: models.py:223
+#: models.py:240
msgid "Datings (period)"
msgstr ""
-#: models.py:224
+#: models.py:241
msgid "Related context records"
msgstr ""
-#: models.py:225
+#: models.py:242
msgid "Operation (Patriarche code)"
msgstr ""
-#: models.py:226
+#: models.py:243
msgid "Operation (name)"
msgstr ""
-#: models.py:227
+#: models.py:244
msgid "Parcel (external ID)"
msgstr ""
-#: models.py:230
+#: models.py:247
msgid "Parcel (year)"
msgstr ""
-#: models.py:265
+#: models.py:282
msgctxt "key for text search"
msgid "id"
msgstr ""
-#: models.py:269
+#: models.py:286
msgctxt "key for text search"
msgid "town"
msgstr ""
-#: models.py:273
+#: models.py:290
msgctxt "key for text search"
msgid "operation-year"
msgstr ""
-#: models.py:277
+#: models.py:294
msgctxt "key for text search"
msgid "patriarche"
msgstr ""
-#: models.py:281
+#: models.py:298
msgctxt "key for text search"
msgid "operation-code"
msgstr ""
-#: models.py:285 models.py:327
+#: models.py:302 models.py:344
msgctxt "key for text search"
msgid "operation"
msgstr ""
-#: models.py:289 models.py:330
+#: models.py:306 models.py:347
msgctxt "key for text search"
msgid "site"
msgstr ""
-#: models.py:293
+#: models.py:310
msgctxt "key for text search"
msgid "operation-relation-type"
msgstr ""
-#: models.py:297
+#: models.py:314
msgctxt "key for text search"
msgid "period"
msgstr ""
-#: models.py:301
+#: models.py:318
msgctxt "key for text search"
msgid "unit-type"
msgstr ""
-#: models.py:305
+#: models.py:322
msgctxt "key for text search"
msgid "parcel"
msgstr ""
-#: models.py:309
+#: models.py:326
msgctxt "key for text search"
msgid "record-relation-type"
msgstr ""
-#: models.py:343
+#: models.py:360
msgid "External ID"
msgstr ""
-#: models.py:345
+#: models.py:362
msgid "External ID is set automatically"
msgstr ""
-#: models.py:373
+#: models.py:390
msgid "A short description of the location of the context record"
msgstr ""
-#: models.py:377
+#: models.py:394
msgid "Comment on datings"
msgstr ""
-#: models.py:386
+#: models.py:403
msgid ""
"\"Terminus Ante Quem\" the context record can't have been created after this "
"date"
msgstr ""
-#: models.py:390
+#: models.py:407
msgid "Estimation of a \"Terminus Ante Quem\""
msgstr ""
-#: models.py:393
+#: models.py:410
msgid ""
"\"Terminus Post Quem\" the context record can't have been created before "
"this date"
msgstr ""
-#: models.py:397
+#: models.py:414
msgid "Estimation of a \"Terminus Post Quem\""
msgstr ""
-#: models.py:408
+#: models.py:425
msgid "Point (2D)"
msgstr ""
-#: models.py:409
+#: models.py:426
msgid "Point (3D)"
msgstr ""
-#: models.py:413
+#: models.py:430
msgid "Documents"
msgstr ""
-#: models.py:415
+#: models.py:432
msgid "Cached name"
msgstr ""
-#: models.py:419 models.py:420 templates/ishtar/sheet_contextrecord.html:4
+#: models.py:436 models.py:437 templates/ishtar/sheet_contextrecord.html:4
msgid "Context Record"
msgstr ""
-#: models.py:439
+#: models.py:456
msgctxt "short"
msgid "Context record"
msgstr ""
-#: models.py:668 models.py:691 models.py:736
+#: models.py:685 models.py:708 models.py:753
msgid "Relation type"
msgstr ""
-#: models.py:669
+#: models.py:686
msgid "Relation types"
msgstr ""
-#: models.py:686
+#: models.py:703
msgid "ID (left)"
msgstr ""
-#: models.py:687
+#: models.py:704
msgid "Context record type (left)"
msgstr ""
-#: models.py:688
+#: models.py:705
msgid "Parcel (left)"
msgstr ""
-#: models.py:689
+#: models.py:706
msgid "Description (left)"
msgstr ""
-#: models.py:690
+#: models.py:707
msgid "Periods (left)"
msgstr ""
-#: models.py:692
+#: models.py:709
msgid "ID (right)"
msgstr ""
-#: models.py:693
+#: models.py:710
msgid "Context record type (right)"
msgstr ""
-#: models.py:694
+#: models.py:711
msgid "Parcel (right)"
msgstr ""
-#: models.py:695
+#: models.py:712
msgid "Description (right)"
msgstr ""
-#: models.py:696
+#: models.py:713
msgid "Periods (right)"
msgstr ""
-#: models.py:705
+#: models.py:722
msgid "Record relation"
msgstr ""
-#: models.py:706
+#: models.py:723
msgid "Record relations"
msgstr ""
+#: templates/ishtar/forms/qa_operation_contextrecord.html:11
+msgid "Quick add context record"
+msgstr ""
+
+#: templates/ishtar/forms/qa_operation_contextrecord.html:25
+msgid ""
+"To put more information to the context record use the full form on the top "
+"menu: \\"
+msgstr ""
+
#: templates/ishtar/sheet_contextrecord.html:75
msgid "Datations"
msgstr ""
@@ -613,18 +623,22 @@ msgstr ""
msgid "Documents from associated finds"
msgstr ""
-#: views.py:109
+#: views.py:113
msgid "New context record"
msgstr ""
-#: views.py:125
+#: views.py:129
msgid "Context record modification"
msgstr ""
-#: views.py:136
+#: views.py:140
msgid "You don't have sufficient permissions to do this action."
msgstr ""
-#: views.py:149
+#: views.py:153
msgid "Context record deletion"
msgstr ""
+
+#: views.py:190
+msgid "Add context record"
+msgstr ""
diff --git a/archaeological_context_records/migrations/0033_auto_20181203_1442.py b/archaeological_context_records/migrations/0033_auto_20181203_1442.py
new file mode 100644
index 000000000..0497d68e3
--- /dev/null
+++ b/archaeological_context_records/migrations/0033_auto_20181203_1442.py
@@ -0,0 +1,590 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.10 on 2018-12-03 14:42
+from __future__ import unicode_literals
+
+from django.conf import settings
+import django.contrib.gis.db.models.fields
+import django.contrib.postgres.search
+import django.core.validators
+from django.db import migrations, models
+import django.db.models.deletion
+import ishtar_common.models
+import re
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_context_records', '0032_auto_20181017_1854'),
+ ]
+
+ operations = [
+ migrations.AlterModelOptions(
+ name='activitytype',
+ options={'ordering': ('order',), 'verbose_name': "Type d'activit\xe9", 'verbose_name_plural': "Types d'activit\xe9"},
+ ),
+ migrations.AlterModelOptions(
+ name='contextrecord',
+ options={'ordering': ('cached_label',), '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')), 'verbose_name': "Unit\xe9 d'Enregistrement", 'verbose_name_plural': "Unit\xe9 d'Enregistrement"},
+ ),
+ migrations.AlterModelOptions(
+ name='dating',
+ options={'verbose_name': 'Datation', 'verbose_name_plural': 'Datations'},
+ ),
+ migrations.AlterModelOptions(
+ name='datingquality',
+ options={'ordering': ('label',), 'verbose_name': 'Type de qualit\xe9 de datation', 'verbose_name_plural': 'Types de qualit\xe9 de datation'},
+ ),
+ migrations.AlterModelOptions(
+ name='datingtype',
+ options={'ordering': ('label',), 'verbose_name': 'Type de datation', 'verbose_name_plural': 'Types de datation'},
+ ),
+ migrations.AlterModelOptions(
+ name='documentationtype',
+ options={'ordering': ('label',), 'verbose_name': 'Type de documentation', 'verbose_name_plural': 'Types de documentation'},
+ ),
+ migrations.AlterModelOptions(
+ name='excavationtechnictype',
+ options={'ordering': ('label',), 'verbose_name': 'Type de m\xe9thode de fouille', 'verbose_name_plural': 'Types de m\xe9thode de fouille'},
+ ),
+ migrations.AlterModelOptions(
+ name='historicalcontextrecord',
+ options={'get_latest_by': 'history_date', 'ordering': ('-history_date', '-history_id'), 'verbose_name': "historical Unit\xe9 d'Enregistrement"},
+ ),
+ migrations.AlterModelOptions(
+ name='identificationtype',
+ options={'ordering': ('order', 'label'), 'verbose_name': "Type d'identification", 'verbose_name_plural': "Types d'identification"},
+ ),
+ migrations.AlterModelOptions(
+ name='recordrelations',
+ options={'permissions': [('view_recordrelation', 'Can view all Context record relations')], 'verbose_name': "Relation entre Unit\xe9s d'Enregistrement", 'verbose_name_plural': "Relations entre Unit\xe9s d'Enregistrement"},
+ ),
+ migrations.AlterModelOptions(
+ name='relationtype',
+ options={'ordering': ('order', 'label'), 'verbose_name': 'Type de relation', 'verbose_name_plural': 'Types de relation'},
+ ),
+ migrations.AlterModelOptions(
+ name='unit',
+ options={'ordering': ('order', 'label'), 'verbose_name': "Type d'Unit\xe9 d'Enregistrement", 'verbose_name_plural': "Types d'Unit\xe9 d'Enregistrement"},
+ ),
+ migrations.AlterField(
+ model_name='activitytype',
+ name='available',
+ field=models.BooleanField(default=True, verbose_name='Disponible'),
+ ),
+ migrations.AlterField(
+ model_name='activitytype',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire'),
+ ),
+ migrations.AlterField(
+ model_name='activitytype',
+ name='label',
+ field=models.TextField(verbose_name='D\xe9nomination'),
+ ),
+ migrations.AlterField(
+ model_name='activitytype',
+ name='order',
+ field=models.IntegerField(verbose_name='Ordre'),
+ ),
+ migrations.AlterField(
+ model_name='activitytype',
+ name='txt_idx',
+ field=models.TextField(help_text='Le "slug" est une version standardis\xe9e du nom. Il ne contient que des lettres en minuscule, des nombres et des tirets (-). Chaque "slug" doit \xeatre unique dans la typologie.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union.", 'invalid')], verbose_name='Identifiant textuel'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='activity',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='archaeological_context_records.ActivityType', verbose_name='Activit\xe9'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='archaeological_site',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='context_records', to='archaeological_operations.ArchaeologicalSite', verbose_name='Entit\xe9 (EA)'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='auto_external_id',
+ field=models.BooleanField(default=False, verbose_name="L'identifiant est attribu\xe9 automatiquement"),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='cached_label',
+ field=models.TextField(blank=True, db_index=True, null=True, verbose_name='Nom en cache'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='closing_date',
+ field=models.DateField(blank=True, null=True, verbose_name='Date de cl\xf4ture'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire g\xe9n\xe9ral'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='datings_comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire relatif aux datations'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='depth',
+ field=models.FloatField(blank=True, null=True, verbose_name='Profondeur (m)'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='depth_of_appearance',
+ field=models.FloatField(blank=True, null=True, verbose_name="Profondeur d'apparition (m)"),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='diameter',
+ field=models.FloatField(blank=True, null=True, verbose_name='Diam\xe8tre (m)'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='excavation_technic',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='archaeological_context_records.ExcavationTechnicType', verbose_name='M\xe9thode de fouille'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='external_id',
+ field=models.TextField(blank=True, null=True, verbose_name='Identifiant'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='filling',
+ field=models.TextField(blank=True, null=True, verbose_name='Remplissage'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='history_creator',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Cr\xe9ateur'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='history_modifier',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Dernier \xe9diteur'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='interpretation',
+ field=models.TextField(blank=True, null=True, verbose_name='Interpr\xe9tation'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='label',
+ field=models.CharField(max_length=200, verbose_name='Identifiant'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='length',
+ field=models.FloatField(blank=True, null=True, verbose_name='Taille (m)'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='location',
+ field=models.TextField(blank=True, help_text="Une courte description de la localisation de l'Unit\xe9 d'Enregistrement", null=True, verbose_name='Localisation'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='multi_polygon',
+ field=django.contrib.gis.db.models.fields.MultiPolygonField(blank=True, null=True, srid=4326, verbose_name='Polygones multi-parties'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='opening_date',
+ field=models.DateField(blank=True, null=True, verbose_name="Date d'ouverture"),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='operation',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='context_record', to='archaeological_operations.Operation', verbose_name='Op\xe9ration'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='parcel',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='context_record', to='archaeological_operations.Parcel', verbose_name='Parcelle'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='relation_image',
+ field=models.FileField(blank=True, null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Image des relations (SVG g\xe9n\xe9r\xe9)'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='search_vector',
+ field=django.contrib.postgres.search.SearchVectorField(blank=True, help_text='Auto-rempli \xe0 la sauvegarde', null=True, verbose_name='Vecteur de recherche'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='taq',
+ field=models.IntegerField(blank=True, help_text="\xab Terminus Ante Quem \xbb. L'Unit\xe9 d'Enregistrement ne peut avoir \xe9t\xe9 cr\xe9\xe9e apr\xe8s cette date.", null=True, verbose_name='TAQ'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='taq_estimated',
+ field=models.IntegerField(blank=True, help_text="Estimation d'un \xab Terminus Ante Quem \xbb.", null=True, verbose_name='TAQ estim\xe9'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='thickness',
+ field=models.FloatField(blank=True, null=True, verbose_name='\xc9paisseur (m)'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='town',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='context_record', to='ishtar_common.Town', verbose_name='Commune'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='tpq',
+ field=models.IntegerField(blank=True, help_text="\xab Terminus Post Quem \xbb. L'Unit\xe9 d'Enregistrement ne peut avoir \xe9t\xe9 cr\xe9\xe9e avant cette date.", null=True, verbose_name='TPQ'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='tpq_estimated',
+ field=models.IntegerField(blank=True, help_text="Estimation d'un \xab Terminus Post Quem \xbb.", null=True, verbose_name='TPQ estim\xe9'),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='unit',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='archaeological_context_records.Unit', verbose_name="Type d'Unit\xe9 d'Enregistrement"),
+ ),
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='width',
+ field=models.FloatField(blank=True, null=True, verbose_name='Largeur (m)'),
+ ),
+ migrations.AlterField(
+ model_name='dating',
+ name='dating_type',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='archaeological_context_records.DatingType', verbose_name='Type de datation'),
+ ),
+ migrations.AlterField(
+ model_name='dating',
+ name='end_date',
+ field=models.IntegerField(blank=True, null=True, verbose_name='Date de fin'),
+ ),
+ migrations.AlterField(
+ model_name='dating',
+ name='period',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_operations.Period', verbose_name='P\xe9riode'),
+ ),
+ migrations.AlterField(
+ model_name='dating',
+ name='precise_dating',
+ field=models.TextField(blank=True, null=True, verbose_name='Datation pr\xe9cise'),
+ ),
+ migrations.AlterField(
+ model_name='dating',
+ name='quality',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='archaeological_context_records.DatingQuality', verbose_name='Qualit\xe9'),
+ ),
+ migrations.AlterField(
+ model_name='dating',
+ name='start_date',
+ field=models.IntegerField(blank=True, null=True, verbose_name='Date de d\xe9but'),
+ ),
+ migrations.AlterField(
+ model_name='datingquality',
+ name='available',
+ field=models.BooleanField(default=True, verbose_name='Disponible'),
+ ),
+ migrations.AlterField(
+ model_name='datingquality',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire'),
+ ),
+ migrations.AlterField(
+ model_name='datingquality',
+ name='label',
+ field=models.TextField(verbose_name='D\xe9nomination'),
+ ),
+ migrations.AlterField(
+ model_name='datingquality',
+ name='txt_idx',
+ field=models.TextField(help_text='Le "slug" est une version standardis\xe9e du nom. Il ne contient que des lettres en minuscule, des nombres et des tirets (-). Chaque "slug" doit \xeatre unique dans la typologie.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union.", 'invalid')], verbose_name='Identifiant textuel'),
+ ),
+ migrations.AlterField(
+ model_name='datingtype',
+ name='available',
+ field=models.BooleanField(default=True, verbose_name='Disponible'),
+ ),
+ migrations.AlterField(
+ model_name='datingtype',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire'),
+ ),
+ migrations.AlterField(
+ model_name='datingtype',
+ name='label',
+ field=models.TextField(verbose_name='D\xe9nomination'),
+ ),
+ migrations.AlterField(
+ model_name='datingtype',
+ name='txt_idx',
+ field=models.TextField(help_text='Le "slug" est une version standardis\xe9e du nom. Il ne contient que des lettres en minuscule, des nombres et des tirets (-). Chaque "slug" doit \xeatre unique dans la typologie.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union.", 'invalid')], verbose_name='Identifiant textuel'),
+ ),
+ migrations.AlterField(
+ model_name='documentationtype',
+ name='available',
+ field=models.BooleanField(default=True, verbose_name='Disponible'),
+ ),
+ migrations.AlterField(
+ model_name='documentationtype',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire'),
+ ),
+ migrations.AlterField(
+ model_name='documentationtype',
+ name='label',
+ field=models.TextField(verbose_name='D\xe9nomination'),
+ ),
+ migrations.AlterField(
+ model_name='documentationtype',
+ name='txt_idx',
+ field=models.TextField(help_text='Le "slug" est une version standardis\xe9e du nom. Il ne contient que des lettres en minuscule, des nombres et des tirets (-). Chaque "slug" doit \xeatre unique dans la typologie.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union.", 'invalid')], verbose_name='Identifiant textuel'),
+ ),
+ migrations.AlterField(
+ model_name='excavationtechnictype',
+ name='available',
+ field=models.BooleanField(default=True, verbose_name='Disponible'),
+ ),
+ migrations.AlterField(
+ model_name='excavationtechnictype',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire'),
+ ),
+ migrations.AlterField(
+ model_name='excavationtechnictype',
+ name='label',
+ field=models.TextField(verbose_name='D\xe9nomination'),
+ ),
+ migrations.AlterField(
+ model_name='excavationtechnictype',
+ name='txt_idx',
+ field=models.TextField(help_text='Le "slug" est une version standardis\xe9e du nom. Il ne contient que des lettres en minuscule, des nombres et des tirets (-). Chaque "slug" doit \xeatre unique dans la typologie.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union.", 'invalid')], verbose_name='Identifiant textuel'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='auto_external_id',
+ field=models.BooleanField(default=False, verbose_name="L'identifiant est attribu\xe9 automatiquement"),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='cached_label',
+ field=models.TextField(blank=True, db_index=True, null=True, verbose_name='Nom en cache'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='closing_date',
+ field=models.DateField(blank=True, null=True, verbose_name='Date de cl\xf4ture'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire g\xe9n\xe9ral'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='datings_comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire relatif aux datations'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='depth',
+ field=models.FloatField(blank=True, null=True, verbose_name='Profondeur (m)'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='depth_of_appearance',
+ field=models.FloatField(blank=True, null=True, verbose_name="Profondeur d'apparition (m)"),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='diameter',
+ field=models.FloatField(blank=True, null=True, verbose_name='Diam\xe8tre (m)'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='external_id',
+ field=models.TextField(blank=True, null=True, verbose_name='Identifiant'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='filling',
+ field=models.TextField(blank=True, null=True, verbose_name='Remplissage'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='interpretation',
+ field=models.TextField(blank=True, null=True, verbose_name='Interpr\xe9tation'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='label',
+ field=models.CharField(max_length=200, verbose_name='Identifiant'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='length',
+ field=models.FloatField(blank=True, null=True, verbose_name='Taille (m)'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='location',
+ field=models.TextField(blank=True, help_text="Une courte description de la localisation de l'Unit\xe9 d'Enregistrement", null=True, verbose_name='Localisation'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='multi_polygon',
+ field=django.contrib.gis.db.models.fields.MultiPolygonField(blank=True, null=True, srid=4326, verbose_name='Polygones multi-parties'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='opening_date',
+ field=models.DateField(blank=True, null=True, verbose_name="Date d'ouverture"),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='relation_image',
+ field=models.TextField(blank=True, max_length=100, null=True, verbose_name='Image des relations (SVG g\xe9n\xe9r\xe9)'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='search_vector',
+ field=django.contrib.postgres.search.SearchVectorField(blank=True, help_text='Auto-rempli \xe0 la sauvegarde', null=True, verbose_name='Vecteur de recherche'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='taq',
+ field=models.IntegerField(blank=True, help_text="\xab Terminus Ante Quem \xbb. L'Unit\xe9 d'Enregistrement ne peut avoir \xe9t\xe9 cr\xe9\xe9e apr\xe8s cette date.", null=True, verbose_name='TAQ'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='taq_estimated',
+ field=models.IntegerField(blank=True, help_text="Estimation d'un \xab Terminus Ante Quem \xbb.", null=True, verbose_name='TAQ estim\xe9'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='thickness',
+ field=models.FloatField(blank=True, null=True, verbose_name='\xc9paisseur (m)'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='tpq',
+ field=models.IntegerField(blank=True, help_text="\xab Terminus Post Quem \xbb. L'Unit\xe9 d'Enregistrement ne peut avoir \xe9t\xe9 cr\xe9\xe9e avant cette date.", null=True, verbose_name='TPQ'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='tpq_estimated',
+ field=models.IntegerField(blank=True, help_text="Estimation d'un \xab Terminus Post Quem \xbb.", null=True, verbose_name='TPQ estim\xe9'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='width',
+ field=models.FloatField(blank=True, null=True, verbose_name='Largeur (m)'),
+ ),
+ migrations.AlterField(
+ model_name='identificationtype',
+ name='available',
+ field=models.BooleanField(default=True, verbose_name='Disponible'),
+ ),
+ migrations.AlterField(
+ model_name='identificationtype',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire'),
+ ),
+ migrations.AlterField(
+ model_name='identificationtype',
+ name='label',
+ field=models.TextField(verbose_name='D\xe9nomination'),
+ ),
+ migrations.AlterField(
+ model_name='identificationtype',
+ name='order',
+ field=models.IntegerField(verbose_name='Ordre'),
+ ),
+ migrations.AlterField(
+ model_name='identificationtype',
+ name='txt_idx',
+ field=models.TextField(help_text='Le "slug" est une version standardis\xe9e du nom. Il ne contient que des lettres en minuscule, des nombres et des tirets (-). Chaque "slug" doit \xeatre unique dans la typologie.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union.", 'invalid')], verbose_name='Identifiant textuel'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='available',
+ field=models.BooleanField(default=True, verbose_name='Disponible'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='inverse_relation',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='archaeological_context_records.RelationType', verbose_name='Relation inverse'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='label',
+ field=models.TextField(verbose_name='D\xe9nomination'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='logical_relation',
+ field=models.CharField(blank=True, choices=[(b'above', 'Au-dessus'), (b'bellow', 'En dessous'), (b'equal', '\xc9gal')], max_length=10, null=True, verbose_name='Relation logique'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='order',
+ field=models.IntegerField(default=1, verbose_name='Ordre'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='symmetrical',
+ field=models.BooleanField(verbose_name='Sym\xe9trique'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='tiny_label',
+ field=models.CharField(blank=True, max_length=50, null=True, verbose_name='D\xe9nomination courte'),
+ ),
+ migrations.AlterField(
+ model_name='relationtype',
+ name='txt_idx',
+ field=models.TextField(help_text='Le "slug" est une version standardis\xe9e du nom. Il ne contient que des lettres en minuscule, des nombres et des tirets (-). Chaque "slug" doit \xeatre unique dans la typologie.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union.", 'invalid')], verbose_name='Identifiant textuel'),
+ ),
+ migrations.AlterField(
+ model_name='unit',
+ name='available',
+ field=models.BooleanField(default=True, verbose_name='Disponible'),
+ ),
+ migrations.AlterField(
+ model_name='unit',
+ name='comment',
+ field=models.TextField(blank=True, null=True, verbose_name='Commentaire'),
+ ),
+ migrations.AlterField(
+ model_name='unit',
+ name='label',
+ field=models.TextField(verbose_name='D\xe9nomination'),
+ ),
+ migrations.AlterField(
+ model_name='unit',
+ name='order',
+ field=models.IntegerField(verbose_name='Ordre'),
+ ),
+ migrations.AlterField(
+ model_name='unit',
+ name='parent',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='archaeological_context_records.Unit', verbose_name="Type d'UE parent"),
+ ),
+ migrations.AlterField(
+ model_name='unit',
+ name='txt_idx',
+ field=models.TextField(help_text='Le "slug" est une version standardis\xe9e du nom. Il ne contient que des lettres en minuscule, des nombres et des tirets (-). Chaque "slug" doit \xeatre unique dans la typologie.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z'), "Ce champ ne doit contenir que des lettres, des nombres, des tirets bas _ et des traits d'union.", 'invalid')], verbose_name='Identifiant textuel'),
+ ),
+ ]
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 89f3edee4..d7d7a618d 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -84,6 +84,23 @@ class Dating(models.Model):
return unicode(self.period)
return u"%s (%s-%s)" % (self.period, start_date, end_date)
+ @classmethod
+ def is_identical(cls, dating_1, dating_2):
+ """
+ Compare two dating attribute by attribute and return True if all
+ attribute is identical
+ """
+ for attr in ["period", "start_date", "end_date", "dating_type",
+ "quality", "precise_dating"]:
+ value1 = getattr(dating_1, attr)
+ value2 = getattr(dating_2, attr)
+ if attr == "precise_dating":
+ value1 = value1.strip()
+ value2 = value2.strip()
+ if value1 != value2:
+ return False
+ return True
+
def context_records_lbl(self):
return u" - ".join(
[cr.cached_label for cr in self.context_records.all()]
@@ -521,6 +538,9 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem,
def get_query_owns(cls, ishtaruser):
q = cls._construct_query_own(
'operation__', Operation._get_query_owns_dicts(ishtaruser)
+ ) | cls._construct_query_own(
+ 'base_finds__find__basket__',
+ [{"shared_with": ishtaruser, "shared_write_with": ishtaruser}]
) | cls._construct_query_own('', [
{'history_creator': ishtaruser.user_ptr},
{'operation__end_date__isnull': True}
diff --git a/archaeological_context_records/templates/ishtar/forms/qa_operation_contextrecord.html b/archaeological_context_records/templates/ishtar/forms/qa_operation_contextrecord.html
new file mode 100644
index 000000000..c782832ff
--- /dev/null
+++ b/archaeological_context_records/templates/ishtar/forms/qa_operation_contextrecord.html
@@ -0,0 +1,28 @@
+{% extends "ishtar/forms/qa_base.html" %}
+{% load i18n inline_formset table_form %}
+
+{% block main_form %}
+{% if form.non_field_errors %}
+<div class="alert alert-danger" role="alert">
+ {{form.non_field_errors}}
+</div>
+{% endif %}
+
+<h4>{% trans "Quick add context record" %}</h4>
+
+{% for hidden in form.hidden_fields %}{{hidden}}
+{% if hidden.errors %}<div class="invalid-feedback">
+ {{ hidden.errors }}
+</div>{% endif %}
+{% endfor %}
+{% with force_large_col=True %}{% for field in form %}
+<div class="form-row">
+ {% include "blocks/bs_field_snippet.html" %}
+</div>
+{% endfor %}{% endwith %}
+
+<div class="alert alert-info">
+ {% trans "To put more information to the context record use the full form on the top menu: \"Context record > Add\"." %}
+</div>
+{% endblock %}
+
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
index 2ad74b7d2..af5da11dd 100644
--- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
+++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
@@ -171,9 +171,11 @@
{% endif %}
{% trans "Document from this context record" as cr_docs %}
+{% if permission_view_own_document or permission_view_document %}
{% if item.documents.count %}
{% dynamic_table_document cr_docs 'documents' 'context_records' item.pk '' output %}
{% endif %}
+{% endif %}
{% trans "Finds" as finds %}
{% if item.base_finds.count %}
@@ -181,8 +183,10 @@
{% endif %}
{% trans "Documents from associated finds" as finds_docs %}
+{% if permission_view_own_document or permission_view_document %}
{% if item.find_docs_q.count %}
{% dynamic_table_document finds_docs 'documents' 'finds__base_finds__context_record' item.pk '' output %}
{% endif %}
+{% endif %}
{% endblock %}
diff --git a/archaeological_context_records/urls.py b/archaeological_context_records/urls.py
index c05cff87e..175c87482 100644
--- a/archaeological_context_records/urls.py
+++ b/archaeological_context_records/urls.py
@@ -82,4 +82,10 @@ urlpatterns = [
url(r'get-contextrecordrelationdetail/(?P<type>.+)?$',
views.get_contextrecordrelationdetail,
name='get-contextrecordrelationdetail'),
+
+ url(r'^operation-qa-contextrecord/(?P<pks>[0-9]+)/$',
+ check_rights(['add_contextrecord', 'add_own_contextrecord'])(
+ views.QAOperationContextRecordView.as_view()),
+ name='operation-qa-contextrecord'),
+
]
diff --git a/archaeological_context_records/views.py b/archaeological_context_records/views.py
index 771a2ed71..6a01a48f0 100644
--- a/archaeological_context_records/views.py
+++ b/archaeological_context_records/views.py
@@ -26,11 +26,15 @@ from django.shortcuts import redirect
from django.utils.translation import ugettext_lazy as _
from django.views.generic import RedirectView
+from ishtar_common.models import QuickAction
+from archaeological_operations.models import Operation
from archaeological_context_records import models
+
from archaeological_operations.views import site_extra_context
from archaeological_context_records import forms
from ishtar_common.utils import put_session_message
-from ishtar_common.views import IshtarMixin, LoginRequiredMixin
+
+from ishtar_common.views import IshtarMixin, LoginRequiredMixin, QAItemForm
from ishtar_common.views_item import display_item, get_item, show_item, \
revert_item
from archaeological_context_records import wizards
@@ -171,4 +175,21 @@ class GenerateRelationImage(IshtarMixin, LoginRequiredMixin, RedirectView):
except models.ContextRecord.DoesNotExist:
raise Http404()
self.context_record.generate_relation_image()
- return super(GenerateRelationImage, self).get(request, *args, **kwargs) \ No newline at end of file
+ return super(GenerateRelationImage, self).get(request, *args, **kwargs)
+
+
+class QAOperationContextRecordView(QAItemForm):
+ template_name = 'ishtar/forms/qa_operation_contextrecord.html'
+ model = Operation
+ form_class = forms.QAOperationCR
+ page_name = _(u"Context record")
+
+ def get_quick_action(self):
+ return QuickAction(
+ url="operation-qa-contextrecord", icon_class="fa fa-plus",
+ text=_(u"Add context record"), target="one",
+ rights=['add_contextrecord', 'add_own_contextrecord'])
+
+ def form_valid(self, form):
+ form.save(self.items)
+ return HttpResponseRedirect(reverse("success"))