mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
Python formatting
This commit is contained in:
parent
bd7bf4ee96
commit
9bbdde1597
3 changed files with 18 additions and 11 deletions
|
@ -6,13 +6,22 @@ from django.db import migrations, models
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('bookwyrm', '0045_auto_20210210_2114'),
|
("bookwyrm", "0045_auto_20210210_2114"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='user',
|
model_name="user",
|
||||||
name='default_post_privacy',
|
name="default_post_privacy",
|
||||||
field=models.CharField(choices=[('public', 'Public'), ('unlisted', 'Unlisted'), ('followers', 'Followers'), ('direct', 'Direct')], default='public', max_length=255),
|
field=models.CharField(
|
||||||
|
choices=[
|
||||||
|
("public", "Public"),
|
||||||
|
("unlisted", "Unlisted"),
|
||||||
|
("followers", "Followers"),
|
||||||
|
("direct", "Direct"),
|
||||||
|
],
|
||||||
|
default="public",
|
||||||
|
max_length=255,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,9 +6,8 @@ from django.db import migrations
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('bookwyrm', '0046_user_default_post_privacy'),
|
("bookwyrm", "0046_user_default_post_privacy"),
|
||||||
('bookwyrm', '0078_add_shelved_date'),
|
("bookwyrm", "0078_add_shelved_date"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = []
|
||||||
]
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ from .base_model import BookWyrmModel, DeactivationReason
|
||||||
from .federated_server import FederatedServer
|
from .federated_server import FederatedServer
|
||||||
from . import fields, Review
|
from . import fields, Review
|
||||||
|
|
||||||
|
|
||||||
class User(OrderedCollectionPageMixin, AbstractUser):
|
class User(OrderedCollectionPageMixin, AbstractUser):
|
||||||
"""a user who wants to read books"""
|
"""a user who wants to read books"""
|
||||||
|
|
||||||
|
@ -105,9 +106,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
||||||
related_name="favorite_statuses",
|
related_name="favorite_statuses",
|
||||||
)
|
)
|
||||||
default_post_privacy = models.CharField(
|
default_post_privacy = models.CharField(
|
||||||
max_length=255,
|
max_length=255, default="public", choices=fields.PrivacyLevels.choices
|
||||||
default='public',
|
|
||||||
choices=fields.PrivacyLevels.choices
|
|
||||||
)
|
)
|
||||||
remote_id = fields.RemoteIdField(null=True, unique=True, activitypub_field="id")
|
remote_id = fields.RemoteIdField(null=True, unique=True, activitypub_field="id")
|
||||||
created_date = models.DateTimeField(auto_now_add=True)
|
created_date = models.DateTimeField(auto_now_add=True)
|
||||||
|
|
Loading…
Reference in a new issue