mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Black formatting
This commit is contained in:
parent
5e24b438ff
commit
81ab73f309
2 changed files with 39 additions and 17 deletions
|
@ -8,29 +8,52 @@ import django.db.models.deletion
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('bookwyrm', '0055_auto_20210321_0101'),
|
("bookwyrm", "0055_auto_20210321_0101"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='sitesettings',
|
model_name="sitesettings",
|
||||||
name='allow_invite_requests',
|
name="allow_invite_requests",
|
||||||
field=models.BooleanField(default=True),
|
field=models.BooleanField(default=True),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='InviteRequest',
|
name="InviteRequest",
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
(
|
||||||
('created_date', models.DateTimeField(auto_now_add=True)),
|
"id",
|
||||||
('updated_date', models.DateTimeField(auto_now=True)),
|
models.AutoField(
|
||||||
('remote_id', bookwyrm.models.fields.RemoteIdField(max_length=255, null=True, validators=[bookwyrm.models.fields.validate_remote_id])),
|
auto_created=True,
|
||||||
('email', models.EmailField(max_length=255, unique=True)),
|
primary_key=True,
|
||||||
('invite_sent', models.BooleanField(default=False)),
|
serialize=False,
|
||||||
('ignored', models.BooleanField(default=False)),
|
verbose_name="ID",
|
||||||
('invite', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='bookwyrm.siteinvite')),
|
),
|
||||||
|
),
|
||||||
|
("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={
|
options={
|
||||||
'abstract': False,
|
"abstract": False,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -93,9 +93,9 @@ class ManageInviteRequests(View):
|
||||||
page = 1
|
page = 1
|
||||||
|
|
||||||
paginated = Paginator(
|
paginated = Paginator(
|
||||||
models.InviteRequest.objects.filter(
|
models.InviteRequest.objects.filter(ignored=ignored).order_by(
|
||||||
ignored=ignored
|
"-created_date"
|
||||||
).order_by("-created_date"),
|
),
|
||||||
PAGE_LENGTH,
|
PAGE_LENGTH,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -109,7 +109,6 @@ class ManageInviteRequests(View):
|
||||||
""" send out an invite """
|
""" send out an invite """
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class InviteRequest(View):
|
class InviteRequest(View):
|
||||||
""" prospective users sign up here """
|
""" prospective users sign up here """
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue