From d0a4c78d02d867fe267b2f723ddfa7637e8ed4d6 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 24 Jan 2022 12:01:17 -0800 Subject: [PATCH 01/22] Limit length on list item note --- .../migrations/0130_alter_listitem_notes.py | 21 +++++++++++++++++++ bookwyrm/models/list.py | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 bookwyrm/migrations/0130_alter_listitem_notes.py diff --git a/bookwyrm/migrations/0130_alter_listitem_notes.py b/bookwyrm/migrations/0130_alter_listitem_notes.py new file mode 100644 index 000000000..a12efd40d --- /dev/null +++ b/bookwyrm/migrations/0130_alter_listitem_notes.py @@ -0,0 +1,21 @@ +# Generated by Django 3.2.10 on 2022-01-24 20:01 + +import bookwyrm.models.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("bookwyrm", "0129_auto_20220117_1716"), + ] + + operations = [ + migrations.AlterField( + model_name="listitem", + name="notes", + field=bookwyrm.models.fields.TextField( + blank=True, max_length=300, null=True + ), + ), + ] diff --git a/bookwyrm/models/list.py b/bookwyrm/models/list.py index d159bc4a8..733ee0447 100644 --- a/bookwyrm/models/list.py +++ b/bookwyrm/models/list.py @@ -125,7 +125,7 @@ class ListItem(CollectionItemMixin, BookWyrmModel): user = fields.ForeignKey( "User", on_delete=models.PROTECT, activitypub_field="actor" ) - notes = fields.TextField(blank=True, null=True) + notes = fields.TextField(blank=True, null=True, max_length=300) approved = models.BooleanField(default=True) order = fields.IntegerField() endorsement = models.ManyToManyField("User", related_name="endorsers") From 5206d08dbb0d563a2d48ef6193a6d9c94f633fd5 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 24 Jan 2022 13:37:51 -0800 Subject: [PATCH 02/22] Adds demo display of comment in list entry --- bookwyrm/templates/lists/list.html | 36 +++++++++++++++++-------- bookwyrm/templates/snippets/avatar.html | 8 ++++-- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/bookwyrm/templates/lists/list.html b/bookwyrm/templates/lists/list.html index c44d3fe36..a1da21e57 100644 --- a/bookwyrm/templates/lists/list.html +++ b/bookwyrm/templates/lists/list.html @@ -4,6 +4,7 @@ {% load book_display_tags %} {% load group_tags %} {% load markdown %} +{% load utilities %} {% block breadcrumbs %}