summaryrefslogtreecommitdiff
path: root/app/media/migrations/0001_initial.py
blob: 623e685d4735cf2b056ec5131b72f248361eeb3a (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Generated by Django 3.2.8 on 2021-10-06 20:30

import datetime
from django.db import migrations, models
import django.db.models.deletion
import media.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='LuxAudio',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('subtitle', models.CharField(blank=True, max_length=200)),
                ('slug', models.SlugField(blank=True, unique_for_date='pub_date')),
                ('body_html', models.TextField(blank=True)),
                ('body_markdown', models.TextField(blank=True)),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now)),
                ('mp3', models.FileField(blank=True, null=True, upload_to=media.models.get_audio_upload_path)),
                ('ogg', models.FileField(blank=True, null=True, upload_to=media.models.get_audio_upload_path)),
            ],
            options={
                'verbose_name': 'Audio',
                'verbose_name_plural': 'Audio',
                'ordering': ('-pub_date',),
                'get_latest_by': 'pub_date',
            },
        ),
        migrations.CreateModel(
            name='LuxImageSize',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=30, null=True)),
                ('width', models.IntegerField(blank=True, null=True)),
                ('height', models.IntegerField(blank=True, null=True)),
                ('quality', models.IntegerField()),
            ],
            options={
                'verbose_name_plural': 'Image Sizes',
                'ordering': ('-name', 'id'),
            },
        ),
        migrations.CreateModel(
            name='LuxVideo',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('video_mp4', models.FileField(blank=True, null=True, upload_to=media.models.get_vid_upload_path)),
                ('video_webm', models.FileField(blank=True, null=True, upload_to=media.models.get_vid_upload_path)),
                ('video_poster', models.FileField(blank=True, null=True, upload_to=media.models.get_vid_upload_path)),
                ('title', models.CharField(blank=True, max_length=300, null=True)),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now)),
                ('youtube_url', models.CharField(blank=True, max_length=80, null=True)),
                ('vimeo_url', models.CharField(blank=True, max_length=300, null=True)),
            ],
            options={
                'verbose_name': 'Video',
                'verbose_name_plural': 'Videos',
                'ordering': ('-pub_date', 'id'),
                'get_latest_by': 'pub_date',
            },
        ),
        migrations.CreateModel(
            name='LuxImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.FileField(blank=True, null=True, upload_to=media.models.get_upload_path)),
                ('title', models.CharField(blank=True, max_length=300, null=True)),
                ('alt', models.CharField(blank=True, max_length=300, null=True)),
                ('photo_credit_source', models.CharField(blank=True, max_length=300, null=True)),
                ('photo_credit_url', models.CharField(blank=True, max_length=300, null=True)),
                ('caption', models.TextField(blank=True, null=True)),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now)),
                ('height', models.CharField(blank=True, max_length=6, null=True)),
                ('width', models.CharField(blank=True, max_length=6, null=True)),
                ('is_public', models.BooleanField(default=True)),
                ('sizes', models.ManyToManyField(blank=True, to='media.LuxImageSize')),
            ],
            options={
                'verbose_name_plural': 'Images',
                'ordering': ('-pub_date', 'id'),
                'get_latest_by': 'pub_date',
            },
        ),
        migrations.CreateModel(
            name='LuxGallery',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=300)),
                ('description', models.TextField(blank=True, null=True)),
                ('slug', models.CharField(blank=True, max_length=300)),
                ('pub_date', models.DateTimeField(null=True)),
                ('is_public', models.BooleanField(default=True)),
                ('caption_style', models.CharField(blank=True, max_length=400, null=True)),
                ('images', models.ManyToManyField(to='media.LuxImage')),
                ('thumb', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gallery_thumb', to='media.luximage')),
            ],
            options={
                'verbose_name_plural': 'Galleries',
                'ordering': ('-pub_date', 'id'),
                'get_latest_by': 'pub_date',
            },
        ),
    ]