summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_context_records/migrations/0037_auto_20190118_1203.py26
-rw-r--r--archaeological_finds/migrations/0056_auto_20190118_1203.py36
-rw-r--r--archaeological_operations/migrations/0045_auto_20190118_1203.py26
-rw-r--r--archaeological_warehouse/migrations/0030_auto_20190118_1203.py26
-rw-r--r--ishtar_common/migrations/0082_auto_20190118_1203.py95
-rw-r--r--ishtar_common/models.py9
6 files changed, 217 insertions, 1 deletions
diff --git a/archaeological_context_records/migrations/0037_auto_20190118_1203.py b/archaeological_context_records/migrations/0037_auto_20190118_1203.py
new file mode 100644
index 000000000..a9e0b6da0
--- /dev/null
+++ b/archaeological_context_records/migrations/0037_auto_20190118_1203.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.10 on 2019-01-18 12:03
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import ishtar_common.models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_context_records', '0036_auto_20190111_1755'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='contextrecord',
+ name='relation_image',
+ field=models.FileField(blank=True, help_text='The maximum supported file size is 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Image des relations (SVG g\xe9n\xe9r\xe9)'),
+ ),
+ migrations.AlterField(
+ model_name='historicalcontextrecord',
+ name='relation_image',
+ field=models.TextField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=100, null=True, verbose_name='Image des relations (SVG g\xe9n\xe9r\xe9)'),
+ ),
+ ]
diff --git a/archaeological_finds/migrations/0056_auto_20190118_1203.py b/archaeological_finds/migrations/0056_auto_20190118_1203.py
new file mode 100644
index 000000000..554a934d1
--- /dev/null
+++ b/archaeological_finds/migrations/0056_auto_20190118_1203.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.10 on 2019-01-18 12:03
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import ishtar_common.models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_finds', '0055_auto_20190111_1755'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='historicaltreatment',
+ name='image',
+ field=models.TextField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True),
+ ),
+ migrations.AlterField(
+ model_name='historicaltreatment',
+ name='thumbnail',
+ field=models.TextField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True),
+ ),
+ migrations.AlterField(
+ model_name='treatment',
+ name='image',
+ field=models.ImageField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ migrations.AlterField(
+ model_name='treatment',
+ name='thumbnail',
+ field=models.ImageField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ ]
diff --git a/archaeological_operations/migrations/0045_auto_20190118_1203.py b/archaeological_operations/migrations/0045_auto_20190118_1203.py
new file mode 100644
index 000000000..3d5e36eef
--- /dev/null
+++ b/archaeological_operations/migrations/0045_auto_20190118_1203.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.10 on 2019-01-18 12:03
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import ishtar_common.models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_operations', '0044_auto_20190111_1755'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='historicaloperation',
+ name='relation_image',
+ field=models.TextField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=100, null=True, verbose_name='Image des relations (SVG g\xe9n\xe9r\xe9)'),
+ ),
+ migrations.AlterField(
+ model_name='operation',
+ name='relation_image',
+ field=models.FileField(blank=True, help_text='The maximum supported file size is 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Image des relations (SVG g\xe9n\xe9r\xe9)'),
+ ),
+ ]
diff --git a/archaeological_warehouse/migrations/0030_auto_20190118_1203.py b/archaeological_warehouse/migrations/0030_auto_20190118_1203.py
new file mode 100644
index 000000000..e6d1f0c17
--- /dev/null
+++ b/archaeological_warehouse/migrations/0030_auto_20190118_1203.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.10 on 2019-01-18 12:03
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import ishtar_common.models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_warehouse', '0029_auto_20190111_1755'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='container',
+ name='image',
+ field=models.ImageField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ migrations.AlterField(
+ model_name='container',
+ name='thumbnail',
+ field=models.ImageField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ ]
diff --git a/ishtar_common/migrations/0082_auto_20190118_1203.py b/ishtar_common/migrations/0082_auto_20190118_1203.py
new file mode 100644
index 000000000..87f5146e7
--- /dev/null
+++ b/ishtar_common/migrations/0082_auto_20190118_1203.py
@@ -0,0 +1,95 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.10 on 2019-01-18 12:03
+from __future__ import unicode_literals
+
+from django.conf import settings
+import django.contrib.postgres.fields.jsonb
+from django.db import migrations, models
+import django.db.models.deletion
+import ishtar_common.models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ('ishtar_common', '0081_recreate_m2m_history'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='document',
+ name='data',
+ field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, db_index=True, default={}),
+ ),
+ migrations.AddField(
+ model_name='document',
+ 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.AddField(
+ model_name='document',
+ name='history_m2m',
+ field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default={}),
+ ),
+ migrations.AddField(
+ model_name='document',
+ 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.AddField(
+ model_name='document',
+ name='last_modified',
+ field=models.DateTimeField(auto_now=True),
+ ),
+ migrations.AddField(
+ model_name='ishtarsiteprofile',
+ name='document_external_id',
+ field=models.TextField(default='{index}', help_text='Formula to manage document external ID. Change this with care. With incorrect formula, the application might be unusable and import of external data can be destructive.', verbose_name='Document external id'),
+ ),
+ migrations.AlterField(
+ model_name='document',
+ name='associated_file',
+ field=models.FileField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ migrations.AlterField(
+ model_name='document',
+ name='image',
+ field=models.ImageField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ migrations.AlterField(
+ model_name='document',
+ name='thumbnail',
+ field=models.ImageField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=ishtar_common.models.get_image_path),
+ ),
+ migrations.AlterField(
+ model_name='documenttemplate',
+ name='template',
+ field=models.FileField(help_text='The maximum supported file size is 100 Mo.', upload_to=b'templates/%Y/', verbose_name='Patron'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='error_file',
+ field=models.FileField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=b'upload/imports/%Y/%m/', verbose_name='Fichier erreur'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='imported_file',
+ field=models.FileField(help_text='The maximum supported file size is 100 Mo.', max_length=220, upload_to=b'upload/imports/%Y/%m/', verbose_name='Fichier import\xe9'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='imported_images',
+ field=models.FileField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=220, null=True, upload_to=b'upload/imports/%Y/%m/', verbose_name='Images associ\xe9es (fichier zip)'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='match_file',
+ field=models.FileField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=b'upload/imports/%Y/%m/', verbose_name='Fichier de correspondance'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='result_file',
+ field=models.FileField(blank=True, help_text='The maximum supported file size is 100 Mo.', max_length=255, null=True, upload_to=b'upload/imports/%Y/%m/', verbose_name='Fichier r\xe9sultant'),
+ ),
+ ]
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 8fb6df3ac..4078b5840 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2087,6 +2087,13 @@ class IshtarSiteProfile(models.Model, Cached):
u"Change this with care. With incorrect formula, the "
u"application might be unusable and import of external "
u"data can be destructive."))
+ document_external_id = models.TextField(
+ _(u"Document external id"),
+ default=u"{index}",
+ help_text=_(u"Formula to manage document external ID. "
+ u"Change this with care. With incorrect formula, the "
+ u"application might be unusable and import of external "
+ u"data can be destructive."))
person_raw_name = models.TextField(
_(u"Raw name for person"),
default=u"{name|upper} {surname}",
@@ -3754,7 +3761,7 @@ post_save.connect(post_save_cache, sender=LicenseType)
post_delete.connect(post_save_cache, sender=LicenseType)
-class Document(OwnPerms, ImageModel, FullSearch, Imported):
+class Document(BaseHistorizedItem, OwnPerms, ImageModel):
# order is important: put the image in the first match found
# other will be symbolic links
RELATED_MODELS = [