diff options
Diffstat (limited to 'app/media/migrations/0001_initial.py')
-rw-r--r-- | app/media/migrations/0001_initial.py | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/app/media/migrations/0001_initial.py b/app/media/migrations/0001_initial.py new file mode 100644 index 0000000..8ca4631 --- /dev/null +++ b/app/media/migrations/0001_initial.py @@ -0,0 +1,111 @@ +# Generated by Django 3.1.3 on 2020-11-30 22:44 + +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.AutoField(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.AutoField(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.AutoField(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.AutoField(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.AutoField(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', + }, + ), + ] |