diff --git a/.env.example b/.env.example index 4c457f625..dd7bec4f2 100644 --- a/.env.example +++ b/.env.example @@ -61,7 +61,7 @@ SEARCH_TIMEOUT=5 QUERY_TIMEOUT=5 # Thumbnails Generation -ENABLE_THUMBNAIL_GENERATION=false +ENABLE_THUMBNAIL_GENERATION=true # S3 configuration USE_S3=false diff --git a/bookwyrm/activitypub/verbs.py b/bookwyrm/activitypub/verbs.py index 36898bc7e..b8c0ae779 100644 --- a/bookwyrm/activitypub/verbs.py +++ b/bookwyrm/activitypub/verbs.py @@ -83,7 +83,7 @@ class Undo(Verb): def action(self): """find and remove the activity object""" if isinstance(self.object, str): - # it may be that sometihng should be done with these, but idk what + # it may be that something should be done with these, but idk what # this seems just to be coming from pleroma return @@ -94,7 +94,7 @@ class Undo(Verb): model = apps.get_model("bookwyrm.UserFollows") obj = self.object.to_model(model=model, save=False, allow_create=False) if not obj: - # this could be a folloq request not a follow proper + # this could be a follow request not a follow proper model = apps.get_model("bookwyrm.UserFollowRequest") obj = self.object.to_model(model=model, save=False, allow_create=False) else: diff --git a/bookwyrm/book_search.py b/bookwyrm/book_search.py index f9bb57dfc..822c87f01 100644 --- a/bookwyrm/book_search.py +++ b/bookwyrm/book_search.py @@ -20,7 +20,7 @@ def search(query, min_confidence=0, filters=None, return_first=False): query = query.strip() results = None - # first, try searching unqiue identifiers + # first, try searching unique identifiers # unique identifiers never have spaces, title/author usually do if not " " in query: results = search_identifiers(query, *filters, return_first=return_first) diff --git a/bookwyrm/forms/author.py b/bookwyrm/forms/author.py index a7811180f..3d71d4034 100644 --- a/bookwyrm/forms/author.py +++ b/bookwyrm/forms/author.py @@ -33,8 +33,8 @@ class AuthorForm(CustomForm): ), "born": forms.SelectDateWidget(attrs={"aria-describedby": "desc_born"}), "died": forms.SelectDateWidget(attrs={"aria-describedby": "desc_died"}), - "oepnlibrary_key": forms.TextInput( - attrs={"aria-describedby": "desc_oepnlibrary_key"} + "openlibrary_key": forms.TextInput( + attrs={"aria-describedby": "desc_openlibrary_key"} ), "inventaire_id": forms.TextInput( attrs={"aria-describedby": "desc_inventaire_id"} diff --git a/bookwyrm/templates/author/edit_author.html b/bookwyrm/templates/author/edit_author.html index 1916df6be..54b547a3b 100644 --- a/bookwyrm/templates/author/edit_author.html +++ b/bookwyrm/templates/author/edit_author.html @@ -77,7 +77,7 @@ {{ form.openlibrary_key }} - {% include 'snippets/form_errors.html' with errors_list=form.oepnlibrary_key.errors id="desc_oepnlibrary_key" %} + {% include 'snippets/form_errors.html' with errors_list=form.openlibrary_key.errors id="desc_openlibrary_key" %}
diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index 6a8d4d794..6ea051ab9 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -7,8 +7,8 @@ {% block title %}{{ book|book_title }}{% endblock %} -{% block opengraph_images %} - {% include 'snippets/opengraph_images.html' with image=book.preview_image %} +{% block opengraph %} + {% include 'snippets/opengraph.html' with image=book.preview_image %} {% endblock %} {% block content %} diff --git a/bookwyrm/templates/discover/card-header.html b/bookwyrm/templates/discover/card-header.html index 6260c04f5..004b81461 100644 --- a/bookwyrm/templates/discover/card-header.html +++ b/bookwyrm/templates/discover/card-header.html @@ -9,12 +9,12 @@ {{ username }} wants to read {{ book_title }} {% endblocktrans %} {% endif %} - {% if finished reading or status.content == '

finished reading

' %} + {% if status.content == 'finished reading' or status.content == '

finished reading

' %} {% blocktrans trimmed %} {{ username }} finished reading {{ book_title }} {% endblocktrans %} {% endif %} - {% if started reading or status.content == '

started reading

' %} + {% if status.content == 'started reading' or status.content == '

started reading

' %} {% blocktrans trimmed %} {{ username }} started reading {{ book_title }} {% endblocktrans %} diff --git a/bookwyrm/templates/feed/status.html b/bookwyrm/templates/feed/status.html index ed828ae01..ccec6503c 100644 --- a/bookwyrm/templates/feed/status.html +++ b/bookwyrm/templates/feed/status.html @@ -2,15 +2,13 @@ {% load feed_page_tags %} {% load i18n %} -{% block opengraph_images %} - -{% firstof status.book status.mention_books.first as book %} -{% if book %} - {% include 'snippets/opengraph_images.html' with image=preview %} -{% else %} - {% include 'snippets/opengraph_images.html' %} -{% endif %} - +{% block opengraph %} + {% firstof status.book status.mention_books.first as book %} + {% if book %} + {% include 'snippets/opengraph.html' with image=preview %} + {% else %} + {% include 'snippets/opengraph.html' %} + {% endif %} {% endblock %} @@ -44,4 +42,3 @@
{% endblock %} - diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 81aaee575..e838ead12 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -15,20 +15,9 @@ - {% if preview_images_enabled is True %} - - {% else %} - - {% endif %} - - - - - - {% block opengraph_images %} - {% include 'snippets/opengraph_images.html' %} + {% block opengraph %} + {% include 'snippets/opengraph.html' %} {% endblock %} - {% block head_links %}{% endblock %} diff --git a/bookwyrm/templates/settings/email_blocklist/email_blocklist.html b/bookwyrm/templates/settings/email_blocklist/email_blocklist.html index 888f6a286..1bad7a7fa 100644 --- a/bookwyrm/templates/settings/email_blocklist/email_blocklist.html +++ b/bookwyrm/templates/settings/email_blocklist/email_blocklist.html @@ -35,7 +35,7 @@ {% with user_count=domain.users.count %} - {% blocktrans trimmed count conter=user_count with display_count=user_count|intcomma %} + {% blocktrans trimmed count counter=user_count with display_count=user_count|intcomma %} {{ display_count }} user {% plural %} {{ display_count }} users @@ -62,4 +62,3 @@ {% endblock %} - diff --git a/bookwyrm/templates/settings/link_domains/link_domains.html b/bookwyrm/templates/settings/link_domains/link_domains.html index e418bf678..892d29022 100644 --- a/bookwyrm/templates/settings/link_domains/link_domains.html +++ b/bookwyrm/templates/settings/link_domains/link_domains.html @@ -41,7 +41,7 @@
@@ -103,4 +103,3 @@ {% endblock %} - diff --git a/bookwyrm/templates/settings/themes.html b/bookwyrm/templates/settings/themes.html index c0dfd7b42..d27aeb0ce 100644 --- a/bookwyrm/templates/settings/themes.html +++ b/bookwyrm/templates/settings/themes.html @@ -107,7 +107,7 @@
{% csrf_token %}
diff --git a/bookwyrm/templates/shelf/shelf.html b/bookwyrm/templates/shelf/shelf.html index 8bd040e05..79ec241be 100644 --- a/bookwyrm/templates/shelf/shelf.html +++ b/bookwyrm/templates/shelf/shelf.html @@ -8,8 +8,8 @@ {% include 'user/books_header.html' with shelf=shelf %} {% endblock %} -{% block opengraph_images %} - {% include 'snippets/opengraph_images.html' with image=user.preview_image %} +{% block opengraph %} + {% include 'snippets/opengraph.html' with image=user.preview_image %} {% endblock %} {% block content %} diff --git a/bookwyrm/templates/snippets/create_status/layout.html b/bookwyrm/templates/snippets/create_status/layout.html index 915e5114b..461beb7d6 100644 --- a/bookwyrm/templates/snippets/create_status/layout.html +++ b/bookwyrm/templates/snippets/create_status/layout.html @@ -7,12 +7,12 @@ book: the Edition object this status is related to. Required unless the status is a reply draft: the content of an existing Status object to be edited (used in delete and redraft) uuid: a unique identifier used to make html "id" attributes unique and clarify javascript controls -type: used for uniquely identifying the html elements when mutliple types of posts are available for a book, and usually the endpoint name that the form posts to +type: used for uniquely identifying the html elements when multiple types of posts are available for a book, and usually the endpoint name that the form posts to reply_parent: the Status object this post will be in reply to, if applicable {% endcomment %} {% block form_open %} -{# default form tag syntax, can be overriddden #} +{# default form tag syntax, can be overridden #}
0 and default_rating >= forloop.counter0 %}checked{% endif %} + {% if default_rating > 0 and default_rating > forloop.counter0 %}checked{% endif %} /> {% if image %} @@ -9,6 +10,15 @@ {% endif %} {% else %} + {% endif %} + + + + + + + + diff --git a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html index fe35ee7e6..ee720e448 100644 --- a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html +++ b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html @@ -13,7 +13,7 @@ Finish "{{ book_title }}" {% csrf_token %} - + {% endblock %} {% block reading-dates %} diff --git a/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html index 861f118f9..d8331a281 100644 --- a/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html +++ b/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html @@ -10,9 +10,9 @@ Start "{{ book_title }}" {% block modal-form-open %} +{% csrf_token %} -{% csrf_token %} {% endblock %} {% block reading-dates %} diff --git a/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html b/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html index d6bc4d70a..80d67f79e 100644 --- a/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html +++ b/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html @@ -10,9 +10,9 @@ Want to Read "{{ book_title }}" {% block modal-form-open %} +{% csrf_token %} -{% csrf_token %} {% endblock %} {% block form %} diff --git a/bookwyrm/templates/snippets/shelf_selector.html b/bookwyrm/templates/snippets/shelf_selector.html index feea50d7b..902a66196 100644 --- a/bookwyrm/templates/snippets/shelf_selector.html +++ b/bookwyrm/templates/snippets/shelf_selector.html @@ -22,7 +22,6 @@ -