From: Radek Czajka Date: Mon, 18 Mar 2019 11:53:27 +0000 (+0100) Subject: Remove binary leftovers from migrations. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/c226012e4114e09fd37cd384a2aada77476815cd?ds=sidebyside Remove binary leftovers from migrations. --- diff --git a/src/api/migrations/0005_consumer_nonce_resource_token.py b/src/api/migrations/0005_consumer_nonce_resource_token.py index 713220350..ebbf81da6 100644 --- a/src/api/migrations/0005_consumer_nonce_resource_token.py +++ b/src/api/migrations/0005_consumer_nonce_resource_token.py @@ -23,7 +23,7 @@ class Migration(migrations.Migration): ('description', models.TextField()), ('key', models.CharField(max_length=18)), ('secret', models.CharField(max_length=32)), - ('status', models.CharField(choices=[(b'pending', b'Pending approval'), (b'accepted', b'Accepted'), (b'canceled', b'Canceled')], default=b'pending', max_length=16)), + ('status', models.CharField(choices=[('pending', 'Pending approval'), ('accepted', 'Accepted'), ('canceled', 'Canceled')], default='pending', max_length=16)), ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='consumers', to=settings.AUTH_USER_MODEL)), ], ), diff --git a/src/catalogue/migrations/0001_initial.py b/src/catalogue/migrations/0001_initial.py index 661fde840..37d502b8a 100644 --- a/src/catalogue/migrations/0001_initial.py +++ b/src/catalogue/migrations/0001_initial.py @@ -27,7 +27,7 @@ class Migration(migrations.Migration): ('sort_key_author', models.CharField(default='', verbose_name='sort key by author', max_length=120, editable=False, db_index=True)), ('slug', models.SlugField(unique=True, max_length=120, verbose_name='Slug')), ('common_slug', models.SlugField(max_length=120, verbose_name='Slug')), - ('language', models.CharField(default=b'pol', max_length=3, verbose_name='language code', db_index=True)), + ('language', models.CharField(default='pol', max_length=3, verbose_name='language code', db_index=True)), ('description', models.TextField(verbose_name='Description', blank=True)), ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date', db_index=True)), ('changed_at', models.DateTimeField(auto_now=True, verbose_name='creation date', db_index=True)), @@ -35,17 +35,17 @@ class Migration(migrations.Migration): ('extra_info', jsonfield.fields.JSONField(default={}, verbose_name='Additional information')), ('gazeta_link', models.CharField(max_length=240, blank=True)), ('wiki_link', models.CharField(max_length=240, blank=True)), - ('cover', catalogue.fields.EbookField(b'cover', upload_to=catalogue.models.book._cover_upload_to, storage=fnpdjango.storage.BofhFileSystemStorage(), max_length=255, blank=True, null=True, verbose_name='cover')), - ('cover_thumb', catalogue.fields.EbookField(b'cover_thumb', max_length=255, upload_to=catalogue.models.book._cover_thumb_upload_to, null=True, verbose_name='cover thumbnail', blank=True)), + ('cover', catalogue.fields.EbookField('cover', upload_to=catalogue.models.book._cover_upload_to, storage=fnpdjango.storage.BofhFileSystemStorage(), max_length=255, blank=True, null=True, verbose_name='cover')), + ('cover_thumb', catalogue.fields.EbookField('cover_thumb', max_length=255, upload_to=catalogue.models.book._cover_thumb_upload_to, null=True, verbose_name='cover thumbnail', blank=True)), ('_related_info', jsonfield.fields.JSONField(null=True, editable=False, blank=True)), - ('txt_file', catalogue.fields.EbookField(b'txt', default=b'', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._txt_upload_to, max_length=255, blank=True, verbose_name='TXT file')), - ('fb2_file', catalogue.fields.EbookField(b'fb2', default=b'', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._fb2_upload_to, max_length=255, blank=True, verbose_name='FB2 file')), - ('pdf_file', catalogue.fields.EbookField(b'pdf', default=b'', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._pdf_upload_to, max_length=255, blank=True, verbose_name='PDF file')), - ('epub_file', catalogue.fields.EbookField(b'epub', default=b'', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._epub_upload_to, max_length=255, blank=True, verbose_name='EPUB file')), - ('mobi_file', catalogue.fields.EbookField(b'mobi', default=b'', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._mobi_upload_to, max_length=255, blank=True, verbose_name='MOBI file')), - ('html_file', catalogue.fields.EbookField(b'html', default=b'', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._html_upload_to, max_length=255, blank=True, verbose_name='HTML file')), - ('xml_file', catalogue.fields.EbookField(b'xml', default=b'', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._xml_upload_to, max_length=255, blank=True, verbose_name='XML file')), - ('parent', models.ForeignKey(related_name=b'children', blank=True, to='catalogue.Book', null=True)), + ('txt_file', catalogue.fields.EbookField('txt', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._txt_upload_to, max_length=255, blank=True, verbose_name='TXT file')), + ('fb2_file', catalogue.fields.EbookField('fb2', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._fb2_upload_to, max_length=255, blank=True, verbose_name='FB2 file')), + ('pdf_file', catalogue.fields.EbookField('pdf', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._pdf_upload_to, max_length=255, blank=True, verbose_name='PDF file')), + ('epub_file', catalogue.fields.EbookField('epub', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._epub_upload_to, max_length=255, blank=True, verbose_name='EPUB file')), + ('mobi_file', catalogue.fields.EbookField('mobi', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._mobi_upload_to, max_length=255, blank=True, verbose_name='MOBI file')), + ('html_file', catalogue.fields.EbookField('html', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._html_upload_to, max_length=255, blank=True, verbose_name='HTML file')), + ('xml_file', catalogue.fields.EbookField('xml', default='', storage=fnpdjango.storage.BofhFileSystemStorage(), upload_to=catalogue.models.book._xml_upload_to, max_length=255, blank=True, verbose_name='XML file')), + ('parent', models.ForeignKey(related_name='children', blank=True, to='catalogue.Book', null=True)), ], options={ 'ordering': ('sort_key',), @@ -58,13 +58,13 @@ class Migration(migrations.Migration): name='BookMedia', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('type', models.CharField(db_index=True, max_length=20, verbose_name='type', choices=[(b'mp3', 'MP3 file'), (b'ogg', 'Ogg Vorbis file'), (b'daisy', 'DAISY file')])), + ('type', models.CharField(db_index=True, max_length=20, verbose_name='type', choices=[('mp3', 'MP3 file'), ('ogg', 'Ogg Vorbis file'), ('daisy', 'DAISY file')])), ('name', models.CharField(max_length=512, verbose_name='name')), ('file', catalogue.fields.OverwritingFileField(upload_to=catalogue.models.bookmedia._file_upload_to, max_length=600, verbose_name='XML file')), ('uploaded_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date', db_index=True)), ('extra_info', jsonfield.fields.JSONField(default={}, verbose_name='Additional information', editable=False)), ('source_sha1', models.CharField(max_length=40, null=True, editable=False, blank=True)), - ('book', models.ForeignKey(related_name=b'media', to='catalogue.Book')), + ('book', models.ForeignKey(related_name='media', to='catalogue.Book')), ], options={ 'ordering': ('type', 'name'), @@ -98,7 +98,7 @@ class Migration(migrations.Migration): ('description_ru', models.TextField(null=True, verbose_name='Description', blank=True)), ('description_uk', models.TextField(null=True, verbose_name='Description', blank=True)), ('book_slugs', models.TextField(verbose_name='Book stubs')), - ('kind', models.CharField(default=b'book', max_length=10, verbose_name='form', db_index=True, choices=[(b'book', 'book'), (b'picture', b'picture')])), + ('kind', models.CharField(default='book', max_length=10, verbose_name='form', db_index=True, choices=[('book', 'book'), ('picture', 'picture')])), ], options={ 'ordering': ('title',), @@ -114,7 +114,7 @@ class Migration(migrations.Migration): ('text', models.TextField()), ('short_text', models.TextField(editable=False)), ('anchor', models.CharField(max_length=120)), - ('book', models.ForeignKey(related_name=b'fragments', to='catalogue.Book')), + ('book', models.ForeignKey(related_name='fragments', to='catalogue.Book')), ], options={ 'ordering': ('book', 'anchor'), @@ -161,7 +161,7 @@ class Migration(migrations.Migration): ('name_uk', models.CharField(max_length=50, null=True, verbose_name='name', db_index=True)), ('slug', models.SlugField(max_length=120, verbose_name='Slug')), ('sort_key', models.CharField(max_length=120, verbose_name='Sort key', db_index=True)), - ('category', models.CharField(db_index=True, max_length=50, verbose_name='Category', choices=[(b'author', 'author'), (b'epoch', 'period'), (b'kind', 'form'), (b'genre', 'genre'), (b'theme', 'motif'), (b'set', 'set'), (b'book', 'book'), (b'thing', 'thing')])), + ('category', models.CharField(db_index=True, max_length=50, verbose_name='Category', choices=[('author', 'author'), ('epoch', 'period'), ('kind', 'form'), ('genre', 'genre'), ('theme', 'motif'), ('set', 'set'), ('book', 'book'), ('thing', 'thing')])), ('description', models.TextField(verbose_name='Description', blank=True)), ('description_de', models.TextField(null=True, verbose_name='Description', blank=True)), ('description_en', models.TextField(null=True, verbose_name='Description', blank=True)), @@ -203,7 +203,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('object_id', models.PositiveIntegerField(verbose_name='object id', db_index=True)), ('content_type', models.ForeignKey(verbose_name='content type', to='contenttypes.ContentType')), - ('tag', models.ForeignKey(related_name=b'items', verbose_name='tag', to='catalogue.Tag')), + ('tag', models.ForeignKey(related_name='items', verbose_name='tag', to='catalogue.Tag')), ], options={ 'db_table': 'catalogue_tag_relation', diff --git a/src/catalogue/migrations/0002_book_ancestor.py b/src/catalogue/migrations/0002_book_ancestor.py index 9f304c3d7..114a6c2a3 100644 --- a/src/catalogue/migrations/0002_book_ancestor.py +++ b/src/catalogue/migrations/0002_book_ancestor.py @@ -14,7 +14,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='book', name='ancestor', - field=models.ManyToManyField(related_name=b'descendant', null=True, editable=False, to='catalogue.Book', blank=True), + field=models.ManyToManyField(related_name='descendant', null=True, editable=False, to='catalogue.Book', blank=True), preserve_default=True, ), ] diff --git a/src/catalogue/migrations/0004_remove_booktags_count_related_info.py b/src/catalogue/migrations/0004_remove_booktags_count_related_info.py index 916224b25..48c936fff 100644 --- a/src/catalogue/migrations/0004_remove_booktags_count_related_info.py +++ b/src/catalogue/migrations/0004_remove_booktags_count_related_info.py @@ -14,7 +14,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='tag', name='category', - field=models.CharField(db_index=True, max_length=50, verbose_name='Category', choices=[(b'author', 'author'), (b'epoch', 'period'), (b'kind', 'form'), (b'genre', 'genre'), (b'theme', 'motif'), (b'set', 'set'), (b'thing', 'thing')]), + field=models.CharField(db_index=True, max_length=50, verbose_name='Category', choices=[('author', 'author'), ('epoch', 'period'), ('kind', 'form'), ('genre', 'genre'), ('theme', 'motif'), ('set', 'set'), ('thing', 'thing')]), ), migrations.RemoveField( diff --git a/src/catalogue/migrations/0008_auto_20151221_1225.py b/src/catalogue/migrations/0008_auto_20151221_1225.py index ba6c47027..c7f0aa773 100644 --- a/src/catalogue/migrations/0008_auto_20151221_1225.py +++ b/src/catalogue/migrations/0008_auto_20151221_1225.py @@ -130,7 +130,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='collection', name='kind', - field=models.CharField(default=b'book', max_length=10, verbose_name='kind', db_index=True, choices=[(b'book', 'book'), (b'picture', b'picture')]), + field=models.CharField(default='book', max_length=10, verbose_name='kind', db_index=True, choices=[('book', 'book'), ('picture', 'picture')]), ), migrations.AlterField( model_name='collection', @@ -190,7 +190,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='tag', name='category', - field=models.CharField(db_index=True, max_length=50, verbose_name='category', choices=[(b'author', 'author'), (b'epoch', 'epoch'), (b'kind', 'kind'), (b'genre', 'genre'), (b'theme', 'theme'), (b'set', 'set'), (b'thing', 'thing')]), + field=models.CharField(db_index=True, max_length=50, verbose_name='category', choices=[('author', 'author'), ('epoch', 'epoch'), ('kind', 'kind'), ('genre', 'genre'), ('theme', 'theme'), ('set', 'set'), ('thing', 'thing')]), ), migrations.AlterField( model_name='tag', diff --git a/src/catalogue/migrations/0012_auto_20161020_1407.py b/src/catalogue/migrations/0012_auto_20161020_1407.py index 56b70d823..4ce2c19a7 100644 --- a/src/catalogue/migrations/0012_auto_20161020_1407.py +++ b/src/catalogue/migrations/0012_auto_20161020_1407.py @@ -19,6 +19,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='bookmedia', name='part_name', - field=models.CharField(default=b'', max_length=512, verbose_name='part name'), + field=models.CharField(default='', max_length=512, verbose_name='part name'), ), ] diff --git a/src/catalogue/migrations/0018_auto_20171221_1106.py b/src/catalogue/migrations/0018_auto_20171221_1106.py index e13685d7a..581f109aa 100644 --- a/src/catalogue/migrations/0018_auto_20171221_1106.py +++ b/src/catalogue/migrations/0018_auto_20171221_1106.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='bookmedia', name='part_name', - field=models.CharField(default=b'', max_length=512, verbose_name='part name', blank=True), + field=models.CharField(default='', max_length=512, verbose_name='part name', blank=True), ), ] diff --git a/src/catalogue/migrations/0020_book_cover_api_thumb.py b/src/catalogue/migrations/0020_book_cover_api_thumb.py index 45db58d13..1b0960e9f 100644 --- a/src/catalogue/migrations/0020_book_cover_api_thumb.py +++ b/src/catalogue/migrations/0020_book_cover_api_thumb.py @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='book', name='cover_api_thumb', - field=catalogue.fields.EbookField(b'cover_api_thumb', max_length=255, upload_to=catalogue.models.book.UploadToPath(b'book/cover_api_thumb/%s.jpg'), null=True, verbose_name='cover thumbnail for API', blank=True), + field=catalogue.fields.EbookField('cover_api_thumb', max_length=255, upload_to=catalogue.models.book.UploadToPath('book/cover_api_thumb/%s.jpg'), null=True, verbose_name='cover thumbnail for API', blank=True), ), ] diff --git a/src/catalogue/migrations/0021_auto_20171222_1404.py b/src/catalogue/migrations/0021_auto_20171222_1404.py index 845dc6969..8bf9a60dc 100644 --- a/src/catalogue/migrations/0021_auto_20171222_1404.py +++ b/src/catalogue/migrations/0021_auto_20171222_1404.py @@ -16,11 +16,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='book', name='simple_cover', - field=catalogue.fields.EbookField(b'simple_cover', max_length=255, upload_to=catalogue.models.book.UploadToPath(b'book/cover_simple/%s.jpg'), null=True, verbose_name='cover for mobile app', blank=True), + field=catalogue.fields.EbookField('simple_cover', max_length=255, upload_to=catalogue.models.book.UploadToPath('book/cover_simple/%s.jpg'), null=True, verbose_name='cover for mobile app', blank=True), ), migrations.AlterField( model_name='book', name='cover_api_thumb', - field=catalogue.fields.EbookField(b'cover_api_thumb', max_length=255, upload_to=catalogue.models.book.UploadToPath(b'book/cover_api_thumb/%s.jpg'), null=True, verbose_name='cover thumbnail for mobile app', blank=True), + field=catalogue.fields.EbookField('cover_api_thumb', max_length=255, upload_to=catalogue.models.book.UploadToPath('book/cover_api_thumb/%s.jpg'), null=True, verbose_name='cover thumbnail for mobile app', blank=True), ), ] diff --git a/src/chunks/migrations/0001_initial.py b/src/chunks/migrations/0001_initial.py index 878e4fbfb..94ed3dae6 100644 --- a/src/chunks/migrations/0001_initial.py +++ b/src/chunks/migrations/0001_initial.py @@ -14,7 +14,7 @@ class Migration(migrations.Migration): name='Attachment', fields=[ ('key', models.CharField(help_text='A unique name for this attachment', max_length=255, serialize=False, verbose_name='key', primary_key=True)), - ('attachment', models.FileField(upload_to=b'chunks/attachment')), + ('attachment', models.FileField(upload_to='chunks/attachment')), ], options={ 'ordering': ('key',), diff --git a/src/club/migrations/0001_initial.py b/src/club/migrations/0001_initial.py index a3b7455e5..3480e3f14 100644 --- a/src/club/migrations/0001_initial.py +++ b/src/club/migrations/0001_initial.py @@ -92,7 +92,7 @@ class Migration(migrations.Migration): ('key', models.CharField(max_length=255, unique=True, verbose_name='key')), ('email', models.EmailField(max_length=254, verbose_name='email')), ('amount', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='amount')), - ('method', models.CharField(choices=[(b'payu', b'PayU'), (b'payu-re', b'PayU Recurring'), (b'paypal-re', b'PayPal Recurring')], max_length=255, verbose_name='method')), + ('method', models.CharField(choices=[('payu', 'PayU'), ('payu-re', 'PayU Recurring'), ('paypal-re', 'PayPal Recurring')], max_length=255, verbose_name='method')), ('is_active', models.BooleanField(default=False, verbose_name='active')), ('is_cancelled', models.BooleanField(default=False, verbose_name='cancelled')), ('started_at', models.DateTimeField(auto_now_add=True, verbose_name='started at')), diff --git a/src/contact/migrations/0001_initial.py b/src/contact/migrations/0001_initial.py index e824a3c7a..1c0a565b4 100644 --- a/src/contact/migrations/0001_initial.py +++ b/src/contact/migrations/0001_initial.py @@ -16,7 +16,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('tag', models.CharField(max_length=64)), - ('file', models.FileField(upload_to=b'contact/attachment')), + ('file', models.FileField(upload_to='contact/attachment')), ], ), migrations.CreateModel( diff --git a/src/funding/migrations/0001_initial.py b/src/funding/migrations/0001_initial.py index cebe8d287..f802027cf 100644 --- a/src/funding/migrations/0001_initial.py +++ b/src/funding/migrations/0001_initial.py @@ -44,7 +44,7 @@ class Migration(migrations.Migration): ('start', models.DateField(verbose_name='start', db_index=True)), ('end', models.DateField(verbose_name='end', db_index=True)), ('redakcja_url', models.URLField(verbose_name='redakcja URL', blank=True)), - ('cover', models.ImageField(upload_to=b'funding/covers', verbose_name='Cover')), + ('cover', models.ImageField(upload_to='funding/covers', verbose_name='Cover')), ('notified_near', models.DateTimeField(null=True, verbose_name='Near-end notifications sent', blank=True)), ('notified_end', models.DateTimeField(null=True, verbose_name='End notifications sent', blank=True)), ('book', models.ForeignKey(blank=True, to='catalogue.Book', help_text='Published book.', null=True)), diff --git a/src/isbn/migrations/0003_isbnpool_purpose.py b/src/isbn/migrations/0003_isbnpool_purpose.py index 963c69961..6e4dc09bd 100644 --- a/src/isbn/migrations/0003_isbnpool_purpose.py +++ b/src/isbn/migrations/0003_isbnpool_purpose.py @@ -14,7 +14,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='isbnpool', name='purpose', - field=models.CharField(default='', max_length=4, choices=[(b'WL', b'Wolne Lektury'), (b'FNP', b'Fundacja Nowoczesna Polska')]), + field=models.CharField(default='', max_length=4, choices=[('WL', 'Wolne Lektury'), ('FNP', 'Fundacja Nowoczesna Polska')]), preserve_default=False, ), ] diff --git a/src/isbn/migrations/0004_auto_20180215_1042.py b/src/isbn/migrations/0004_auto_20180215_1042.py index 6fa7f8cef..2015dc2fe 100644 --- a/src/isbn/migrations/0004_auto_20180215_1042.py +++ b/src/isbn/migrations/0004_auto_20180215_1042.py @@ -14,7 +14,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='onixrecord', name='dc_slug', - field=models.CharField(default=b'', max_length=256, db_index=True), + field=models.CharField(default='', max_length=256, db_index=True), ), migrations.AlterUniqueTogether( name='onixrecord', diff --git a/src/lesmianator/migrations/0001_initial.py b/src/lesmianator/migrations/0001_initial.py index 17627e682..1980b26b9 100644 --- a/src/lesmianator/migrations/0001_initial.py +++ b/src/lesmianator/migrations/0001_initial.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): name='Continuations', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('pickle', models.FileField(upload_to=b'lesmianator', verbose_name='Continuations file')), + ('pickle', models.FileField(upload_to='lesmianator', verbose_name='Continuations file')), ('object_id', models.PositiveIntegerField()), ('content_type', models.ForeignKey(to='contenttypes.ContentType')), ], diff --git a/src/libraries/migrations/0001_initial.py b/src/libraries/migrations/0001_initial.py index 4b210f8b7..91c10e5e6 100644 --- a/src/libraries/migrations/0001_initial.py +++ b/src/libraries/migrations/0001_initial.py @@ -32,7 +32,7 @@ class Migration(migrations.Migration): ('slug', models.SlugField(max_length=120, unique=True, null=True, verbose_name='Slug')), ('url', models.CharField(max_length=120, verbose_name='url', blank=True)), ('description', models.TextField(verbose_name='Description', blank=True)), - ('catalog', models.ForeignKey(related_name=b'libraries', on_delete=django.db.models.deletion.PROTECT, to='libraries.Catalog')), + ('catalog', models.ForeignKey(related_name='libraries', on_delete=django.db.models.deletion.PROTECT, to='libraries.Catalog')), ], options={ 'verbose_name': 'library', diff --git a/src/picture/migrations/0001_initial.py b/src/picture/migrations/0001_initial.py index 59dbff64f..6280cf21e 100644 --- a/src/picture/migrations/0001_initial.py +++ b/src/picture/migrations/0001_initial.py @@ -7,7 +7,6 @@ from django.db import models, migrations import sorl.thumbnail.fields import jsonfield.fields import django.core.files.storage -from django.utils.encoding import force_bytes class Migration(migrations.Migration): @@ -26,9 +25,9 @@ class Migration(migrations.Migration): ('sort_key_author', models.CharField(default='', verbose_name='sort key by author', max_length=120, editable=False, db_index=True)), ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date', db_index=True)), ('changed_at', models.DateTimeField(auto_now=True, verbose_name='creation date', db_index=True)), - ('xml_file', models.FileField(upload_to=b'xml', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name=b'xml_file')), - ('image_file', sorl.thumbnail.fields.ImageField(upload_to=b'images', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name='image_file')), - ('html_file', models.FileField(upload_to=b'html', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name=b'html_file')), + ('xml_file', models.FileField(upload_to='xml', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='xml_file')), + ('image_file', sorl.thumbnail.fields.ImageField(upload_to='images', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='image_file')), + ('html_file', models.FileField(upload_to='html', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='html_file')), ('areas_json', jsonfield.fields.JSONField(default={}, verbose_name='picture areas JSON', editable=False)), ('extra_info', jsonfield.fields.JSONField(default={}, verbose_name='Additional information')), ('culturepl_link', models.CharField(max_length=240, blank=True)), @@ -49,8 +48,8 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('area', jsonfield.fields.JSONField(default={}, verbose_name='area', editable=False)), - ('kind', models.CharField(db_index=True, max_length=10, verbose_name='form', choices=[(b'thing', 'thing'), (b'theme', 'motif')])), - ('picture', models.ForeignKey(related_name=b'areas', to='picture.Picture')), + ('kind', models.CharField(db_index=True, max_length=10, verbose_name='form', choices=[('thing', 'thing'), ('theme', 'motif')])), + ('picture', models.ForeignKey(related_name='areas', to='picture.Picture')), ], options={ }, diff --git a/src/picture/migrations/0006_auto_20151221_1225.py b/src/picture/migrations/0006_auto_20151221_1225.py index 2f03ce591..9f1a82c5b 100644 --- a/src/picture/migrations/0006_auto_20151221_1225.py +++ b/src/picture/migrations/0006_auto_20151221_1225.py @@ -35,6 +35,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='picturearea', name='kind', - field=models.CharField(db_index=True, max_length=10, verbose_name='kind', choices=[(b'thing', 'thing'), (b'theme', 'theme')]), + field=models.CharField(db_index=True, max_length=10, verbose_name='kind', choices=[('thing', 'thing'), ('theme', 'theme')]), ), ] diff --git a/src/picture/migrations/0007_auto_20160125_1709.py b/src/picture/migrations/0007_auto_20160125_1709.py index 39e107b54..1f70f40e1 100644 --- a/src/picture/migrations/0007_auto_20160125_1709.py +++ b/src/picture/migrations/0007_auto_20160125_1709.py @@ -5,7 +5,6 @@ from os.path import join import sorl.thumbnail.fields from django.conf import settings from django.db import migrations, models -from django.utils.encoding import force_bytes import django.core.files.storage @@ -19,16 +18,16 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='picture', name='html_file', - field=models.FileField(upload_to=b'html', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name='html file'), + field=models.FileField(upload_to='html', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='html file'), ), migrations.AlterField( model_name='picture', name='image_file', - field=sorl.thumbnail.fields.ImageField(upload_to=b'images', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name='image file'), + field=sorl.thumbnail.fields.ImageField(upload_to='images', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='image file'), ), migrations.AlterField( model_name='picture', name='xml_file', - field=models.FileField(upload_to=b'xml', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name='xml file'), + field=models.FileField(upload_to='xml', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='xml file'), ), ] diff --git a/src/polls/migrations/0001_initial.py b/src/polls/migrations/0001_initial.py index 91c68aa00..fb2c17faf 100644 --- a/src/polls/migrations/0001_initial.py +++ b/src/polls/migrations/0001_initial.py @@ -30,7 +30,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('content', models.TextField(verbose_name='content')), ('vote_count', models.IntegerField(default=0, verbose_name='vote count')), - ('poll', models.ForeignKey(related_name=b'items', to='polls.Poll')), + ('poll', models.ForeignKey(related_name='items', to='polls.Poll')), ], options={ 'verbose_name': 'vote item', diff --git a/src/push/migrations/0002_auto_20180830_1627.py b/src/push/migrations/0002_auto_20180830_1627.py index bb22b652c..3cf282c81 100644 --- a/src/push/migrations/0002_auto_20180830_1627.py +++ b/src/push/migrations/0002_auto_20180830_1627.py @@ -22,7 +22,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='notification', name='image', - field=models.FileField(upload_to=b'push/img', verbose_name='image', blank=True), + field=models.FileField(upload_to='push/img', verbose_name='image', blank=True), ), migrations.AlterField( model_name='notification', diff --git a/src/push/migrations/0003_auto_20180831_1135.py b/src/push/migrations/0003_auto_20180831_1135.py index 40da3fe4a..e90a81476 100644 --- a/src/push/migrations/0003_auto_20180831_1135.py +++ b/src/push/migrations/0003_auto_20180831_1135.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='notification', name='image', - field=models.ImageField(upload_to=b'push/img', verbose_name='image', blank=True), + field=models.ImageField(upload_to='push/img', verbose_name='image', blank=True), ), ] diff --git a/src/social/migrations/0001_initial.py b/src/social/migrations/0001_initial.py index 2ad4a681d..63523cd1c 100644 --- a/src/social/migrations/0001_initial.py +++ b/src/social/migrations/0001_initial.py @@ -20,7 +20,7 @@ class Migration(migrations.Migration): ('vip', models.CharField(max_length=128, null=True, verbose_name='VIP', blank=True)), ('link', models.URLField(verbose_name='link')), ('sticky', models.BooleanField(default=False, help_text='Sticky cites will take precedense.', db_index=True, verbose_name='sticky')), - ('image', models.ImageField(help_text='Best image is exactly 975px wide and weights under 100kB.', upload_to=b'social/cite', null=True, verbose_name='image', blank=True)), + ('image', models.ImageField(help_text='Best image is exactly 975px wide and weights under 100kB.', upload_to='social/cite', null=True, verbose_name='image', blank=True)), ('image_shift', models.IntegerField(help_text='Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%.', null=True, verbose_name='shift', blank=True)), ('image_title', models.CharField(max_length=255, null=True, verbose_name='Title', blank=True)), ('image_author', models.CharField(max_length=255, null=True, verbose_name='author', blank=True)), diff --git a/src/sponsors/migrations/0001_initial.py b/src/sponsors/migrations/0001_initial.py index d672e846a..becb6fa16 100644 --- a/src/sponsors/migrations/0001_initial.py +++ b/src/sponsors/migrations/0001_initial.py @@ -17,7 +17,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(max_length=120, verbose_name='name')), ('_description', models.CharField(max_length=255, verbose_name='Description', blank=True)), - ('logo', models.ImageField(upload_to=b'sponsorzy/sponsor/logo', verbose_name='logo')), + ('logo', models.ImageField(upload_to='sponsorzy/sponsor/logo', verbose_name='logo')), ('url', models.URLField(verbose_name='url', blank=True)), ], options={ @@ -31,7 +31,7 @@ class Migration(migrations.Migration): ('name', models.CharField(max_length=120, verbose_name='name')), ('sponsors', jsonfield.fields.JSONField(default={}, verbose_name='sponsors')), ('_html', models.TextField(editable=False, blank=True)), - ('sprite', models.ImageField(upload_to=b'sponsorzy/sprite', blank=True)), + ('sprite', models.ImageField(upload_to='sponsorzy/sprite', blank=True)), ], options={ }, diff --git a/src/wolnelektury/migrations/getpaid/0001_initial.py b/src/wolnelektury/migrations/getpaid/0001_initial.py index 2ab2d3f64..36824d956 100644 --- a/src/wolnelektury/migrations/getpaid/0001_initial.py +++ b/src/wolnelektury/migrations/getpaid/0001_initial.py @@ -18,14 +18,14 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('amount', models.DecimalField(verbose_name='amount', max_digits=20, decimal_places=4)), ('currency', models.CharField(max_length=3, verbose_name='currency')), - ('status', models.CharField(default=b'new', max_length=20, verbose_name='status', db_index=True, choices=[(b'new', 'new'), (b'in_progress', 'in progress'), (b'partially_paid', 'partially paid'), (b'paid', 'paid'), (b'failed', 'failed')])), + ('status', models.CharField(default='new', max_length=20, verbose_name='status', db_index=True, choices=[('new', 'new'), ('in_progress', 'in progress'), ('partially_paid', 'partially paid'), ('paid', 'paid'), ('failed', 'failed')])), ('backend', models.CharField(max_length=50, verbose_name='backend')), ('created_on', models.DateTimeField(auto_now_add=True, verbose_name='created on', db_index=True)), ('paid_on', models.DateTimeField(default=None, null=True, verbose_name='paid on', db_index=True, blank=True)), ('amount_paid', models.DecimalField(default=0, verbose_name='amount paid', max_digits=20, decimal_places=4)), ('external_id', models.CharField(max_length=64, null=True, verbose_name='external id', blank=True)), ('description', models.CharField(max_length=128, null=True, verbose_name='Description', blank=True)), - ('order', models.ForeignKey(related_name=b'payment', to='funding.Funding')), + ('order', models.ForeignKey(related_name='payment', to='funding.Funding')), ], options={ 'ordering': ('-created_on',), diff --git a/src/wolnelektury/migrations/getpaid/0002_auto_20151221_1225.py b/src/wolnelektury/migrations/getpaid/0002_auto_20151221_1225.py index c1a71771f..8e1eba179 100644 --- a/src/wolnelektury/migrations/getpaid/0002_auto_20151221_1225.py +++ b/src/wolnelektury/migrations/getpaid/0002_auto_20151221_1225.py @@ -19,6 +19,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='payment', name='status', - field=models.CharField(default=b'new', max_length=20, verbose_name='status', db_index=True, choices=[(b'new', 'new'), (b'in_progress', 'in progress'), (b'accepted_for_proc', 'accepted for processing'), (b'partially_paid', 'partially paid'), (b'paid', 'paid'), (b'cancelled', 'cancelled'), (b'failed', 'failed')]), + field=models.CharField(default='new', max_length=20, verbose_name='status', db_index=True, choices=[('new', 'new'), ('in_progress', 'in progress'), ('accepted_for_proc', 'accepted for processing'), ('partially_paid', 'partially paid'), ('paid', 'paid'), ('cancelled', 'cancelled'), ('failed', 'failed')]), ), ]