Mouse Reeve
4d3d5d15d0
Merge pull request #3370 from Tak/add-hashtag-to-context
...
Add `as:Hashtag` to activitypub context
2024-06-01 18:48:38 -07:00
Bart Schuurmans
eca246fc61
Fix lint
2024-05-31 16:59:24 +02:00
Bart Schuurmans
61d9e0c260
Move comment to separate line
...
Co-authored-by: Adeodato Simó <73768+dato@users.noreply.github.com>
2024-05-31 16:49:34 +02:00
Levi Bard
46544451d4
Add as:Hashtag to activitypub context
2024-05-23 09:40:25 +02:00
Adeodato Simó
e6ee169c3e
Narrow down bare type: ignore
pragmas
2024-04-26 21:20:43 -03:00
Adeodato Simó
29f852b57e
consolidate multiple cache.delete() calls into cache.delete_many()
2024-04-26 15:36:38 -03:00
Bart Schuurmans
acae063652
Fix new warnings from pylint upgrade
2024-04-26 13:59:16 +02:00
Bart Schuurmans
e7f95ef4c2
Modify update_fields in save() when modifying objects
...
https://docs.djangoproject.com/en/5.0/releases/4.2/#setting-update-fields-in-model-save-may-now-be-required
2024-04-25 15:53:53 +02:00
Bart Schuurmans
a6c2ce15dd
Early return
2024-04-25 15:51:32 +02:00
Bart Schuurmans
7604d0acdb
Simplify ObjectMixin broadcast kwarg
2024-04-25 10:31:24 +02:00
Bart Schuurmans
77832cbec7
Add merge migration
2024-04-25 10:14:07 +02:00
Bart Schuurmans
de67c73237
Add merge migration
2024-04-25 10:14:07 +02:00
Bart Schuurmans
f38622fdc9
Define CSRF_TRUSTED_ORIGINS
2024-04-25 10:14:07 +02:00
Bart Schuurmans
051dab77bb
Replace deprecated CICharField with custom collation for case-insensitivity
2024-04-25 10:14:07 +02:00
Bart Schuurmans
2896219e88
Switch from django-redis to the built-in Redis cache backend
2024-04-25 10:14:07 +02:00
Bart Schuurmans
03ac846b5d
Migrate from pytz to zoneinfo
2024-04-25 10:14:07 +02:00
Bart Schuurmans
b6174d9101
Update bleach to 6.1.0
2024-04-25 10:14:06 +02:00
Bart Schuurmans
624115bf11
Use headers dict instead of HTTP_* kwargs or request.META
2024-04-25 10:13:21 +02:00
Bart Schuurmans
224fae7a87
Fix mypy errors
2024-04-25 10:13:21 +02:00
Bart Schuurmans
e1fd57a1d6
Fix constructor arguments to SessionMiddleware in tests
2024-04-25 10:13:21 +02:00
Bart Schuurmans
b5ef9f6241
Configure STORAGES using OPTIONS instead of subclassing
2024-04-25 10:12:30 +02:00
Bart Schuurmans
4fa823e8df
Update django-storages to 1.14.2
...
The problem that boto3 closes files has been worked around in django-storages.
2024-04-25 10:12:30 +02:00
Bart Schuurmans
92a94d2fdc
django.utils.timezone.utc alias is deprecated
2024-04-25 10:12:30 +02:00
Bart Schuurmans
0d621b68e0
Reorder operations in save() overrides
...
Accessing many-to-many relations before saving is no longer allowed.
Reorder all operations consistently:
1. Validations
2. Modify own fields
3. Perform save by calling super().save()
4. Modify related objects and clear caches
Especially clearing caches should be done after actually saving, otherwise the old data can be
re-added immediately by another request before the new data is written.
2024-04-25 10:12:30 +02:00
Bart Schuurmans
47fdad9c87
Use new STORAGES setting
2024-04-25 10:12:30 +02:00
Bart Schuurmans
3349817a0b
settings.USE_L10N is deprecated
2024-04-25 10:12:30 +02:00
Bart Schuurmans
45bd67cb04
Add migration resulting from Django 4.2 upgrade
2024-04-25 10:12:29 +02:00
Mouse Reeve
c4b21ee258
Merge pull request #3114 from SMillerDev/feat/api/oauth
...
feat: add OAuth authentication
2024-04-24 15:45:54 -07:00
Bart Schuurmans
4f58b11330
Include the correct protocol and port in remote IDs
2024-04-24 15:35:19 +02:00
Bart Schuurmans
609bc15406
Support http:// protocol in BookWyrm connector
2024-04-24 15:30:47 +02:00
Bart Schuurmans
c42db40a63
Construct absolute URLs with the correct protocol and port
2024-04-24 15:30:47 +02:00
Bart Schuurmans
3aefbb548e
Allow serving BookWyrm on a non-standard port
2024-04-24 15:30:47 +02:00
Bart Schuurmans
c73d1fff6a
Remove unnecessary exceptions from validate_url_domain
2024-04-24 15:30:47 +02:00
Bart Schuurmans
f24fdf73b5
Update to match newer code style
2024-04-24 15:08:48 +02:00
Bart Schuurmans
839ab2fafd
Merge branch 'main' into move-fix
2024-04-24 14:56:32 +02:00
Hugh Rundle
6684d60526
refactor Move for more redundancy
...
As outlined in #3354 , a use `Move` fails if the user is moving from a BookWyrm server to another BookWrym server.
This is because:
1. the original code did not announce changes to alsoKnownAs;
2. the original code always checked the locally saved profile rather than refetching the remote data;
This commit fixes both these problems by forcing `MoveUser` to always perform a "refresh" of the local data from the remote, and by saving the user with broadcast=True when updating alsoKnownAs ids.
2024-04-22 13:35:08 +10:00
Bart Schuurmans
be872ed672
Support AWS_S3_URL_PROTOCOL
...
- Allow setting in .env
- Default to PROTOCOL (same as before)
- Propagate to django-storages so it generates the correct URLs in sass_src
2024-04-15 13:16:51 +02:00
Adeodato Simó
4304cd4a79
use re.escape
2024-04-13 21:26:41 -03:00
Adeodato Simó
8733369605
test_quotation_page_serialization: add test with no position
2024-04-13 21:26:41 -03:00
Adeodato Simó
df78cc64a6
Quotation._format_position: do not treat page numbers as integers
...
Fixes : #3352
2024-04-13 21:26:41 -03:00
Adeodato Simó
f844abcad9
test_quotation_page_serialization: use strings for page numbers
...
This follows from #3273 , "Allow page numbers to be text, instead of
integers".
2024-04-13 21:26:39 -03:00
Hugh Rundle
c3c46144fe
add merge migration
2024-04-13 12:39:40 +10:00
Hugh Rundle
d48d312c0a
Merge branch 'main' into user-export
2024-04-13 12:26:13 +10:00
Hugh Rundle
501fb45528
export avatars to own directory
...
Saving avatars to /images is problematic because it changes the original filepath from avatars/filename to images/avatars/filename.
In this PR prior to this commit, imports failed as they are looking for a file path beginning with "avatar"
2024-04-13 12:03:35 +10:00
Mouse Reeve
3ffbb242a4
Black
2024-04-09 05:59:01 -05:00
Mouse Reeve
af0bd90c15
Adds merge migration
2024-04-09 05:57:27 -05:00
Mouse Reeve
73630331d1
Merge pull request #3299 from Minnozz/absorb
...
Track which Author/Work/Edition a duplicate has been merged into
2024-04-09 05:55:44 -05:00
Bart Schuurmans
e1c54b2933
Remove optimizations with adverse effects
...
`if not audience` actually causes the entire query to be evaluated, before .values_list() is called.
2024-04-04 13:47:56 +02:00
Bart Schuurmans
439cb3ccaa
Remove unnecessary conversions between list and set
2024-04-04 13:15:31 +02:00
Bart Schuurmans
321397a349
Specify which column DISTINCT should apply to
2024-04-03 21:28:22 +02:00