summaryrefslogtreecommitdiff
path: root/ishtar_common/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/migrations')
-rw-r--r--ishtar_common/migrations/0263_media_exporter.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/ishtar_common/migrations/0263_media_exporter.py b/ishtar_common/migrations/0263_media_exporter.py
new file mode 100644
index 000000000..2776b1271
--- /dev/null
+++ b/ishtar_common/migrations/0263_media_exporter.py
@@ -0,0 +1,36 @@
+# Generated by Django 2.2.24 on 2025-06-16 15:18
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('ishtar_common', '0262_migrate_custom_form_slug'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='MediaExporter',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=200, verbose_name='Name')),
+ ('slug', models.SlugField(max_length=100, unique=True, verbose_name='Slug')),
+ ('available', models.BooleanField(default=True, verbose_name='Available')),
+ ('files_to_export', models.CharField(choices=[('I', 'Images'), ('F', 'Associated files'), ('A', 'All')], default='I', max_length=1, verbose_name='Files to export')),
+ ('thumbnail_for_images', models.BooleanField(default=False, verbose_name='Use thumbnails for images')),
+ ('cascade', models.BooleanField(default=False, help_text='Export media of all attached items. For instance, for a context record, get all media attached to the attached finds.', verbose_name='Cascade export')),
+ ('query', models.TextField(blank=True, default='', help_text="Use 'text' query used in Ishtar search input. Can be left empty to export all.", verbose_name='Filter query')),
+ ('naming', models.TextField(blank=True, default='', help_text='Can use jinja template logic to have conditionnal naming. If left empty, each media will be named with incremented numbers.', verbose_name='Naming')),
+ ('associated_model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='media_exporters', to='ishtar_common.ImporterModel', verbose_name='Associated model')),
+ ('profile_types', models.ManyToManyField(blank=True, help_text='Limit to user with theses profiles', to='ishtar_common.ProfileType', verbose_name='Profile types')),
+ ('users', models.ManyToManyField(blank=True, help_text='Limit to theses users', to='ishtar_common.IshtarUser', verbose_name='Users')),
+ ],
+ options={
+ 'verbose_name': 'Media exporter',
+ 'verbose_name_plural': 'Media exporters',
+ 'ordering': ('name',),
+ },
+ ),
+ ]