9d502f5ee2
Use setUpTestData() to speed up tests
...
Pylint's `bad-classmethod-argument` is disabled for each definition
to avoid rewriting the method bodies just to rename `self` → `cls`.
This can be done gradually, as the setUpTestData methods are modified
along the way.
2023-12-11 19:40:30 -03:00
c997d2d44a
Add test to assert distinct() clause
...
Also, tweak other `search_title_author()` tests to verify ordering by
edition rank.
2023-11-24 02:28:27 -03:00
e322d3cae1
Do not create a set for already-distinct query result
2023-11-23 23:01:56 -03:00
7c2de92df3
Merge pull request #3128 from bookwyrm-social/test-themes
...
Give admins option to test if a theme loads correctly
2023-11-20 12:26:09 -08:00
b6325da9ab
Update bookwyrm/tests/views/admin/test_themes.py
...
Co-authored-by: Adeodato Simó <73768+dato@users.noreply.github.com>
2023-11-20 10:37:12 -08:00
179dbd75aa
Adds tests
2023-11-20 10:23:59 -08:00
b022b5a1b7
Merge pull request #3120 from hughrun/permission-required
...
403 handler
2023-11-20 10:06:24 -08:00
c2742b4d80
Updates migrations
2023-11-20 10:02:49 -08:00
cfe42305be
Merge branch 'main' into test-themes
2023-11-20 10:02:23 -08:00
d828ba0bc6
Give admins option to test if a theme loads correctly
...
If a theme is uploaded incorrectly or has errors in it, users can still
select the theme but it will cause a 500 error on every page, making the
app unusable and also making it impossible for them to switch to a
functional theme.
A better fix would be to fail gracefully, but in lieu of that, this will
at least let admins confirm if a theme is broken safely.
2023-11-20 09:56:51 -08:00
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
1d5cc83347
Merge branch 'main' into permission-required
2023-11-19 19:12:32 -08:00
d8018cb937
Merge pull request #3125 from hughrun/instance-actor
...
hide instance actor from users
2023-11-19 19:11:17 -08:00
446854ccf0
fix saved list pagination
...
The SavedLists view was passing through an incorrect "path" value. Now it's not.
2023-11-20 12:45:39 +11:00
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
ff1f239a57
Use typing_extensions.Self instead of TypeVar
2023-11-19 15:10:14 -03:00
6aaff28c13
Accept argument in naturalday_partial, downcast format if necessary
2023-11-19 15:10:14 -03:00
aaea1b1b9e
Add tests for naturalday_partial tag
2023-11-19 15:10:13 -03:00
8dbfba17d6
Merge from 'main' into stable_dates
2023-11-19 15:09:52 -03:00
97757fa1ee
fix blocktrans
2023-11-18 15:58:01 +11:00
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
8ddafafa84
make naming consistent
2023-11-18 12:40:36 +11:00
d620bd7350
add handler for 403s
...
fixes #3104
2023-11-18 12:36:03 +11:00
01d4381898
Create notifications for incoming invite requests
...
Closes : #2066
2023-11-14 07:09:04 -03:00
b81170c149
Add missing migration from #3099
2023-11-13 19:56:00 -03:00
99a9dbe5f4
Create NotificationType as class, not through API
...
This way, we need not list every value again to create the enum.
N.B.: enum values are now accessed as `models.NotificationType.FOO`,
instead of `models.Notification.FOO`.
2023-11-09 22:43:36 -03:00
be9d92b1c2
Remove last references to "seal" in partial_date.py and migration
2023-11-09 14:00:45 -03:00
edfa6b18a1
Rename utils.sealed_date module (and tests) to utils.partial_date
2023-11-09 14:00:44 -03:00
fa80aa54a9
SealedDate renames, pt. 2
...
• SealedDate -> PartialDate
• MonthSeal -> MonthParts
• YearSeal -> YearParts
2023-11-09 14:00:44 -03:00
0e4c5ed439
SealedDate renames, pt. 1
...
• SealedDateField -> PartialDateModel
• SealedDateFormField -> PartialDateFormField
• SealedDateDescriptor -> PartialDateDescriptor
2023-11-09 14:00:44 -03:00
c120fa8c87
Rename: templatetags/{sealed_dates => date_ext}.py
2023-11-09 14:00:44 -03:00
2bb7652dfe
Update partial date migration to latest main
2023-11-09 14:00:22 -03:00
e928027e16
Merge from main for up-to-date migrations
2023-11-09 14:00:14 -03:00
dccac11527
PartialDateField: allow incoming dates without timezone
2023-11-09 13:04:09 -03:00
2248206a66
fix missing types in BookData file fields
...
activitypub.BookData includes fields for 'files' and 'fileLinks'.
This is a problem because BookData is inherited by Book and Author, neither of which have 'files' as a field in the main model.
Additionally, Author doesn't have a value for 'file_links'.
When serializing to JSON, BookData therefore throws 'TypeError: Object of type _MISSING_TYPE is not JSON serializable'
This fixes the problem by removing links and moving fileLinks to activitypub.Book.
2023-11-08 18:30:49 +11:00
ee88c3b914
Merge pull request #3081 from bookwyrm-social/handle-isbn-error
...
Fix error produced when an unexpected ISBN format is used
2023-11-06 11:06:46 -08:00
8663e204c7
Merge pull request #3079 from bookwyrm-social/deleted_user_follow_request
...
Don't show notification for user follow request if the user is inactive
2023-11-06 11:05:50 -08:00
e7a1572450
Merge pull request #3086 from bookwyrm-social/user-deletion
...
Erase user data and statuses on account deletion
2023-11-06 09:49:06 -08:00
ee6e3ed7eb
Adds a database field for is_deleted on user
2023-11-05 20:28:23 -08:00
27d99a0094
Removes failsafe that was overzealous
2023-11-05 19:47:32 -08:00
a93519ec3e
Merge pull request #3027 from dato/find_links_wrapped_punct
...
Fix parsing of punctuation in format_links()
fixes #2993
fixes #3049
2023-11-06 09:42:57 +11:00
1190ea7e69
Merge pull request #3078 from bookwyrm-social/tour-fixes
...
Update tour to reflect changes in #2201
2023-11-06 09:20:44 +11:00
c17a2ec55b
Creates snippet for user tag in admin view
...
The existing display wasn't showing the correct colors and was repeating
code unnecessarily
2023-11-05 10:18:04 -08:00
d3668e413d
Removes updates fields that was causing problems
2023-11-05 09:59:49 -08:00
f353b49d36
Another linting issues
2023-11-05 09:53:57 -08:00
47953c84d7
Fixes linting errors
...
Apparently I didn't have a linter working!
2023-11-05 09:49:38 -08:00
4de9907456
Adds migration tests
2023-11-05 09:26:49 -08:00
61caeed5a3
Adds migration and more tests
2023-11-05 08:51:42 -08:00
5e42afd85a
Pass args and kwargs through status deletion
2023-11-05 08:10:03 -08:00
93a7dd9cf3
Erase user data and statuses on account deletion
2023-11-05 08:00:29 -08:00