Commit graph

284 commits

Author SHA1 Message Date
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 3aefbb548e Allow serving BookWyrm on a non-standard port 2024-04-24 15:30:47 +02: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
Hugh Rundle d48d312c0a
Merge branch 'main' into user-export 2024-04-13 12:26:13 +10:00
Sean Molenaar d5fb21f330
Merge branch 'main' into feat/api/oauth 2024-04-01 22:35:19 +02:00
Mouse Reeve cb3fd0cfc1
Merge branch 'main' into feat/api/oauth 2024-03-31 12:41:12 -07:00
Bart Schuurmans ffee29d8e2 Fix resource leaks
Rewrite places where files (or other resources) are opened but not closed to "with" blocks, which
automatically call close() at the end of the scope.

Also simplify some tests where images need to be saved to a model field: an opened file can be
passed directly to FileField.save().
2024-03-29 20:14:10 +01:00
Bart Schuurmans 145c67dd21 Merge BookwyrmExportJob export_data field back into one with dynamic storage backend 2024-03-26 13:41:39 +01:00
Hugh Rundle dd27684d4b
set signed s3 url expiry with env value
Adds S3_SIGNED_URL_EXPIRY val to .env and settings (defaults to 15 mins)
Note that this is reset every time the user loads the exports page
and is independent of the _creation_ of export files.
2024-03-24 20:53:49 +11:00
Adeodato Simó cceccd1ecf
Merge from main into 'trigger_migrations'
Conflicts:
	requirements.txt
2024-03-17 21:54:15 -03:00
Mouse Reeve 2c59908ddd
Merge branch 'main' into export-fixes 2024-02-29 16:10:20 -08:00
FoW ddd13a3e2e Add Korean (ko-kr) to LANGUAGES and locale 2024-02-10 16:17:25 +09:00
Hugh Rundle 46a158d701
Merge branch 'main' into export-fixes 2024-02-06 18:31:19 +11:00
Adeodato Simó 4a9d69e169
Support DATA_UPLOAD_MAX_MEMORY_MiB, only, in .env
Since arithmetic is not allowed in .env files, a change in unit for
the variable seems most usable.
2024-02-04 15:34:04 -03:00
Mouse Reeve 103da863c4
Merge pull request #3239 from Minnozz/user-agent
Replace python-requests with BookWyrm in user agent
2024-02-03 07:27:58 -08:00
Mouse Reeve 5f2f321ed5
Merge branch 'main' into export-fixes 2024-02-03 07:04:05 -08:00
Adeodato Simó 500e4eb4f5
Merge from main to avoid conflicts 2024-01-25 20:27:54 +01:00
Adeodato Simó 82f9aa9da4
Set SESSION_COOKIE_AGE from environment, default to one month
While we do wish for a longer maximum age (up to one year, see #3082),
we only want to do that after termination of active sessions is
implemented (see #2278).

In the meantime, by reading and setting the variable from settings,
we allow site admins to alter the default.
2024-01-25 20:27:24 +01:00
Bart Schuurmans 6cb3b97144 Replace python-requests with BookWyrm in user agent
Fixes #3108
2024-01-20 16:15:17 +01:00
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 d640e4ac96
disable user exports by default
- new setting to enable user exports defaults to False
- add setting to enable and disable user exports
- do not allow user exports when using s3 storage
- do not serve non-image files from /images/ (requires update to nginx settings)
- increase default file upload limit to 100MB to enable user exports to be imported (can be changed in .env)
2024-01-16 21:32:13 +11:00
Mouse Reeve f72ada4780 Updates javascript cache buster just in case 2024-01-01 19:29:43 -08:00
Mouse Reeve 430e4eb90d
Update bookwyrm/settings.py
Co-authored-by: Demid <grrrr@protonmail.com>
2023-12-17 06:52:49 -08:00
Mouse Reeve 5c0e159d43 Adds Ukranian locale and updates locales 2023-12-12 15:42:40 -08:00
Mouse Reeve 198c0037c6
Merge pull request #3121 from hughrun/413
Display custom page on 413 errors
2023-12-09 08:31:25 -08:00
Sean Molenaar 5d09c54e57
Merge branch 'main' into feat/api/oauth 2023-12-07 15:38:19 +01:00
Adeodato Simó 416a6caf2d
Define author_search_vector_trigger via Author.Meta.triggers
Previously, triggers lived only in a particular migration file. With
this change, code for the triggers resides in the model, and their
lifecycle is managed through normal Django migrations.
2023-11-25 16:17:51 -03:00
Hugh Rundle a7fcd898c2
middleware for displaying 413 page
When a RequestDataTooBig exception is thrown, users are largely in the dark about what happened and how it can be fixed.
This commit resolves this by inserting middleware to redirect the request to a custom 413 error page.

This exception is thrown when DATA_UPLOAD_MAX_MEMORY_SIZE is exceeded. The default value is 2.5MB.

Fixes #2340
Fixes #2633
2023-11-18 22:10:36 +11:00
Sean Molenaar da4214ad61 feat: add OAuth authentication
Issue GH-2292
2023-11-14 14:18:35 +01:00
Hugh Rundle 1bedcdaebd
Merge branch 'main' into file-resubmit 2023-11-11 13:14:52 +11:00
Hugh Rundle f3fc5f6179
add file_resubmit to DUMMY caches settings 2023-11-11 12:45:04 +11:00
Hugh Rundle df43a8e2c5
Use django-file-resubmit plugin
- save cover images to cache when checking author and work for existing records
- fixes #2760
2023-10-30 19:43:39 +11:00
Hugh Rundle 853b5f28a4
add defaults of None to optional AWS values
fixes #2989
2023-10-29 11:29:49 +11:00
Jascha Ezra Urbach 1685ac1953
Move version out of settings (#3045)
This removes the content of VERSION from settings.py and moves it into a seperate file which makes it easier to update versionnumbers via script in the future.
2023-10-19 11:29:59 +02:00
Mouse Reeve bcfd4d2efa
Merge pull request #3016 from bookwyrm-social/release-changes
Updates locales and version number for release
2023-10-02 10:22:05 -07:00
Mouse Reeve 703a56940c
Merge pull request #2953 from phildini/add-spanish-articles
Add spanish articles
2023-10-02 10:20:51 -07:00
Mouse Reeve fcfe34f2f6 Updates locales and version number for release 2023-10-02 09:42:22 -07:00
Mouse Reeve bc870a305f
Merge pull request #2962 from jderuiter/mypy-isbn
Type annotations and tests for isbn
2023-09-01 17:05:01 -07:00
0x29a 1c9da7b84b chore: bump version to match the latest tag 2023-08-25 14:11:29 +02:00
Joeri de Ruiter f6d8786179 Type annotations for bookwyrm.isbn 2023-08-21 15:46:50 +02:00
Margaret Fero d7adada29c
Add Spanish Articles
Added articles for spanish language to list of articles in settings
2023-08-15 22:53:43 -07:00
Joeri de Ruiter 308dfd1be0 Include Dutch locale 2023-07-23 21:27:42 +02:00
Mouse Reeve 9c5b5d0ac1 Updates version 2023-07-20 19:08:47 -07:00
Jascha Ezra Urbach a601be4708
Merge branch 'main' into 2678 2023-06-01 16:53:28 +02:00
Mouse Reeve 0bb0537215 Updates version number 2023-05-30 11:00:12 -07:00
Zach Flanders 1985c2d284
Merge branch 'main' into 2678 2023-04-25 19:47:07 -05:00
Zach Flanders 575e1bac4c responding to review comments 2023-04-25 19:46:38 -05:00
Mouse Reeve b77ae9e783 Ticks version number 2023-04-25 17:42:32 -07:00
Zach Flanders a94a4732ec add support for title sort to ignore initial article 2023-04-24 23:29:55 -05:00
Wesley Aptekar-Cassels f91fcd518a Increase network timeout in Celery tasks
Since Celery tasks don't affect interactive latency, we should have a
more generous timeout. This also allows admins to set the timeout for
Celery and the web frontend separately, without breaking backwards
compatibility with the previous environment variable.
2023-04-06 01:21:27 -04:00