kopia lustrzana https://gitlab.com/marnanel/chapeau
intermediate
rodzic
f918d21c30
commit
67894e2d5f
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 3.0.4 on 2020-04-04 19:40
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('trilby_api', '0027_auto_20200331_0123'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='person',
|
||||||
|
name='default_visibility',
|
||||||
|
field=models.CharField(default='A', max_length=1),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='status',
|
||||||
|
name='visibility',
|
||||||
|
field=models.CharField(default='A', help_text="Visiblity of this status.\n\n Public (A): visible to anyone.\n Unlisted (U): visible to anyone, but\n doesn't appear in timelines.\n Private (X): only visible to followers.\n Direct (D): visible to nobody except tagged people.\n\n Additionally, a person tagged in a status can\n always view that status.", max_length=1),
|
||||||
|
),
|
||||||
|
]
|
|
@ -124,8 +124,8 @@ class Person(models.Model):
|
||||||
)
|
)
|
||||||
|
|
||||||
default_visibility = models.CharField(
|
default_visibility = models.CharField(
|
||||||
max_length = 255,
|
max_length = 1,
|
||||||
default = 'public',
|
default = 'A', # public
|
||||||
)
|
)
|
||||||
|
|
||||||
default_sensitive = models.BooleanField(
|
default_sensitive = models.BooleanField(
|
||||||
|
|
|
@ -55,9 +55,32 @@ class Status(models.Model):
|
||||||
default = '',
|
default = '',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PUBLIC = 'A'
|
||||||
|
UNLISTED = 'U'
|
||||||
|
PRIVATE = 'X'
|
||||||
|
DIRECT = 'D'
|
||||||
|
|
||||||
|
TYPE_CHOICES = [
|
||||||
|
(PUBLIC, 'public'),
|
||||||
|
(UNLISTED, 'unlisted'),
|
||||||
|
(PRIVATE, 'private'),
|
||||||
|
(DIRECT, 'direct'),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
visibility = models.CharField(
|
visibility = models.CharField(
|
||||||
max_length = 255,
|
max_length = 1,
|
||||||
default = 'public',
|
default = PUBLIC,
|
||||||
|
help_text = """Visiblity of this status.
|
||||||
|
|
||||||
|
Public (A): visible to anyone.
|
||||||
|
Unlisted (U): visible to anyone, but
|
||||||
|
doesn't appear in timelines.
|
||||||
|
Private (X): only visible to followers.
|
||||||
|
Direct (D): visible to nobody except tagged people.
|
||||||
|
|
||||||
|
Additionally, a person tagged in a status can
|
||||||
|
always view that status.""",
|
||||||
)
|
)
|
||||||
|
|
||||||
language = models.CharField(
|
language = models.CharField(
|
||||||
|
|
|
@ -30,7 +30,7 @@ ACCOUNT_EXPECTED = [
|
||||||
]
|
]
|
||||||
|
|
||||||
ACCOUNT_SOURCE_EXPECTED = [
|
ACCOUNT_SOURCE_EXPECTED = [
|
||||||
('privacy', 'public'),
|
('privacy', 'A'),
|
||||||
('sensitive', False),
|
('sensitive', False),
|
||||||
('language', settings.KEPI['LANGUAGES'][0]), # FIXME
|
('language', settings.KEPI['LANGUAGES'][0]), # FIXME
|
||||||
]
|
]
|
||||||
|
@ -46,7 +46,7 @@ STATUS_EXPECTED = [
|
||||||
('muted', False),
|
('muted', False),
|
||||||
('sensitive', False),
|
('sensitive', False),
|
||||||
('spoiler_text', ''),
|
('spoiler_text', ''),
|
||||||
('visibility', 'public'),
|
('visibility', 'A'),
|
||||||
('media_attachments', []),
|
('media_attachments', []),
|
||||||
('mentions', []),
|
('mentions', []),
|
||||||
('tags', []),
|
('tags', []),
|
||||||
|
|
Ładowanie…
Reference in New Issue