Larger file type field

This commit is contained in:
Mouse Reeve 2022-01-17 09:03:53 -08:00
parent 942092d6b1
commit 7b1693a435
3 changed files with 43 additions and 1 deletions

View file

@ -0,0 +1,24 @@
# Generated by Django 3.2.10 on 2022-01-17 17:03
import bookwyrm.models.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('bookwyrm', '0128_merge_0126_auto_20220112_2315_0127_auto_20220110_2211'),
]
operations = [
migrations.AddField(
model_name='filelink',
name='is_purchase',
field=bookwyrm.models.fields.BooleanField(blank=True, null=True),
),
migrations.AlterField(
model_name='filelink',
name='filetype',
field=bookwyrm.models.fields.CharField(max_length=50),
),
]

View file

@ -53,7 +53,8 @@ class FileLink(Link):
book = models.ForeignKey(
"Book", on_delete=models.CASCADE, related_name="file_links", null=True
)
filetype = fields.CharField(max_length=5, activitypub_field="mediaType")
filetype = fields.CharField(max_length=50, activitypub_field="mediaType")
is_purchase = fields.BooleanField(null=True, blank=True)
StatusChoices = [

View file

@ -160,6 +160,23 @@ const tries = {
},
},
},
r: {
i: {
n: {
t: {
" ": {
b: {
o: {
o: {
k: "Print book",
},
},
},
},
},
},
},
},
},
},
};