Updates federated server model with notes field

Also makes it more editable, and changes the status types
This commit is contained in:
Mouse Reeve 2021-04-07 11:28:31 -07:00
parent e3e28973f1
commit 8261fbf86a
4 changed files with 40 additions and 38 deletions

View file

@ -1,22 +0,0 @@
# Generated by Django 3.1.6 on 2021-04-05 22:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0061_auto_20210402_1435"),
]
operations = [
migrations.AlterField(
model_name="federatedserver",
name="status",
field=models.CharField(
choices=[("federated", "Federated"), ("blocked", "Blocked")],
default="federated",
max_length=255,
),
),
]

View file

@ -0,0 +1,37 @@
# Generated by Django 3.1.6 on 2021-04-07 18:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0062_auto_20210407_1545"),
]
operations = [
migrations.AddField(
model_name="federatedserver",
name="notes",
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name="federatedserver",
name="application_type",
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name="federatedserver",
name="application_version",
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name="federatedserver",
name="status",
field=models.CharField(
choices=[("federated", "Federated"), ("blocked", "Blocked")],
default="federated",
max_length=255,
),
),
]

View file

@ -1,14 +0,0 @@
# Generated by Django 3.1.6 on 2021-04-07 18:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('bookwyrm', '0062_auto_20210405_2249'),
('bookwyrm', '0062_auto_20210407_1545'),
]
operations = [
]

View file

@ -19,8 +19,9 @@ class FederatedServer(BookWyrmModel):
max_length=255, default="federated", choices=FederationStatus.choices max_length=255, default="federated", choices=FederationStatus.choices
) )
# is it mastodon, bookwyrm, etc # is it mastodon, bookwyrm, etc
application_type = models.CharField(max_length=255, null=True) application_type = models.CharField(max_length=255, null=True, blank=True)
application_version = models.CharField(max_length=255, null=True) application_version = models.CharField(max_length=255, null=True, blank=True)
notes = models.TextField(null=True, blank=True)
def block(self): def block(self):
""" block a server """ """ block a server """