Commit graph

6385 commits

Author SHA1 Message Date
Joel Bradshaw
060f515aea Be even more conservative on errors
This runs at startup of anything, so we should be extra sure to not
break anything, and lots of things can go wrong downloading files from
the internet
2022-02-01 21:59:07 -08:00
Joel Bradshaw
d6abd9b32d Ensure directory exists, don't crash if we fail to write
We should be creating the directory because the static tree from the
repo isn't actually copied into the container, so we can't rely on it
existing.

And if we can't write it, we should catch that error instead of crashing
the whole thing, oops!
2022-02-01 21:45:13 -08:00
Joel Bradshaw
0c53f4e003 Fix linting and formatting 2022-01-25 01:09:27 -08:00
Joel Bradshaw
a1a3aa45f4 Don't log autoload debug
This is just too much
2022-01-25 00:53:15 -08:00
Joel Bradshaw
9e6390662b Download fonts at app startup instead
We can't bake the font into the Docker image as such, because we mount
the volumes which blows away anything we have in the app tree
beforehand.

We could stash it somewhere in the image and then copy it from there on
app startup or something, but at that point we might as well just
download it as part of the app startup.
2022-01-25 00:53:01 -08:00
Joachim
766a0cc652 Fix tests 2022-01-24 23:16:15 -08:00
Joachim
6f5115c716 Use Source Han Sans for preview images generation 2022-01-24 23:16:15 -08:00
Joel Bradshaw
284eb620dd Add Source Han font for preview generation to Docker image
Include the license and a README explaining things in the repo itself.

Depending on an external source for this is intended to be temporary,
the goal is to have a Bookywrm-managed source for these, but this should
be stable enough for now.

We build it into the Dockerfile to make it available without adding it
to the git repo itself, because git history is forever and we don't want
to bake large files into the history.

Theoretically it would make sense to gate this download on the
ENABLE_PREVIEW_IMAGES environment variable, but ENV variables aren't
available at Docker image build time (for sensible reasons), so we just
unconditonally download it.

This does mean users will ultimately download it anyway, but the benefit
to doing this over adding it to the git history is that if we switch
fonts, or update this one, or change strategies altogether, this version
of the font will no longer have to be downloaded.

Additionally, the font won't be downloaded until the application is
actually built, which involves a bunch of other downloading (of Docker
images and the like), so it's a reasonable time to do it.
2022-01-24 23:16:14 -08:00
Mouse Reeve
b35efb6eab
Merge pull request #1857 from bookwyrm-social/about-page-superlatives
Fixes display controls for about page superlatives
2022-01-20 17:20:04 -08:00
Mouse Reeve
ce30f8a8f0
Merge pull request #1854 from bookwyrm-social/pending-users
Activate users in pending state when site registration mode changes
2022-01-20 17:02:28 -08:00
Mouse Reeve
a8776843bd Fixes display toggle for about page superlatives 2022-01-20 17:00:15 -08:00
Mouse Reeve
ca21238e60
Merge pull request #1856 from bookwyrm-social/rss-limit
Show only recent results in rss feed view
2022-01-20 16:46:14 -08:00
Mouse Reeve
7476964cca Show only recent results in rss feed view 2022-01-20 16:33:24 -08:00
Mouse Reeve
148f9b6f5e Activate pending users when email confirmation is disabled 2022-01-20 15:58:00 -08:00
Mouse Reeve
874e2e0a9c Adds test for activating users on change to registration mode 2022-01-20 15:21:28 -08:00
Mouse Reeve
a0da5c75ff
Merge pull request #1853 from bookwyrm-social/author-page
Trying a new query to get author books
2022-01-20 15:19:11 -08:00
Mouse Reeve
4177654ccf
Merge pull request #1852 from bookwyrm-social/shelf-fixes
Shelf date on all books page
2022-01-20 15:14:21 -08:00
Mouse Reeve
d5ddaa874f Trying a new query to get author books 2022-01-20 15:07:39 -08:00
Mouse Reeve
afea857442 Uses max shelved date to get valid date for all books page 2022-01-20 14:28:30 -08:00
Mouse Reeve
28d675c5a0 Adds more shelf page tests 2022-01-20 14:25:24 -08:00
Mouse Reeve
d9175ce0b0 HTML validity on shelf page 2022-01-20 14:19:41 -08:00
Mouse Reeve
a8892d4dcc
Merge pull request #1851 from bookwyrm-social/update-locales
Updates locales
2022-01-20 13:55:38 -08:00
Mouse Reeve
a54fc08983 Updates locales 2022-01-20 13:43:59 -08:00
Mouse Reeve
db715cce2a
Merge pull request #1845 from bookwyrm-social/organizing-templatetags
Organizing templatetags
2022-01-18 14:51:13 -08:00
Mouse Reeve
8b8314f736 Fixes embed view 2022-01-18 14:27:19 -08:00
Mouse Reeve
93caa95855 Removes stray asssert line 2022-01-18 14:05:35 -08:00
Mouse Reeve
c888895327 Adds missing tag loaders 2022-01-18 14:04:55 -08:00
Mouse Reeve
55ae6d1f8d
Merge pull request #1844 from bookwyrm-social/review-html
Fixes review markup for mastodon serialization
2022-01-18 13:42:02 -08:00
Mouse Reeve
e47b5e788d Remove link form review title
html isn't supported in the name field I guess
2022-01-18 13:31:50 -08:00
Mouse Reeve
41c3eceb68 Updates tests 2022-01-18 13:19:04 -08:00
Mouse Reeve
3f487328e2 Adds more tests 2022-01-18 13:15:25 -08:00
Mouse Reeve
ffaeb3381a Updates tests 2022-01-18 12:53:35 -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
3d63509e20 Updates snippets that use rating tags 2022-01-18 12:09:57 -08:00
Mouse Reeve
b25fa5a193 Adds tests 2022-01-18 12:07:42 -08:00
Mouse Reeve
6e6e2ab777 Moves rating tag to file 2022-01-18 12:02:38 -08:00
Mouse Reeve
4f4d2dc53e Adds tests 2022-01-18 12:02:27 -08:00
Mouse Reeve
8746409e6d Adds shelf tags file 2022-01-18 11:20:27 -08:00
Mouse Reeve
e3545517ec
Merge pull request #1837 from bookwyrm-social/author-page-caching
Author page caching
2022-01-18 11:02:49 -08:00
Mouse Reeve
1c096ecfc2 Fixes review markup for mastodon serialization 2022-01-18 10:57:52 -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
9e450f2d99
Merge pull request #1802 from cincodenada/configurable-logging
Make log level configurable, override default logging config
2022-01-18 07:39:43 -08:00
Mouse Reeve
d20db99501
Merge pull request #1838 from bookwyrm-social/create-readthrough-bug
Fixes bug in verifying readthrough dates
2022-01-18 06:57:34 -08:00
Mouse Reeve
f5de0dd3c9 Fixes bug in verifying readthrough dates 2022-01-17 19:46:48 -08:00
Mouse Reeve
a09c813f73 Python formatting 2022-01-17 19:04:20 -08:00
Joel Bradshaw
27a0b92de0 Fix include order 2022-01-17 16:12:16 -08:00
Joel Bradshaw
27acf668df Add the required bits for Django's logger
So, you can't define handlers piecewise, and if you redefine a logger,
you have to also include everything it uses, because your "new" logger
doesn't have a reference to the original logging config to get things
like mail_admins and require_debug_false.

require_debug_true isn't strictly necessary here, but it seemed strange
to just copy over one of them.
2022-01-17 15:56:24 -08:00
Joel Bradshaw
13a2c58b98 Use parameter-based formatting for debug 2022-01-17 15:14:01 -08:00