Commit graph

180 commits

Author SHA1 Message Date
Mouse Reeve
fbb9d75cc8 Avoid server error when encountering broken edition
If an edition is missing its work, this change allows the page to still
load without a server error; this is important because otherwise the
book will break every page it appears on, including the feed page.
2023-07-17 07:07:01 -07:00
Jascha Ezra Urbach
fadbc76aaa
Merge pull request #2789 from bpeel/translatable-shelf-name
Fix two places where the reading status shelf name wasn’t translated
2023-04-15 16:59:59 +02:00
Neil Roberts
9092c9c80c Add a translatable name for the "stopped-reading" status shelf 2023-04-06 16:03:35 +02:00
Neil Roberts
b0f90d05f2 Move the shelf names to a dict instead of a chain of if statements
The main reason to do this is that if we try to add another name then
pylint will complain that there are too many return statements. It might
be slightly faster too.

If I understand correctly it doesn’t matter that the _ function is being
called at module load time because it is mapped to gettext_lazy so the
actual translation will be done when the string is used.
2023-04-06 16:02:24 +02:00
Josh Soref
18fcea35da spelling: should
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
764bc0c204 spelling: produce
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
d2d087dcb7 spelling: identifiername
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
06fa1adc27 spelling: arbitrary
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Andy Maloney
89c1edac36 Improve Open Graph data for books and add it for lists 2023-01-18 10:30:26 -05:00
Mouse Reeve
e94e72a594 Python formatting 2022-11-25 10:40:06 -08:00
Mouse Reeve
becc90d485 Show review counts in search results
Fixes #2317
2022-11-25 10:06:51 -08:00
Mouse Reeve
6dd671ae5a Fixes user follow cache 2022-11-17 11:23:48 -08:00
Mouse Reeve
553f170f89 Only show editions with the author on the author page 2022-11-01 18:04:27 -07:00
Mouse Reeve
d76eae358f Show queues and runtime instead of start time 2022-09-15 10:53:08 -07:00
Mouse Reeve
0f55b76a93 Adds celery status view 2022-09-14 18:58:51 -07:00
Mouse Reeve
0cf9e1033b Safer display of book descriptions 2022-08-07 13:26:05 -07:00
Mouse Reeve
3670ae46ec Reverse order of notification related users 2022-07-12 10:32:56 -07:00
Mouse Reeve
a7553c0b8c Return HttpResponse instead of redirects for AJAX follows
This is more efficient, and most follow activities are ajax
2022-07-09 12:20:18 -07:00
Mouse Reeve
742d97b177 Python formatting 2022-07-07 12:23:10 -07:00
Mouse Reeve
076ba6f0ae Dramatically reduce cache duration for reading statuses
I originally set this for a very long timeout because this value should
be invalidated when it needs to be by the models, and if that worked
perfectly, this would reduce queries dramatically for books that show up
in ones feed frequently, but don't change status (for example, a book
you read and your friend is currently posting about). In practice, of
course, there are errors in invalidating this cache which leave this
value appearing extremely broken and it's next to impossible to fix.

This change makes each of the timeouts related to reading an hour, which
will still give performance benefit when browsing the site (especially
for loading the same book multiple times on a page), but resolve
naturally if the cache gets into a bad state.
2022-07-07 12:06:06 -07:00
Mouse Reeve
574c1db732 Adds more templatetag tests 2022-07-06 10:52:45 -07:00
Mouse Reeve
e16506c1df Fixes logic error in checking relationships
I had the logic backwards for pending relationships.
2022-07-02 21:25:07 -07:00
Mouse Reeve
fc3b609ada Use general ratings rather than privacy filtered
The original system customized how a rating is displayed to every user
based on the privacy settings of the reviews and, relatedly, who the
user follows. This is cool, but the query is too complicated to load in
sessions, and the initial load, which isn't mitigated by caching, is too
much and causes timeouts for many users. Also the cache clearing wasn't
working correctly because I put in a wildcard, which does not work.
2022-05-30 08:42:48 -07:00
Mouse Reeve
4905652e22 Handle stopped reading special case in javascript
This should be refactored, but maybe not today
2022-05-26 12:23:13 -07:00
Mouse Reeve
dfe0656eb4 Typo fix 2022-05-26 11:38:36 -07:00
Mouse Reeve
1f6fbd8d29 Fixes stopped reading button logic
The stopped state is similar to finished
2022-05-26 11:28:54 -07:00
Mouse Reeve
5d7e6b872a Fixes localizing query for superlatives 2022-03-01 10:34:17 -08:00
Mouse Reeve
7d6032e110 Fixes calls to filter 2022-02-28 11:18:03 -08:00
Mouse Reeve
0f5fd6be15 Move translations to filter 2022-02-28 11:05:12 -08:00
Mouse Reeve
f86016ba33 Python formatting for black update 2022-01-30 07:01:38 -08:00
Mouse Reeve
ce0a49f64f Updates ratings and book display tests 2022-01-18 12:52:21 -08:00
Mouse Reeve
95c262c495 Renames group tags 2022-01-18 12:32:12 -08:00
Mouse Reeve
33c6e5aabe Moves remaining tags into new files 2022-01-18 12:28:59 -08:00
Mouse Reeve
6e6e2ab777 Moves rating tag to file 2022-01-18 12:02:38 -08:00
Mouse Reeve
8746409e6d Adds shelf tags file 2022-01-18 11:20:27 -08:00
Mouse Reeve
8bbc4d3301 Cache checking if books are on shelve in shelve button snippet 2022-01-18 10:52:15 -08:00
Mouse Reeve
a09c813f73 Python formatting 2022-01-17 19:04:20 -08:00
Mouse Reeve
02dd1e9443 Use False instead of None for test values 2022-01-17 12:45:32 -08:00
Mouse Reeve
1e4aee8276 Cache user-specific ratings 2022-01-17 12:17:24 -08:00
Mouse Reeve
e6d9895854
Merge branch 'main' into book-file-links 2022-01-12 06:39:22 -08:00
Mouse Reeve
6baab5d5a9 python formatting 2022-01-11 12:58:14 -08:00
Mouse Reeve
591bb955f8 Fixes active readthrough cache bug 2022-01-11 12:37:07 -08:00
Mouse Reeve
4ba375892a
Merge pull request #1793 from bookwyrm-social/more-caches
More caches
2022-01-10 11:25:26 -08:00
Mouse Reeve
aa9864a21e Only show approved links 2022-01-09 20:30:23 -08:00
Mouse Reeve
0a182e8150 Caches query for landing page books 2022-01-09 13:04:41 -08:00
Mouse Reeve
82294909a8 Python formatting 2022-01-08 16:38:52 -08:00
Mouse Reeve
f2f40cf3b9 Creates custom get_or_set function 2022-01-08 13:01:05 -08:00
Mouse Reeve
2cca9fab2d Cache user relationship for follow buttons 2022-01-08 12:33:13 -08:00
Mouse Reeve
26928252cd Use cache 2022-01-08 11:44:04 -08:00
Mouse Reeve
00a14e89a0
Merge pull request #1772 from bookwyrm-social/cache-tweaks
Cache tweaks
2022-01-06 12:13:56 -08:00