forked from mirrors/bookwyrm
Larger file type field
This commit is contained in:
parent
942092d6b1
commit
7b1693a435
3 changed files with 43 additions and 1 deletions
24
bookwyrm/migrations/0129_auto_20220117_1703.py
Normal file
24
bookwyrm/migrations/0129_auto_20220117_1703.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
|
@ -53,7 +53,8 @@ class FileLink(Link):
|
||||||
book = models.ForeignKey(
|
book = models.ForeignKey(
|
||||||
"Book", on_delete=models.CASCADE, related_name="file_links", null=True
|
"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 = [
|
StatusChoices = [
|
||||||
|
|
|
@ -160,6 +160,23 @@ const tries = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
r: {
|
||||||
|
i: {
|
||||||
|
n: {
|
||||||
|
t: {
|
||||||
|
" ": {
|
||||||
|
b: {
|
||||||
|
o: {
|
||||||
|
o: {
|
||||||
|
k: "Print book",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue