From 81ab73f3094f78e2bd64c1d6f10629b7ef349f6b Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 20 Mar 2021 20:19:27 -0700 Subject: [PATCH] Black formatting --- .../migrations/0056_auto_20210321_0303.py | 49 ++++++++++++++----- bookwyrm/views/invite.py | 7 ++- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/bookwyrm/migrations/0056_auto_20210321_0303.py b/bookwyrm/migrations/0056_auto_20210321_0303.py index ba406b86c..aa475e033 100644 --- a/bookwyrm/migrations/0056_auto_20210321_0303.py +++ b/bookwyrm/migrations/0056_auto_20210321_0303.py @@ -8,29 +8,52 @@ import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('bookwyrm', '0055_auto_20210321_0101'), + ("bookwyrm", "0055_auto_20210321_0101"), ] operations = [ migrations.AddField( - model_name='sitesettings', - name='allow_invite_requests', + model_name="sitesettings", + name="allow_invite_requests", field=models.BooleanField(default=True), ), migrations.CreateModel( - name='InviteRequest', + name="InviteRequest", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('created_date', models.DateTimeField(auto_now_add=True)), - ('updated_date', models.DateTimeField(auto_now=True)), - ('remote_id', bookwyrm.models.fields.RemoteIdField(max_length=255, null=True, validators=[bookwyrm.models.fields.validate_remote_id])), - ('email', models.EmailField(max_length=255, unique=True)), - ('invite_sent', models.BooleanField(default=False)), - ('ignored', models.BooleanField(default=False)), - ('invite', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='bookwyrm.siteinvite')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("created_date", models.DateTimeField(auto_now_add=True)), + ("updated_date", models.DateTimeField(auto_now=True)), + ( + "remote_id", + bookwyrm.models.fields.RemoteIdField( + max_length=255, + null=True, + validators=[bookwyrm.models.fields.validate_remote_id], + ), + ), + ("email", models.EmailField(max_length=255, unique=True)), + ("invite_sent", models.BooleanField(default=False)), + ("ignored", models.BooleanField(default=False)), + ( + "invite", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="bookwyrm.siteinvite", + ), + ), ], options={ - 'abstract': False, + "abstract": False, }, ), ] diff --git a/bookwyrm/views/invite.py b/bookwyrm/views/invite.py index 39d6435eb..cec0458af 100644 --- a/bookwyrm/views/invite.py +++ b/bookwyrm/views/invite.py @@ -93,9 +93,9 @@ class ManageInviteRequests(View): page = 1 paginated = Paginator( - models.InviteRequest.objects.filter( - ignored=ignored - ).order_by("-created_date"), + models.InviteRequest.objects.filter(ignored=ignored).order_by( + "-created_date" + ), PAGE_LENGTH, ) @@ -109,7 +109,6 @@ class ManageInviteRequests(View): """ send out an invite """ - class InviteRequest(View): """ prospective users sign up here """