From d47c85795c3c56738fadd63889bb74ca97dbc900 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Fri, 25 Dec 2020 17:33:45 +0100 Subject: [PATCH] FU migrations! --- .../lostplaces/migrations/0001_initial.py | 2 +- .../migrations/0002_reomve_vouchers.py | 22 ---- .../migrations/0004_auto_20201225_1702.py | 118 ++++++++++++++++++ 3 files changed, 119 insertions(+), 23 deletions(-) delete mode 100644 django_lostplaces/lostplaces/migrations/0002_reomve_vouchers.py create mode 100644 django_lostplaces/lostplaces/migrations/0004_auto_20201225_1702.py diff --git a/django_lostplaces/lostplaces/migrations/0001_initial.py b/django_lostplaces/lostplaces/migrations/0001_initial.py index d0ec5d3..724672e 100644 --- a/django_lostplaces/lostplaces/migrations/0001_initial.py +++ b/django_lostplaces/lostplaces/migrations/0001_initial.py @@ -65,7 +65,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('submitted_when', models.DateTimeField(auto_now_add=True, null=True)), ('description', models.TextField(blank=True)), - ('filename', easy_thumbnails.fields.ThumbnailerImageField(upload_to=lostplaces.models.place.generate_image_upload_path)), + ('filename', easy_thumbnails.fields.ThumbnailerImageField(upload_to=lostplaces.models.place.generate_place_image_filename)), ('place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='placeimages', to='lostplaces.place')), ('submitted_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='placeimages', to='lostplaces.explorer')), ], diff --git a/django_lostplaces/lostplaces/migrations/0002_reomve_vouchers.py b/django_lostplaces/lostplaces/migrations/0002_reomve_vouchers.py deleted file mode 100644 index d87ac47..0000000 --- a/django_lostplaces/lostplaces/migrations/0002_reomve_vouchers.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 3.1.1 on 2020-10-04 19:37 -# Edited by reverend - -import datetime -from django.db import migrations, models -import django.utils.timezone -from django.utils.timezone import utc - -class Migration(migrations.Migration): - - dependencies = [ - ('lostplaces', '0001_initial'), - ] - - operations = [ - migrations.DeleteModel( - name='Voucher' - ), - migrations.DeleteModel( - name='Expireable' - ) - ] \ No newline at end of file diff --git a/django_lostplaces/lostplaces/migrations/0004_auto_20201225_1702.py b/django_lostplaces/lostplaces/migrations/0004_auto_20201225_1702.py new file mode 100644 index 0000000..9377951 --- /dev/null +++ b/django_lostplaces/lostplaces/migrations/0004_auto_20201225_1702.py @@ -0,0 +1,118 @@ +# Generated by Django 3.1.4 on 2020-12-25 16:02 + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion +import easy_thumbnails.fields +from lostplaces.models.models import generate_profile_image_filename +from lostplaces.models.place import generate_place_image_filename + + +class Migration(migrations.Migration): + + dependencies = [ + ('lostplaces', '0003_voucher'), + ] + + operations = [ + migrations.AddField( + model_name='explorer', + name='bio', + field=models.TextField(blank=True, help_text='Describe yourself, your preferences, etc. in a few sentences.', null=True, verbose_name='Biography / Description'), + ), +# migrations.AddField( +# model_name='explorer', +# name='favorite_places', +# field=models.ManyToManyField(blank=True, related_name='explorer_favorites', to='lostplaces.Place', verbose_name='Explorers favorite places'), +# ), + migrations.AddField( + model_name='explorer', + name='profile_image', + field=easy_thumbnails.fields.ThumbnailerImageField(blank=True, help_text='Optional profile image for display in Explorer profile', null=True, upload_to=generate_profile_image_filename, verbose_name='Profile image'), + ), + migrations.AlterField( + model_name='photoalbum', + name='label', + field=models.CharField(max_length=100, verbose_name='link text'), + ), + migrations.AlterField( + model_name='photoalbum', + name='submitted_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='photoalbums', to='lostplaces.explorer', verbose_name='Submitter'), + ), + migrations.AlterField( + model_name='photoalbum', + name='submitted_when', + field=models.DateTimeField(auto_now_add=True, null=True, verbose_name='Submission date'), + ), + migrations.AlterField( + model_name='photoalbum', + name='url', + field=models.URLField(verbose_name='URL'), + ), + migrations.AlterField( + model_name='place', + name='description', + field=models.TextField(help_text="Description of the place: e.g. how to get there, where to be careful, the place's history...", verbose_name='Description'), + ), + migrations.AlterField( + model_name='place', + name='latitude', + field=models.FloatField(help_text='Latitude in decimal format: e. g. 41.40338', validators=[django.core.validators.MinValueValidator(-90), django.core.validators.MaxValueValidator(90)], verbose_name='Latitude'), + ), + migrations.AlterField( + model_name='place', + name='location', + field=models.CharField(max_length=50, verbose_name='Location'), + ), + migrations.AlterField( + model_name='place', + name='longitude', + field=models.FloatField(help_text='Longitude in decimal format: e. g. 2.17403', validators=[django.core.validators.MinValueValidator(-180), django.core.validators.MaxValueValidator(180)], verbose_name='Longitude'), + ), + migrations.AlterField( + model_name='place', + name='name', + field=models.CharField(max_length=50, verbose_name='Name'), + ), + migrations.AlterField( + model_name='place', + name='submitted_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='places', to='lostplaces.explorer', verbose_name='Submitter'), + ), + migrations.AlterField( + model_name='place', + name='submitted_when', + field=models.DateTimeField(auto_now_add=True, null=True, verbose_name='Submission date'), + ), + migrations.AlterField( + model_name='placeimage', + name='description', + field=models.TextField(blank=True, verbose_name='Description'), + ), + migrations.AlterField( + model_name='placeimage', + name='filename', + field=easy_thumbnails.fields.ThumbnailerImageField(help_text='Optional: One or more images to upload', upload_to=generate_place_image_filename, verbose_name='Filename(s)'), + ), + migrations.AlterField( + model_name='placeimage', + name='submitted_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='placeimages', to='lostplaces.explorer', verbose_name='Submitter'), + ), + migrations.AlterField( + model_name='placeimage', + name='submitted_when', + field=models.DateTimeField(auto_now_add=True, null=True, verbose_name='Submission date'), + ), + migrations.AlterField( + model_name='voucher', + name='created_when', + field=models.DateTimeField(auto_now_add=True, verbose_name='Creation date'), + ), + migrations.AlterField( + model_name='voucher', + name='expires_when', + field=models.DateTimeField(verbose_name='Expiration date'), + ), + ]