Commit graph

206 commits

Author SHA1 Message Date
Hugh Rundle ddc35a7a52
fix multiple issues from user exports config changes
- improve nginx config
- fix DATA_UPLOAD_MAX_MEMORY_SIZE default not being an int
- translate fallback value in id_to_username template tag
- make location of setting to turn on user exports easier to locate for admins

fixes #3227
fixes #3231
fixes #3232
fixes #3236
2024-01-20 13:19:13 +11:00
Hugh Rundle b990d9ccd8
Pass correct user id in Move notification
We were passing the *requesting* user's moved_to value to the Move notification template, instead of the id of the user that they are being notified about.
Additionally, the id_to_username template tag had no fallback for if the user_id is None.

This resolves both problems and removes an unnecessary space in a template for when the logged in user made the move.

Fixes #3196
2024-01-17 21:06:04 +11:00
Mouse Reeve fb16806afe
Merge pull request #3177 from dato/naturalday_partial_fixes
Adjustments to naturalday_partial
2024-01-01 19:16:16 -08:00
Adeodato Simó 4711b3bc19
naturalday_partial: simplify/refactor 2024-01-01 18:36:31 +01:00
Adeodato Simó 0d908b594c
naturalday_partial: do not naturalize dates with missing parts 2024-01-01 18:36:31 +01:00
Adeodato Simó 0e3936cb61
naturalday_partial: do naturalize date and datetime objects 2024-01-01 18:36:30 +01:00
Hugh Rundle 72c1c6ee3d
merge migrations and lint 2023-11-22 21:29:54 +11:00
Hugh Rundle 0276c15948
Merge branch 'main' into user-migration 2023-11-22 21:00:04 +11:00
Mouse Reeve b022b5a1b7
Merge pull request #3120 from hughrun/permission-required
403 handler
2023-11-20 10:06:24 -08:00
Mouse Reeve d94b27b723
Merge branch 'main' into user-migration 2023-11-19 19:18:22 -08:00
Mouse Reeve 3d9f339bd5
Merge pull request #3059 from dato/stable_dates_v2
Partial, stable dates with automatic precision field
2023-11-19 19:17:49 -08:00
Mouse Reeve 1d5cc83347
Merge branch 'main' into permission-required 2023-11-19 19:12:32 -08:00
Hugh Rundle f011f2bce9
hide instance actor from users
The Instance Actor is required for signing http GET requests but is not a "user" and should not be otherwise interacted with.

- hides instance actor profile page, returning a 404
- excludes instance actor from search results and suggestions including in Getting Started
- replaces link to user profile in user admin page with a brief message box
- replaces panel in user admin page that allows for user to be suspended or removed with a message explaining why that is a very bad idea

fixes #3119
2023-11-20 12:17:52 +11:00
Adeodato Simó 6aaff28c13
Accept argument in naturalday_partial, downcast format if necessary 2023-11-19 15:10:14 -03:00
Hugh Rundle a56ba0ce1c
always return 403 to POST requests
- POST requests need to receive a 403 error code
- minor wording updates
2023-11-18 13:41:52 +11:00
Hugh Rundle d620bd7350
add handler for 403s
fixes #3104
2023-11-18 12:36:03 +11:00
Adeodato Simó edfa6b18a1
Rename utils.sealed_date module (and tests) to utils.partial_date 2023-11-09 14:00:44 -03:00
Adeodato Simó fa80aa54a9
SealedDate renames, pt. 2
• SealedDate -> PartialDate
• MonthSeal  -> MonthParts
• YearSeal   -> YearParts
2023-11-09 14:00:44 -03:00
Adeodato Simó c120fa8c87
Rename: templatetags/{sealed_dates => date_ext}.py 2023-11-09 14:00:44 -03:00
Adeodato Simó e928027e16
Merge from main for up-to-date migrations 2023-11-09 14:00:14 -03:00
Hugh Rundle 282f7dd8d6
show filesize on user downloads page
- add column to user download page to display filesize
- adds a filter to display file sizes
- don't download the user downloads page from notifications ;)
2023-11-07 11:04:11 +11:00
Adeodato Simó 170d1fe205
fix pylint issues (minus no-else-return) 2023-10-24 17:41:07 -03:00
Adeodato Simó 777c8b4549
naturalday_partial filter for working with SealedDate 2023-10-24 04:32:27 -03:00
Hugh Rundle 3e38fecd55
id_to_username cleanup 2023-09-26 07:45:45 +10:00
Hugh Rundle b05f2e99e8
undo moves
also cleans up some templates
2023-09-25 22:05:43 +10:00
Hugh Rundle 5b051631ec
Move MVP
* update User model to allow for moved_to and also_known_as values
* allow users to add aliases (also_known_as) in UI
* allow users to move account to another one (moved_to)
* redirect webfinger to the new account after a move
* present notification to followers inviting to follow at new account

Note: unlike Mastodon we're not running any unfollow/autofollow action here: users can decide for themselves
This makes undoing moves easier.

TODO

There is still a bug with incoming Moves, at least from Mastodon.
This seems to be something to do with Update activities (rather than Move, strictly).
2023-09-18 21:21:04 +10:00
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