-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path0001_initial.py
67 lines (61 loc) · 3.53 KB
/
0001_initial.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Generated by Django 2.2.15 on 2020-09-04 07:38
import attachment.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
migrations.CreateModel(
name='AttachmentImage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('object_id', models.PositiveIntegerField()),
('position', models.IntegerField(default=1, verbose_name='position')),
('image', attachment.fields.ImagePreviewField(upload_to='upload/attachment/source', verbose_name='image')),
('title', models.TextField(blank=True, null=True, verbose_name='title')),
('group', models.CharField(blank=True, max_length=200, null=True, verbose_name='group')),
('role', models.CharField(blank=True, max_length=200, null=True, verbose_name='role')),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
],
options={
'ordering': ('position',),
'verbose_name': 'image',
'verbose_name_plural': 'images',
},
),
migrations.CreateModel(
name='AttachmentFile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('object_id', models.PositiveIntegerField()),
('position', models.IntegerField(default=1, verbose_name='position')),
('file', models.FileField(upload_to='upload/attachment/source', verbose_name='file')),
('title', models.TextField(blank=True, null=True, verbose_name='title')),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
],
options={
'verbose_name': 'file',
'verbose_name_plural': 'files',
},
),
migrations.CreateModel(
name='AttachmentArchive',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('object_id', models.PositiveIntegerField()),
('file_list', models.TextField(blank=True, null=True, verbose_name='Список файлов')),
('uploaded_date', models.DateTimeField(auto_now_add=True, verbose_name='Загружен')),
('unpacked', models.BooleanField(default=False, verbose_name='Распакован')),
('zip_file', models.FileField(help_text='Внимание: загрузка и распаковка архива может занять длительное время', upload_to='upload/attachment/source', verbose_name='ZIP-архив')),
('use_filenames_as_titles', models.BooleanField(default=False, verbose_name='Использовать имена файлов в качестве заголовков')),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
],
options={
'verbose_name': 'Архив вложений',
'verbose_name_plural': 'Архивы вложений',
},
),
]