From 596c441492bdf2c1e4d4967542241c0a5e74696c Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Fri, 10 Jul 2020 18:14:56 -0700 Subject: [PATCH] Apply black formatting to migrations --- places/migrations/0006_auto_20200711_0045.py | 58 +++++++++++++++----- places/migrations/0007_auto_20200711_0104.py | 6 +- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/places/migrations/0006_auto_20200711_0045.py b/places/migrations/0006_auto_20200711_0045.py index 66a5665..c268acd 100644 --- a/places/migrations/0006_auto_20200711_0045.py +++ b/places/migrations/0006_auto_20200711_0045.py @@ -9,26 +9,54 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('places', '0005_auto_20200711_0027'), + ("places", "0005_auto_20200711_0027"), ] operations = [ migrations.CreateModel( - name='Review', + name="Review", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=255)), - ('body', models.TextField()), - ('score', models.IntegerField(choices=[(1, 'Terrible'), (2, 'Mediocre'), (3, 'Average'), (4, 'Good'), (5, 'Great')])), - ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to=settings.AUTH_USER_MODEL)), - ('place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to='places.Restaurant')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("title", models.CharField(max_length=255)), + ("body", models.TextField()), + ( + "score", + models.IntegerField( + choices=[ + (1, "Terrible"), + (2, "Mediocre"), + (3, "Average"), + (4, "Good"), + (5, "Great"), + ] + ), + ), + ( + "author", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="reviews", + to=settings.AUTH_USER_MODEL, + ), + ), + ( + "place", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="reviews", + to="places.Restaurant", + ), + ), ], - options={ - 'db_table': 'review', - 'unique_together': {('place', 'author')}, - }, - ), - migrations.DeleteModel( - name='Rating', + options={"db_table": "review", "unique_together": {("place", "author")},}, ), + migrations.DeleteModel(name="Rating",), ] diff --git a/places/migrations/0007_auto_20200711_0104.py b/places/migrations/0007_auto_20200711_0104.py index 79a9349..0532a75 100644 --- a/places/migrations/0007_auto_20200711_0104.py +++ b/places/migrations/0007_auto_20200711_0104.py @@ -6,13 +6,11 @@ class Migration(migrations.Migration): dependencies = [ - ('places', '0006_auto_20200711_0045'), + ("places", "0006_auto_20200711_0045"), ] operations = [ migrations.RenameField( - model_name='review', - old_name='score', - new_name='rating', + model_name="review", old_name="score", new_name="rating", ), ]