Compare commits

...

3907 commits

Author SHA1 Message Date
Mouse Reeve e3471fcc35
Merge pull request #2148 from hughrun/quotes
add page numbers to comment and quote statuses
2022-06-10 17:35:15 -07:00
Mouse Reeve 2993989d27
Merge pull request #2149 from cincodenada/preview-generation-memory
Update preview image generation to only query ids
2022-06-10 17:25:05 -07:00
Joel Bradshaw 7f5d47a36f Use values_list with flat, yay! 2022-06-07 23:15:34 -07:00
Mouse Reeve 3aa159bc89
Merge branch 'main' into preview-generation-memory 2022-06-05 18:39:59 -07:00
Mouse Reeve 8d082bc189
Merge branch 'main' into quotes 2022-06-05 15:42:01 -07:00
Mouse Reeve 08231f52ff
Merge pull request #2150 from cincodenada/fix-pylint
Fix pylint config for pylint 2.14.0
2022-06-05 15:41:32 -07:00
Joel Bradshaw 6584cb6404 Go back to one requirements.txt, simplify workflow
The workflow can now use .pylintrc and the pylint req in
requirements.txt rather than having the options inline and installing it
separately
2022-06-05 14:57:42 -07:00
Joel Bradshaw b3603c04c5 Add pylint to bw-dev
Because pylint requires the app to be fully parseable with all its
dependencies, we run it in the web container, and add pylint as a dev
dependency.
2022-06-05 14:49:21 -07:00
Joel Bradshaw 6d6ab9a531 Add .pylintrc with fixes for new pylint version 2022-06-05 14:38:03 -07:00
Joel Bradshaw b744ff7836 Run black 2022-06-05 13:40:01 -07:00
Joel Bradshaw 482005f304 Update preview image generation to only query ids
Previously we were querying the full book objects just to get a list of
id's, which is much slower and also takes a lot more memory, which can
cause the process to be killed on memory-limited machines with a large
number of books.

Instead, since we're just dispatching jobs here, we can just ask for the
id's, which is faster and much more practical memory-wise.

The map is a little annoying, I didn't see a way to directly get just a
list of the value of one field, so we have to get a list of
dictionairies with one key and then pull that key out. Whatevs.
2022-06-05 13:07:44 -07:00
Hugh Rundle 4de9989d8e add page numbers to comment and quote statuses
This adds the page number for quote and comment statuses where a page number is provided:

- all ActivityPub posts
- Explore cards for comments (quotes already have the page number)

This responds to #2136
2022-06-05 16:02:25 +10:00
Mouse Reeve d5bbb759e0
Merge pull request #2146 from bookwyrm-social/locales
Updates locales for stopped reading strings
2022-05-31 17:09:44 -07:00
Mouse Reeve 077c9bfe46 Updates locales for stopped reading strings 2022-05-31 16:53:46 -07:00
Mouse Reeve 9d5e113b92
Merge pull request #2145 from bookwyrm-social/about-layout
Clip column in about page
2022-05-31 14:05:43 -07:00
Mouse Reeve 4c050d0999
Merge pull request #2141 from bookwyrm-social/ol-search-rank
Use relative list order ranking in OpenLibrary search
2022-05-31 13:11:49 -07:00
Mouse Reeve 20f452ebf4 Clip column in about page
Text in the superlatives section can cause this column to expand outside
the container.
2022-05-31 12:23:59 -07:00
Mouse Reeve 374fdcf467 Use relative list order ranking in openlibrary search
Set OpenLibrary search condifidence based on the provided result order,
just using 1/(list index), so the first has rank 1, the second 0.5, the
third 0.33, et cetera.
2022-05-31 10:22:49 -07:00
Mouse Reeve 355e7039f0
Merge pull request #2139 from bookwyrm-social/search-refactor
Search refactor
2022-05-31 10:22:17 -07:00
Mouse Reeve c3b35760a2 Updates test mocks for remote search 2022-05-31 09:37:54 -07:00
Mouse Reeve 969db13ff2 Safely return None in remote search return_first 2022-05-31 08:49:23 -07:00
Mouse Reeve 05fd30cfcf Pylint fixes in connector tests 2022-05-31 08:37:07 -07:00
Mouse Reeve 5e99002aad Raise priority for external connectors in initdb
By default, OpenLibrary and Inventaire were prioritzed below other
BookWyrm nodes. In practice, people have gotten better search results
from these connectors, hence the change. With the search refactor, this
has much less impact, but it will show these search results higher in
the list.

If the results page shows all the connectors' results integrated, this
field should be removed entirely.
2022-05-31 08:25:02 -07:00
Mouse Reeve a053f20961 Re-implements return first option
Since we get all the results quickly now, this aggregates all the
results that came back and sorts them by confidence, and returns the
highest confidence result. The confidences aren't great on free text
search, but conceptually that's how it should work at least.

It may make sense to aggregate the search results in all contexts, but
I'll propose that in a separate PR.
2022-05-31 08:20:59 -07:00
Mouse Reeve 98ed03b6b4 Python formatting and test update 2022-05-30 17:00:34 -07:00
Mouse Reeve 83ee5a756f Filter intentaire results by confidence 2022-05-30 16:42:37 -07:00
Mouse Reeve af19d728d2 Removes outdated unit tests 2022-05-30 16:16:10 -07:00
Mouse Reeve 87fe984462 Combines search formatter and parser function
The parser was extracting the list of search results from the json
object returned by the search endpoint, and the formatter was converting
an individual json entry into a SearchResult object. This just merged
them into one function, because they are never used separately.
2022-05-30 12:52:31 -07:00
Mouse Reeve 525e2a591d More error handing
Adds logging and error handling for some of the numerous ways a request
could fail (the remote site is down, the url is blocked, etc).

I also have the results boxes open by default, which makes it more
legible imo.
2022-05-30 12:40:13 -07:00
Mouse Reeve 45f2199c71 Gather and wait on async requests
This sends out the request tasks all at once and then aggregates the
results, instead of just running them one after another asynchronously.
2022-05-30 12:05:22 -07:00
Mouse Reeve 5e81ec75fb Set request headers in async search get request
Gotta ask for json
2022-05-30 11:19:16 -07:00
Mouse Reeve 9a9cef7766 Verify url before async search
The database lookup doesn't work during the asyn process, so this change
loops through the connectors and grabs the formatted urls before sending
it to the async handler.
2022-05-30 11:16:05 -07:00
Mouse Reeve 0adda36da7 Remove search endpoints from Connector
Instead of having individual search functions that make individual
requests, the connectors will always be searched asynchronously
together. The process_seach_response combines the parse and format
functions, which could probably be merged into one over-rideable
function.

The current to-do on this is to remove Inventaire search results that
are below the confidence threshhold after search, which used to happen
in the `search` function.
2022-05-30 10:37:24 -07:00
Mouse Reeve 9c03bf782e Make an async request to all search connectors
This is the untest first pass at re-arranging remote search to work in
parallel rather than sequence. It moves a couple functions around
(raise_not_valid_url, for example, needs to be in connector_manager.py
now to avoid circular imports). It adds a function to Connector objects
that generates a search result (either to the isbn endpoint or the free
text endpoint) based on the query, which was previously done as part of
the search.

I also lowered the timeout to 8 seconds by default.
2022-05-30 10:15:22 -07:00
Mouse Reeve 7905be7de2
Merge pull request #2138 from bookwyrm-social/ratings-query
Use general ratings rather than privacy filtered
2022-05-30 09:33:05 -07:00
Mouse Reeve fb3c7205af Updates unit tests 2022-05-30 09:17:51 -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 4e3c346780
Merge pull request #2134 from bookwyrm-social/stopped-shelf-fixes
Stopped shelf fixes
2022-05-26 13:12:57 -07:00
Mouse Reeve 74925a379a Prettier 2022-05-26 12:54:31 -07:00
Mouse Reeve 4e0e6ed5a4 Tick javascript cache and version number 2022-05-26 12:49:04 -07:00
Mouse Reeve 09db4e48f4 Hide rather than remove current shelve list items 2022-05-26 12:46:34 -07:00
Mouse Reeve c5f5d4d994 Only show "stop" option when a book is in progress 2022-05-26 12:27:44 -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
Mouse Reeve 4c5d2570ab Save and display stopped date in readthrough 2022-05-26 11:53:33 -07:00
Mouse Reeve dfe0656eb4 Typo fix 2022-05-26 11:38:36 -07:00
Mouse Reeve 375c5a8789 Adds stopped date separate from finish date on readthrough 2022-05-26 11:36:37 -07:00
Mouse Reeve 1f6fbd8d29 Fixes stopped reading button logic
The stopped state is similar to finished
2022-05-26 11:28:54 -07:00
Mouse Reeve 9b4a498661 Don't show a button for the shelf a book is currently on
This will lead to nonsensical modal states
2022-05-26 11:19:49 -07:00
Mouse Reeve 92dbfec5f8 Adds status header for stopped reading statuses 2022-05-26 11:10:14 -07:00
Mouse Reeve 6848616ff1 Fixes reading status field in stop modal
The value of the reading status needs to match one of the database
options for `reading_status` in the `Comment` model
2022-05-26 11:09:11 -07:00
Mouse Reeve 007751c8cb Adds error logging to status views 2022-05-26 10:58:11 -07:00
Mouse Reeve 23c6019340 Adds merge migration 2022-05-26 10:23:32 -07:00
Mouse Reeve 77a7dfa924
Merge pull request #2133 from bookwyrm-social/activitypub-connection-erorr
Don't throw an error when unable to connect to remote data
2022-05-26 10:12:18 -07:00
Mouse Reeve 88b2cffcf2
Merge pull request #2035 from bookwyrm-social/stopped-shelf
Stopped shelf
2022-05-26 10:11:32 -07:00
Mouse Reeve 9d275db322 Updates ignore boost logic that no longer produces errors 2022-05-26 09:57:39 -07:00
Mouse Reeve 3e54a5f4a3 Python formatting 2022-05-26 09:00:45 -07:00
Mouse Reeve 0bfe1e9dfc Don't throw an error when unable to connect to remote data 2022-05-25 13:24:11 -07:00
Mouse Reeve f4226b050f
Merge pull request #2129 from bookwyrm-social/locales
Updates locales (changes to German, Romanian)
2022-05-23 18:02:45 -07:00
Mouse Reeve b8ddafffbe
Merge pull request #2130 from bookwyrm-social/followers-hidden
Make an exception for yourself when followers are hidden
2022-05-23 18:02:34 -07:00
Mouse Reeve 0f7317f8fe Make an exception for yourself when followers are hidden 2022-05-23 15:31:05 -07:00
Mouse Reeve 867981b2a4 Updates locales (changes to German, Romanian) 2022-05-23 15:20:35 -07:00
Mouse Reeve 6d5923bb8f
Merge pull request #2128 from bookwyrm-social/multiple-authors
Multiple authors not added when editing book
2022-05-23 14:07:54 -07:00
Mouse Reeve 3ed685e341
Merge pull request #2126 from bookwyrm-social/black-update
Updates black version
2022-05-23 13:59:19 -07:00
Mouse Reeve 9172d7ff4e
Merge pull request #2127 from bookwyrm-social/add-book
Corrects redirect to confirm mode when adding book
2022-05-23 13:59:12 -07:00
Mouse Reeve 69f192e78c Fixes error in add author code returning too soon 2022-05-23 13:57:14 -07:00
Mouse Reeve b2c587e082 Adds unit test for add author code when editing book 2022-05-23 13:51:58 -07:00
Mouse Reeve efd1fd82a9 Corrects redirect to confirm mode when adding book 2022-05-23 13:02:06 -07:00
Mouse Reeve ae2006c726 Updates black version 2022-05-23 12:46:45 -07:00
Mouse Reeve 1843959d10
Merge pull request #2093 from Ryuno-Ki/calibre-import
Calibre import. Fixes #627
2022-05-23 12:37:50 -07:00
Mouse Reeve 212bd49e6c
Merge pull request #2125 from bookwyrm-social/edit-author
Fixes edit author paths
2022-05-23 12:26:07 -07:00
André Jaenisch d837146b66
Make black happy
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-23 20:59:28 +02:00
André Jaenisch b564e514fd
Handle parsed dates that already have a timezone on import.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-23 20:52:57 +02:00
André Jaenisch 12541d5f1c
Map timestamp to date_added to avoid integrity error.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-23 20:52:26 +02:00
Mouse Reeve d8b2ab74d1 Fixes edit author paths 2022-05-23 11:08:04 -07:00
Mouse Reeve 065095776f
Merge pull request #2119 from bookwyrm-social/edit-book
Fixes urls in edit book form
2022-05-19 10:47:10 -07:00
Mouse Reeve 6d7bb33683 Fixes urls in edit book form 2022-05-19 09:32:01 -07:00
Mouse Reeve cbd43c42a9
Merge pull request #2115 from bookwyrm-social/book-langs
Prevent error when a book language has a null value
2022-05-16 11:41:07 -07:00
Mouse Reeve 8d2da587d9 Prevent error when a book language has a null value 2022-05-16 11:06:11 -07:00
Mouse Reeve 39b6364e62
Merge pull request #2114 from bookwyrm-social/sentry-error-article
Fixes exception when receiving Article type activities
2022-05-16 10:38:15 -07:00
Mouse Reeve b2775c5160 Check unsupported types before attempting to serialize 2022-05-16 10:21:54 -07:00
Mouse Reeve fd43b56d31 Fixes celery error encountering Article type activities 2022-05-16 10:17:21 -07:00
Mouse Reeve 17864da8a2
Merge pull request #2113 from bookwyrm-social/status-priority
Fixes how backdated statuses are prioritized
2022-05-16 09:49:39 -07:00
Mouse Reeve fdd4691e00 Adds unit test 2022-05-16 09:41:34 -07:00
Mouse Reeve 876d9c2695 Fixes how backdated statuses are prioritized 2022-05-16 09:24:01 -07:00
Mouse Reeve fd66961ab8
Merge pull request #2104 from maxheadroom/main
add automatic restart of containers
2022-05-16 08:07:49 -07:00
Mouse Reeve ae8edce197
Merge pull request #2111 from maeserichar/fix_broken_links
Fix broken links in README
2022-05-16 08:05:44 -07:00
Mouse Reeve 241169650d
Merge pull request #2007 from viviicat/url-names
Add names of books/lists/authors/etc as slugs, redirect to slugified version of the page
2022-05-16 08:04:58 -07:00
Mouse Reeve 23eb1c1b10
Merge pull request #1942 from willhoh/isbn_search
Isbn check befor search
2022-05-16 08:01:31 -07:00
Ricardo Rodríguez 643a3509dd docs: Fix broken links in README 2022-05-15 13:01:25 +02:00
Mouse Reeve a5f9efc2b5
Merge pull request #2110 from bookwyrm-social/locales
Updates locales
2022-05-14 08:43:35 -07:00
Mouse Reeve 8c0ad7e73d Updates locales 2022-05-14 08:29:25 -07:00
Falko Zurell d0b7474744
add automatic restart of containers
Added ```restart: unless-stopped``` to keep containers up and running after a reboot.
2022-05-09 11:00:28 +02:00
Mouse Reeve 49e6eb8f68
Merge pull request #2092 from bookwyrm-social/locale-updates
Updates locales
2022-05-06 12:50:49 -07:00
Mouse Reeve ba7c39404b
Merge pull request #2103 from denmch/bugfix-profile-link
Replace user|username with request.user.localname
2022-05-06 12:19:34 -07:00
Den McHenry 80b0206e0d Replace user|username with request.user.localname 2022-05-06 10:29:25 -07:00
André Jaenisch 62c7661fb9
Reformat tests using black
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-05 21:31:56 +02:00
André Jaenisch 22fcb61fb2
Write tests for Calibre importer
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-05 13:08:01 +02:00
André Jaenisch 6bd9b725e2
Refactor hard-coded strings with a reference to a static property
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-05 13:07:25 +02:00
André Jaenisch eeb1cc7197
Use a default shelf because Calibre indicates no reading status
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-04-30 19:08:31 +02:00
André Jaenisch 3626db3c1a
Add Calibre importer for CSV exports
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-04-30 15:25:35 +02:00
Mouse Reeve 95c043cc92 Updates locales 2022-04-29 15:44:31 -07:00
Mouse Reeve a4a06fa32c
Merge pull request #2090 from bookwyrm-social/dashboard-warning
Fixes invite request alert count
2022-04-29 15:41:57 -07:00
Mouse Reeve 966bec1d18 Fixes invite request alert count 2022-04-26 08:33:15 -07:00
Mouse Reeve 708dc4d613
Merge pull request #2089 from bookwyrm-social/no-confirmation
Show clearer behavior when no email confirmation is needed after all
2022-04-26 08:24:35 -07:00
Mouse Reeve a6cb46356f Show clearer behavior when no email confirmation is needed after all 2022-04-26 08:14:31 -07:00
Mouse Reeve 34be995125
Merge pull request #2087 from bookwyrm-social/locales
Updates locales
2022-04-26 07:50:16 -07:00
Mouse Reeve 676a51411f Updates locales 2022-04-26 07:41:23 -07:00
Mouse Reeve 93ec53f523
Merge pull request #2085 from bookwyrm-social/dependabot/pip/django-3.2.13
Bump django from 3.2.12 to 3.2.13
2022-04-25 09:20:12 -07:00
dependabot[bot] 3559bb5630
Bump django from 3.2.12 to 3.2.13
Bumps [django](https://github.com/django/django) from 3.2.12 to 3.2.13.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.12...3.2.13)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 22:47:05 +00:00
Mouse Reeve 358c507839
Merge pull request #2080 from viviicat/dark-read-hist-editions
Further dark theme fixes
2022-04-09 07:53:17 -07:00
Vivianne Langdon 64b623df32 fixes for bulma not having good dark support 2022-04-09 00:06:10 -07:00
Vivianne Langdon d3992802f2 use a new has-text-default instead of has-text-black 2022-04-08 23:14:30 -07:00
Vivianne Langdon b0d3eaeb40 allow empty slugs, for non-url-friendly book names 2022-04-08 22:11:05 -07:00
Vivianne 5a2bf64864
Merge branch 'bookwyrm-social:main' into url-names 2022-04-08 21:45:37 -07:00
Mouse Reeve 300eea3b94
Merge pull request #2074 from bookwyrm-social/pylint-tests-dir
Include test files in pylint
2022-04-08 14:39:44 -07:00
Mouse Reeve 8b7f664da3
Merge pull request #2078 from bookwyrm-social/locales
Consistent formatting for "BookWyrm" name
2022-04-08 14:34:46 -07:00
Mouse Reeve 2c394a2518 Fixes typo 2022-04-08 14:29:42 -07:00
Mouse Reeve 8ea1171764 Python formatting 2022-04-08 14:24:14 -07:00
Mouse Reeve 9921a1e754 Various pylint complaince fixes 2022-04-08 14:23:37 -07:00
Mouse Reeve a92bf785dd Updates init files for pylint 2022-04-08 14:16:05 -07:00
Mouse Reeve 3c1f95a83a Updates locales 2022-04-08 14:01:13 -07:00
Mouse Reeve 6455476df7 Consistent formatting for "BookWyrm" name 2022-04-08 13:59:10 -07:00
Mouse Reeve e0fa0b859a
Merge pull request #2077 from bookwyrm-social/main-dropdown
Uses details for user menu in main navbar
2022-04-08 13:58:15 -07:00
Mouse Reeve ae8fed3e82 Removes stray dash from template 2022-04-08 13:50:06 -07:00
Mouse Reeve 51f5c9562d Uses details for user menu in main navbar 2022-04-08 13:45:17 -07:00
Mouse Reeve 1a6e98b546
Merge pull request #2073 from bookwyrm-social/update-locales
Updates locales
2022-04-04 15:38:21 -07:00
Mouse Reeve fe85784ceb
Merge pull request #2072 from bookwyrm-social/zsh-complete
Adds zsh-specific completions file
2022-04-04 15:26:31 -07:00
Mouse Reeve 9e803043b2 Include test files in pylint 2022-04-04 15:24:39 -07:00
Mouse Reeve bada50cee9 Updates locales 2022-04-04 15:20:15 -07:00
Mouse Reeve b718e01a5c Adds zsh-specific completions file 2022-04-04 15:17:18 -07:00
Mouse Reeve 4c09477aa2
Improves instance list admin view (#2068)
* Removes irrelevent initial federated server data

* Adds secondary search order to instance list

* Show last updated date

* Adds filters to federated server view

* Updates unit tests
2022-04-02 09:16:07 -07:00
Mouse Reeve ae86829a7e
Adds Finnish locale (#2069)
* Adds Finnish locale
2022-03-31 08:20:52 -07:00
Mouse Reeve c7261780a8
Updates locales (#2065) 2022-03-26 14:34:15 -07:00
Mouse Reeve 71cbe611de Merge migration 2022-03-26 13:07:27 -07:00
Mouse Reeve ec21d20b90 Merge branch 'main' into stopped-shelf 2022-03-26 13:06:06 -07:00
Mouse Reeve 701a644c31
Export user book data as csv (#1556)
Simple book data export
2022-03-26 13:04:59 -07:00
Mouse Reeve 0728864fe0
Merge pull request #2064 from bookwyrm-social/ui-fixes
Misc theme fixes
2022-03-26 11:48:59 -07:00
Mouse Reeve 3ebc800a9b Fixes progress bar color in dark mode 2022-03-26 11:38:00 -07:00
Mouse Reeve 23ff58a62b Fixes scrollbar colors in dark mode 2022-03-26 11:35:24 -07:00
Mouse Reeve 0666a2d02f Remove transparent class on interaction buttons 2022-03-26 11:07:58 -07:00
Mouse Reeve b23f4a7e18 Clip statuses 2022-03-26 11:00:53 -07:00
Mouse Reeve 7cbf78c5fd
Merge pull request #2056 from bookwyrm-social/duplicate-follow-requests
Trigger rebroadcast of follow requests
2022-03-26 10:42:06 -07:00
Mouse Reeve 00c36de745
Merge pull request #2062 from bookwyrm-social/locales
Adds Romanian locale
2022-03-26 10:41:07 -07:00
Mouse Reeve 85f507d6b9 Python formatting 2022-03-26 10:34:02 -07:00
Mouse Reeve 5cf52cff54 Formats migration 2022-03-26 10:32:07 -07:00
Mouse Reeve c527e0e411
Merge pull request #2061 from bookwyrm-social/link-typo
Fixes typo in about link
2022-03-26 10:30:59 -07:00
Mouse Reeve a1487ccae5
Merge branch 'main' into duplicate-follow-requests 2022-03-26 10:28:58 -07:00
Mouse Reeve 2d7902ff89 Resolve second integrity error 2022-03-26 10:27:49 -07:00
Mouse Reeve dc171776f8
Merge branch 'main' into link-typo 2022-03-26 10:21:52 -07:00
Mouse Reeve 44af09336c
Merge branch 'main' into locales 2022-03-26 10:21:43 -07:00
Mouse Reeve 566182c046
Merge pull request #2063 from bookwyrm-social/pylint-warning
Avoid new pylint complaint
2022-03-26 10:21:34 -07:00
Mouse Reeve 90277a1697 Avoid new pylint complaint 2022-03-26 10:07:06 -07:00
Mouse Reeve a6ae55608a Adds Romanian locale 2022-03-26 10:03:50 -07:00
Mouse Reeve 27e23e76ae Fixes typo in about link 2022-03-26 09:43:49 -07:00
Mouse Reeve 4f24b05d60 Clear cache regardless of view success 2022-03-24 13:10:49 -07:00
Mouse Reeve 6808b70d3f
Merge pull request #2055 from bookwyrm-social/reports
Paginate reports
2022-03-24 11:35:48 -07:00
Mouse Reeve a3b9c621af Trigger rebroadcast of follow requests 2022-03-24 11:35:05 -07:00
Mouse Reeve 0166cca0b7 Show created date and follower counts in admin view
Adds "admin_mode" to user_preview
2022-03-24 11:17:35 -07:00
Mouse Reeve 82f87a3ff5 Adds colored icon for user status in admin table 2022-03-24 10:55:32 -07:00
Mouse Reeve 533642bf7e Adds link to admin view 2022-03-24 10:43:17 -07:00
Mouse Reeve 951b611881 Paginates results 2022-03-24 10:40:42 -07:00
Mouse Reeve 88e915409b
Merge pull request #2048 from bookwyrm-social/import-help
Import help
2022-03-21 13:09:51 -07:00
Mouse Reeve 43cc017b44 Removes tooltip component 2022-03-21 12:32:53 -07:00
Mouse Reeve 9e792a8901 Italics for null state text on import page, to be consistent 2022-03-21 12:26:07 -07:00
Mouse Reeve 34166b8a2f Uses help instead of tooltip for goodreads export info 2022-03-21 12:24:47 -07:00
Mouse Reeve 3f7afc9014 Adds prompt to import books in null state of suggested books 2022-03-21 12:24:31 -07:00
Mouse Reeve a29db4840c
Merge pull request #2046 from bookwyrm-social/resend-flow
Resend flow
2022-03-19 15:28:30 -07:00
Mouse Reeve 1b53c81351 Updates tests 2022-03-19 15:16:20 -07:00
Mouse Reeve 78ac252dae Python formatting 2022-03-19 12:08:57 -07:00
Mouse Reeve f2ab890b5a Adds fallback form to modal 2022-03-19 12:07:07 -07:00
Mouse Reeve 4386d2ddb9 Switches resend email to modal 2022-03-19 12:00:16 -07:00
Mouse Reeve 5655b94bad
Merge pull request #2044 from bookwyrm-social/date-picker
Uses custom date select widget for publication dates
2022-03-19 09:33:53 -07:00
Mouse Reeve b134c0c2fd
Merge pull request #2045 from bookwyrm-social/dashboard-display
Dashboard display small fixes
2022-03-19 09:33:19 -07:00
Mouse Reeve f0a87e2a20 Use fullwidth tables in admin views 2022-03-19 09:16:28 -07:00
Mouse Reeve 7f6a98e764 Don't let site settings form get too wide 2022-03-19 09:11:59 -07:00
Mouse Reeve 1cfe3b3f94 Re-orders site settings registration toggles
Having require email confirm next to allow registration seems better to
me
2022-03-19 09:09:25 -07:00
Mouse Reeve 45672c2b70 Adds missing widgets file 2022-03-19 09:04:50 -07:00
Mouse Reeve 68e3a71b18 Consistent height for instance stats 2022-03-19 09:01:04 -07:00
Mouse Reeve 09e040ec11 Equal height for dashboard notifications 2022-03-19 08:59:41 -07:00
Mouse Reeve dc9f8fccb7 Adds widgets file 2022-03-19 08:48:10 -07:00
Mouse Reeve a701bfcf8e Uses custom date select widget for publication dates 2022-03-19 08:45:10 -07:00
Mouse Reeve db5f509475
Merge pull request #2042 from bookwyrm-social/progress-updates
Fixes progress updates
2022-03-18 19:30:54 -07:00
Mouse Reeve 55dc998d03 Retain start date when updating from modal 2022-03-18 19:20:43 -07:00
Mouse Reeve 287b5603d6 Fixes progress updates 2022-03-18 19:11:58 -07:00
Mouse Reeve f52b8fc028
Merge pull request #2040 from bookwyrm-social/edit-book
Fixes edit book page
2022-03-18 07:37:32 -07:00
Mouse Reeve 713391f468 Fixes edit book page 2022-03-18 07:28:07 -07:00
Mouse Reeve 576d0ee189
Merge pull request #2038 from bookwyrm-social/build-script
Comments out build script step in update command
2022-03-17 10:36:23 -07:00
Mouse Reeve 184a463097 Comments out build script step in update command 2022-03-17 10:25:03 -07:00
Mouse Reeve ee78cc7393
Merge pull request #2037 from bookwyrm-social/celery-queues
Adds auto-create queues option to config
2022-03-17 10:06:49 -07:00
Mouse Reeve ee1850ed15
Merge pull request #2034 from bookwyrm-social/locales
Updates locales
2022-03-17 10:01:38 -07:00
Mouse Reeve 20e71dc0cd
Merge pull request #2036 from bookwyrm-social/author-performance
Simplifies query possibly causing author page performance issues
2022-03-17 10:01:26 -07:00
Mouse Reeve 117db78983 Adds auto-create queues option to config 2022-03-17 09:57:25 -07:00
Mouse Reeve a584f077b7 Simplifies query likely causing author page performance issues 2022-03-17 09:51:54 -07:00
Mouse Reeve c8fa031c23 Updates locales 2022-03-17 09:21:06 -07:00
Mouse Reeve 2047365d31
Merge pull request #1973 from bookwyrm-social/add-edition
Create another edition for existing work
2022-03-17 08:51:13 -07:00
Mouse Reeve ef4e06ad52
Merge pull request #2033 from bookwyrm-social/author-sort
Reverts author view changes
2022-03-17 08:51:06 -07:00
Mouse Reeve 9e0d6ed512
Merge branch 'main' into author-sort 2022-03-17 08:31:45 -07:00
Mouse Reeve 0101d2561a Python formatting 2022-03-17 08:18:44 -07:00
Mouse Reeve a684d86d15 Fixes subjects in add edition view 2022-03-17 08:02:59 -07:00
Mouse Reeve 26f0501e2f SHow editions link on all book pages 2022-03-17 07:40:55 -07:00
Mouse Reeve 997a671cfb Consistent style for edit book confirm mode 2022-03-17 07:34:59 -07:00
Mouse Reeve 3ca611fb7c
Merge pull request #2031 from viviicat/dark-theme-fixes
Fixes for dark theme
2022-03-17 07:27:19 -07:00
Mouse Reeve cf58d0ad5c Reverts author view changes 2022-03-17 07:22:22 -07:00
Vivianne Langdon 3050b33084 add success-light and warning-light! 2022-03-16 20:21:13 -07:00
Mouse Reeve 5255abb2af Fixes create book view unit test 2022-03-16 17:55:41 -07:00
Mouse Reeve 0617b9424b
Merge pull request #2029 from bookwyrm-social/merge-error
Removes file added by merge
2022-03-16 17:31:02 -07:00
Mouse Reeve 178f26192b Removes file added by merge 2022-03-16 17:15:53 -07:00
Mouse Reeve 0688dfa3aa
Merge pull request #2028 from bookwyrm-social/user-question-resolve
Resolves merge conflicts on user invite question PR
2022-03-16 17:09:35 -07:00
Mouse Reeve 8b061f9432 Manually updates migration 2022-03-16 16:53:16 -07:00
Mouse Reeve 7b3b357756 Merge branch 'main' into form-conflict 2022-03-16 16:51:57 -07:00
Mouse Reeve 44e68cd0a4 Whitespace fix 2022-03-16 16:50:34 -07:00
Mouse Reeve 922cc61a5f
Merge pull request #1998 from oragegu/question_invite_correct
Custom question option and field for spammed bookwyrm instances
2022-03-16 16:49:00 -07:00
Mouse Reeve 108981a226 Creates fresh migration and removes merges 2022-03-16 16:35:03 -07:00
Mouse Reeve 0cf2c07069
Merge branch 'main' into url-names 2022-03-16 16:32:07 -07:00
Mouse Reeve ffec47ad9a
Merge pull request #2027 from bookwyrm-social/locales
Adds context and fixes whitespace in translation strings
2022-03-16 16:29:38 -07:00
Mouse Reeve 68dc5962ee Merge branch 'main' into add-edition 2022-03-16 16:16:55 -07:00
Mouse Reeve da100cd114 Adds context and fixes whitespace in translation strings
Also updates locales
2022-03-16 16:13:15 -07:00
Mouse Reeve 159b73d860 Fixes errors in migration 2022-03-16 13:54:25 -07:00
Mouse Reeve 819458e82a Improves error reporting on activitypub parser 2022-03-16 13:53:54 -07:00
Mouse Reeve f2b0b306e9
Merge pull request #1934 from tversteeg/partially-read-shelf
Add 'Stopped Reading' shelf
2022-03-16 13:51:15 -07:00
Mouse Reeve eee325b662
Merge pull request #2026 from bookwyrm-social/missing-file
Adds missing update script
2022-03-16 13:41:43 -07:00
Mouse Reeve ea69f9087f Adds missing update script 2022-03-16 13:32:37 -07:00
Mouse Reeve 8969958e51
Merge pull request #2025 from bookwyrm-social/upgrade-scripts
Run miscellaneous scripts during update
2022-03-16 13:03:38 -07:00
Mouse Reeve 2b2aa078ad
Merge branch 'main' into upgrade-scripts 2022-03-16 12:54:25 -07:00
Mouse Reeve f4e828e2fb
Merge pull request #1974 from bookwyrm-social/celerybeat
Schedules automod tasks
2022-03-16 12:54:06 -07:00
Mouse Reeve ee973c7d72 Adds celerybeat update script 2022-03-16 12:53:27 -07:00
Mouse Reeve 78b03efe45 Updates bw-dev command and ticks version number 2022-03-16 12:53:05 -07:00
Mouse Reeve 820279166a Adds update script 2022-03-16 12:39:49 -07:00
Thomas Versteeg b3f03164cc Apply black 2022-03-15 09:28:40 +01:00
Thomas Versteeg ee414598bf
Merge branch 'main' into partially-read-shelf 2022-03-15 08:28:02 +00:00
Mouse Reeve 81b7dca4b9 Merge branch 'main' into celerybeat 2022-03-14 15:13:09 -07:00
Mouse Reeve 13b82c2740
Merge pull request #2020 from bookwyrm-social/multi-input
Array input field for forms
2022-03-14 15:07:00 -07:00
Mouse Reeve a37f83c458 Get the field working 2022-03-14 14:55:41 -07:00
Mouse Reeve 716e357060 Use plus icon on add field button 2022-03-14 12:54:50 -07:00
Mouse Reeve 35e6dede09 Script to remove input fields 2022-03-14 12:41:41 -07:00
Mouse Reeve a2f2104a08 Create non-functional UI for editing array fields 2022-03-14 12:41:41 -07:00
Mouse Reeve 916d6a417d
Merge pull request #2018 from bookwyrm-social/locales
Adds scanner translation strings
2022-03-14 12:40:53 -07:00
Mouse Reeve 486f70c7fb Adds scanner translation strings 2022-03-14 12:31:29 -07:00
Mouse Reeve d848b950dc
Merge pull request #2017 from bookwyrm-social/forms
Moves forms into separate files
2022-03-14 12:21:42 -07:00
Mouse Reeve 19202e2cd7 Fixes name of user forms file 2022-03-14 12:12:51 -07:00
Mouse Reeve d3f723a07d Splits forms into separate files 2022-03-14 12:06:50 -07:00
Mouse Reeve 7169f7ba20 Creates forms directory 2022-03-14 11:43:58 -07:00
Mouse Reeve c0db081120
Merge pull request #2016 from bookwyrm-social/duplicate-script
Moves duplicate field script into its own file
2022-03-14 11:09:48 -07:00
Mouse Reeve bfb8fc800a Moves duplicate field script into its own file 2022-03-14 10:59:24 -07:00
Mouse Reeve e0c0bebf65
Merge pull request #2015 from bookwyrm-social/admin-view-fix
Improves user admin view
2022-03-14 09:50:31 -07:00
Mouse Reeve 6ddf1aad91
Merge pull request #2000 from Tak/edit-subjects
Allow book subjects to be edited
2022-03-14 09:46:05 -07:00
Mouse Reeve f42e863434 Updates user admin filters 2022-03-14 09:38:03 -07:00
Mouse Reeve 488d702473 Separate admin user list into tabbed lists 2022-03-14 09:27:18 -07:00
Mouse Reeve bf68b70fba Use breadcrumbs in use admin view 2022-03-14 09:10:48 -07:00
Mouse Reeve e4f94780eb Uses translated fields in admin user info 2022-03-14 09:10:42 -07:00
Corentin Feys 771fa5a00a
Merge branch 'main' into question_invite_correct 2022-03-13 23:44:20 +01:00
corentin-feys a0ae96923c fix to pass invite request pytest 2022-03-13 23:34:49 +01:00
corentin-feys 74a1697cda fix to pass register pytest 2022-03-13 23:04:14 +01:00
corentin-feys 3e9cb2acb1 Revert to stable commit
This reverts commit d542be943f.
2022-03-13 22:56:41 +01:00
Mouse Reeve 57cba4eb7a
Merge pull request #2013 from bookwyrm-social/theme-path
Manually add theme path rather than options
2022-03-13 13:30:32 -07:00
Mouse Reeve c08459cf5d Tick version number 2022-03-13 13:19:40 -07:00
Mouse Reeve 37beb5a8f4 Tick javascript cache buster 2022-03-13 13:19:02 -07:00
Mouse Reeve 3885ae789b Manually add theme path rather than options 2022-03-13 13:15:42 -07:00
Mouse Reeve 753cd36f86
Merge pull request #2012 from bookwyrm-social/catch-update-book-error
Catch update book error
2022-03-13 12:53:09 -07:00
Mouse Reeve c7efa23405 Display error message for remote failure 2022-03-13 12:38:29 -07:00
Mouse Reeve 739b394ccc Catch error when trying to update book 2022-03-13 12:31:21 -07:00
Mouse Reeve b32f3c1b7b
Merge pull request #1976 from viviicat/code-scanning
Add barcode scanning support
2022-03-13 12:26:31 -07:00
Mouse Reeve 5bd25ba740
Merge pull request #2011 from bookwyrm-social/update-locales
Updates locales
2022-03-13 12:14:42 -07:00
Mouse Reeve 2f124e00d1 Updates locales 2022-03-13 11:57:46 -07:00
Mouse Reeve a69a9a401b
Merge pull request #2010 from bookwyrm-social/themes-text
Fixes instructions on admin themes view
2022-03-13 11:47:58 -07:00
Mouse Reeve 0c87ee1d4b Fixes instructions on admin themes view 2022-03-13 11:36:31 -07:00
Mouse Reeve 9f19fb698b
Merge pull request #2009 from viviicat/sass-in-prod
add SASS_PROCESSOR_ENABLED = True
2022-03-13 11:31:24 -07:00
Orage Pika bcdee8071c fixing errors from check 2022-03-13 15:49:09 +01:00
Orage Pika c99fe2bdc3 fixing errors from checks 2022-03-13 13:37:09 +01:00
Orage Pika d2e6dfc07b fixing errors from checks 2022-03-13 13:31:38 +01:00
Orage Pika 4fb3cbfc29 fixing errors from checks 2022-03-13 13:30:37 +01:00
Orage Pika d542be943f bw-dev black and fixing things according to the warning messages of the checks. 2022-03-13 13:23:58 +01:00
OragePika, aka "FANS DON'T CARE 974c569fc1
Merge branch 'main' into question_invite_correct 2022-03-13 13:14:23 +01:00
Vivianne Langdon 306f177d55 add SASS_PROCESSOR_ENABLED = True 2022-03-12 21:12:25 -07:00
Mouse Reeve 4cfa4046a1
Merge pull request #2008 from viviicat/fish-completions
Add autocompletions for fish shell
2022-03-12 06:39:09 -08:00
Vivianne Langdon 3358c233ea remove no-up autocomplete 2022-03-12 04:38:42 -08:00
Vivianne Langdon 4530d4917a make more compact with a function 2022-03-12 04:34:03 -08:00
Vivianne Langdon 822868bf87 fish autocompletions 2022-03-12 04:34:03 -08:00
Thomas Versteeg 5d8404f797 Add merge migration 2022-03-12 11:45:09 +01:00
Thomas Versteeg 9e6dfb4706
Merge branch 'main' into partially-read-shelf 2022-03-12 10:38:56 +00:00
corentin-feys 1b4e532f90 Added invite question migration 2022-03-12 11:19:14 +01:00
corentin-feys 5dbee33185 invite_question_text resets to default question when left blank 2022-03-12 11:13:42 +01:00
corentin-feys 7337f378c0 Hide the answer column from invites when invite questions are disabled 2022-03-12 11:10:44 +01:00
Vivianne Langdon a4391f35c1 black 2022-03-11 22:31:40 -08:00
Vivianne Langdon d6767e42fc fix variable clash 2022-03-11 22:28:05 -08:00
Vivianne Langdon cf53134577 disable linting unused-argument 2022-03-11 21:19:20 -08:00
Vivianne Langdon 598a0587cf Fix issue with tabs on bottom of book page 2022-03-11 21:10:22 -08:00
Vivianne Langdon f2d7bdbf27 in progress fixes for pylint 2022-03-11 20:14:45 -08:00
Vivianne Langdon 594fa5d058 Black 2022-03-11 20:00:13 -08:00
Vivianne 9fa8caba45
Merge branch 'bookwyrm-social:main' into url-names 2022-03-11 19:55:06 -08:00
Mouse Reeve 02a93bd730
Merge pull request #2006 from bookwyrm-social/log-level
Log info, not exception, for expected errors
2022-03-11 16:05:03 -08:00
Mouse Reeve 72d6a4ce52 Log info, not exception, for expected errors 2022-03-11 14:55:54 -08:00
Vivianne Langdon 5d25da93d5 revert previously changed unit tests 2022-03-11 04:25:50 -08:00
Vivianne Langdon d9ac326c29 No more remote id with slug, just add slug in local path. 2022-03-11 04:18:52 -08:00
Mouse Reeve e0ffcddd3c
Merge pull request #2003 from bookwyrm-social/modal-button-pattern
Consistent positioning of success buttons
2022-03-10 14:29:39 -08:00
Mouse Reeve f2bf52ccb9
Merge pull request #2002 from bookwyrm-social/cw-refactor
Refactors content warning field
2022-03-10 14:29:16 -08:00
Mouse Reeve dbf925f176 Removes trailing whitespace 2022-03-10 10:52:39 -08:00
Mouse Reeve 9977b33a8d Group, list, and shelve form buttons 2022-03-10 10:49:33 -08:00
Mouse Reeve d4be0ca58b Report modal 2022-03-10 10:02:18 -08:00
Mouse Reeve 20453a9977 Delete readthrough and add cover modals 2022-03-10 09:57:55 -08:00
Mouse Reeve 8b4c9483ea Udates sync modals 2022-03-10 09:49:27 -08:00
Mouse Reeve cbcd5c7a57 Adds elided page range to editions 2022-03-10 09:49:17 -08:00
Mouse Reeve 672eee9c9c Updates add file link modal 2022-03-10 09:41:32 -08:00
Mouse Reeve d7eb118a07 Updates readthrough modal 2022-03-10 09:35:05 -08:00
Mouse Reeve 1657f28c5e Updates verification modal button positions 2022-03-10 09:30:39 -08:00
Mouse Reeve cc2b774fb5 Updates wording on content warning field 2022-03-10 09:16:50 -08:00
Mouse Reeve bcd83ee802 Fixes list notes icon 2022-03-10 09:16:44 -08:00
Mouse Reeve a922b8fd04 Uses details to show/hide content warning field 2022-03-10 09:03:24 -08:00
Mouse Reeve e2476d1ad3 Move content warning toggle out of post options block 2022-03-10 08:38:06 -08:00
OragePika, aka "FANS DON'T CARE 3868421bed
Merge branch 'main' into question_invite_correct 2022-03-10 01:42:47 +01:00
Orage Pika 0c429ee6d7 bw-dev blacked 2022-03-09 16:04:58 +01:00
Levi Bard 0c0d0b6299 Allow book subjects to be edited 2022-03-09 10:33:59 +01:00
Mouse Reeve ad1969162f
Merge pull request #1999 from bookwyrm-social/locales
Locale updates
2022-03-08 12:43:33 -08:00
Mouse Reeve a751884762 Locale updates 2022-03-08 12:12:39 -08:00
corentin-feys bb7d080f65 Replaced tabs with spaces 2022-03-07 21:20:42 +01:00
corentin-feys 35f115bc0a removed unneeded code for invite question 2022-03-07 19:42:57 +01:00
corentin-feys e1e03ebd22 removed unneded migrations 2022-03-07 19:41:24 +01:00
Orage Pika 5fbb5c655b custom questions 2022-03-07 18:49:59 +01:00
Mouse Reeve 34a4c18397
Merge branch 'main' into partially-read-shelf 2022-03-05 19:23:35 -08:00
Mouse Reeve 723ec8d461
Merge pull request #1994 from bookwyrm-social/theme-file
Adds custom compile management command
2022-03-04 17:58:46 -08:00
Mouse Reeve f26106fffd Python formatting 2022-03-04 12:42:43 -08:00
Mouse Reeve b0c0af9617 Adds custom compile management command 2022-03-04 12:40:06 -08:00
Vivianne Langdon 8838875879 Fix failure to 404 2022-03-02 04:07:13 -08:00
Vivianne Langdon 81594892ef Fix test for unit test requests 2022-03-02 03:42:29 -08:00
Vivianne Langdon 05f11e68c5 Hopefully knocking out many of the unit test fails 2022-03-02 03:11:02 -08:00
Vivianne Langdon 440e2f8806 black 2022-03-02 01:47:08 -08:00
Vivianne Langdon 2b483488aa Remove slugs from shelf as their id has text in it already 2022-03-02 01:37:58 -08:00
Vivianne Langdon 846963ad18 Fix accidental change to post 2022-03-02 01:16:30 -08:00
Vivianne Langdon d8181d6d66 Redirect to correct url with slug 2022-03-02 01:12:32 -08:00
Vivianne Langdon ebf463fc91 Generation of slugs and new urls to handle slugs
- TODO: redirect to correct slug if not found.
2022-03-02 00:21:23 -08:00
Vivianne 3ee3e9a13c
Merge branch 'main' into code-scanning 2022-03-01 18:33:40 -08:00
Mouse Reeve 0751a56474
Merge pull request #1990 from bookwyrm-social/themes-fix
Temporary fix for broken themes
2022-03-01 14:52:47 -08:00
Mouse Reeve a99d482167 Temporary fix 2022-03-01 14:38:50 -08:00
Mouse Reeve f7c6c70c5e Ticks version 2022-03-01 12:15:56 -08:00
Mouse Reeve 12ad88ac29
Merge pull request #1975 from bookwyrm-social/themes
Themes
2022-03-01 12:03:22 -08:00
Mouse Reeve 886448efc4
Merge pull request #1988 from bookwyrm-social/superlives
Keeps "superlatives" on about page local
2022-03-01 12:03:12 -08:00
Mouse Reeve 04ab584082 Update locales 2022-03-01 11:49:58 -08:00
Mouse Reeve 07daa24a72 Merge branch 'main' into themes 2022-03-01 11:46:02 -08:00
Mouse Reeve 89c8aa83f4 Tweaks preferences wording 2022-03-01 11:44:39 -08:00
Mouse Reeve 38535f811c Python formatting 2022-03-01 11:39:08 -08:00
Mouse Reeve 41ea7db8b6 Removes hardcoded white in announcements 2022-03-01 11:06:15 -08:00
Mouse Reeve 55f1ce12cf Second attempt at fixing tests using context processors 2022-03-01 11:05:47 -08:00
Mouse Reeve 4cdbdd8d0b
Merge pull request #1977 from viviicat/dark-theme
Dark theme
2022-03-01 11:00:05 -08:00
Mouse Reeve 9422a07414 Safer query for request user for tests 2022-03-01 10:36:19 -08:00
Mouse Reeve 5d7e6b872a Fixes localizing query for superlatives 2022-03-01 10:34:17 -08:00
Mouse Reeve d1d743281a Cleans up display of superlatives on about page 2022-03-01 10:28:51 -08:00
Mouse Reeve c7c90f9e9b Removes test print statement 2022-03-01 10:09:53 -08:00
Mouse Reeve 39fb402456
Merge pull request #1987 from viviicat/fix-reply-exception
Fix for TypeError/no focus when clicking on a reply
2022-03-01 09:58:31 -08:00
Mouse Reeve f4dc07b6b9 Select theme in context processors 2022-03-01 09:53:02 -08:00
Vivianne Langdon 8e9bacc527 Fix red for <code> being too harsh 2022-02-28 23:31:57 -08:00
Vivianne Langdon b4222bead4 Remove uuid for status reply panel
- The focus target did not include this uuid, so was throwing `Uncaught TypeError: node is null` when clicking on Reply button.
- I wasn't able to figure out how to share the uuid between blocks but it doesn't seem like the uuid is really needed -- the same block has other ids that do not have the uuid in them.
2022-02-28 23:01:33 -08:00
Vivianne Langdon c0fed31fb0 eslint 2022-02-28 21:28:33 -08:00
Vivianne Langdon 40bb9112fd .prettierignore to vendor 2022-02-28 21:23:44 -08:00
Vivianne Langdon 62b4133e58 Move quagga to vendor. 2022-02-28 21:22:49 -08:00
Vivianne 8c92869fc0
Merge branch 'main' into code-scanning 2022-02-28 21:17:32 -08:00
Mouse Reeve 2c8fa5cd9b
Merge branch 'themes' into dark-theme 2022-02-28 13:32:37 -08:00
Mouse Reeve a6883b5b87 Adds merge migration 2022-02-28 13:30:02 -08:00
Mouse Reeve 043fd54d70
Merge branch 'main' into themes 2022-02-28 13:27:05 -08:00
Mouse Reeve e1ea847441
Merge pull request #1986 from bookwyrm-social/instance-refresh
Instance refresh
2022-02-28 13:26:22 -08:00
Mouse Reeve 142ecdf6aa
Merge pull request #1984 from bookwyrm-social/hide-follows
Option for users to hide their followers/following lists
2022-02-28 13:13:40 -08:00
Mouse Reeve 9efd67f6bf
Merge pull request #1985 from Strubbl/patch-1
Update README.md
2022-02-28 13:13:15 -08:00
Mouse Reeve 81cfcff939 Reload instance data 2022-02-28 13:11:01 -08:00
Mouse Reeve c91b08303b More breadcrumbs 2022-02-28 12:31:28 -08:00
Mouse Reeve f4aa202292 Adds counts of blocked and federated instances 2022-02-28 12:27:54 -08:00
Mouse Reeve 991461221d Adds breadcrumbs instead of "back" link 2022-02-28 12:24:45 -08:00
Strubbl 1888e8c8ed
Update README.md
fix link to instances
2022-02-28 21:23:00 +01:00
Mouse Reeve 00d0d9d5de Avoid whitespace when adding instance 2022-02-28 12:20:04 -08:00
Mouse Reeve 3dbbe0089c Show if user follows you 2022-02-28 12:07:06 -08:00
Mouse Reeve ec93d1812a Block access to follow views 2022-02-28 12:04:47 -08:00
Thomas Versteeg 1e3f9246d6 Produce a proper status 2022-02-28 20:56:59 +01:00
Mouse Reeve 5837c37a32 Hide followers info slug 2022-02-28 11:55:54 -08:00
Mouse Reeve e90cb52f23 Add option to hide follows 2022-02-28 11:48:49 -08:00
Thomas Versteeg 539775f370 Merge remote-tracking branch 'upstream/main' into partially-read-shelf 2022-02-28 20:44:55 +01:00
Mouse Reeve 6c17aa7630
Merge pull request #1983 from bookwyrm-social/shelf-name-translation
Shelf name translation
2022-02-28 11:28:53 -08:00
Mouse Reeve 5cdcac0682
Merge pull request #1981 from bookwyrm-social/list-duplicate-books
Show meaningful message when you try to add a duplicate book to a list
2022-02-28 11:21:18 -08:00
Mouse Reeve b7111589c3
Merge pull request #1982 from bookwyrm-social/deleted-user-reviews
Remove reviews from deleted users
2022-02-28 11:20:44 -08:00
Mouse Reeve 7d6032e110 Fixes calls to filter 2022-02-28 11:18:03 -08:00
Mouse Reeve ffb4098cfb Fixes translation of "remove from shelf" string 2022-02-28 11:07:12 -08:00
Mouse Reeve 0f5fd6be15 Move translations to filter 2022-02-28 11:05:12 -08:00
Mouse Reeve 374dd24fa8 Remove reviews from deleted users 2022-02-28 10:47:08 -08:00
Mouse Reeve 142cc5437a Move sorting to separate function 2022-02-28 10:41:40 -08:00
Mouse Reeve 99fc3aaf25 Avoid showing success and failure 2022-02-28 10:31:58 -08:00
Mouse Reeve b2b3ba653e Refactors how success/failure messages how on list page 2022-02-28 10:29:58 -08:00
Mouse Reeve 202696f913 Don't show lists a book is already on in add form 2022-02-28 10:03:24 -08:00
Mouse Reeve c82042f506 Delete themes 2022-02-28 09:55:23 -08:00
Mouse Reeve 106ef2e3a4 Fixes reference to theme in layout 2022-02-28 09:46:05 -08:00
Mouse Reeve 295d9c42d7 Adds theme to user settings form 2022-02-28 09:45:34 -08:00
Mouse Reeve a00ee8a706 Adds link to set instance-wide theme 2022-02-28 09:43:31 -08:00
Mouse Reeve f54d4863fe Updates .gitignore for themes 2022-02-28 09:37:51 -08:00
Mouse Reeve 2d516812b4 Fixes icons by moving import to theme 2022-02-28 09:34:54 -08:00
Mouse Reeve f5fb5ae045 Removes instance config file
I'd be happy to re-add this if it's useful, but I think it's confusing
to have in addition to themes
2022-02-28 09:34:30 -08:00
Mouse Reeve 4d3e709b2a
Update layout.html 2022-02-28 09:23:03 -08:00
Mouse Reeve 3283302093
Merge branch 'themes' into dark-theme 2022-02-27 20:21:17 -08:00
Vivianne Langdon 3a9ff2c2ea Refer to canvas by type
- Fixes stylelint without adding an exclusion
2022-02-27 14:08:11 -08:00
Vivianne Langdon c0380cca5a stylelint 2022-02-27 14:04:30 -08:00
Vivianne Langdon 1d4539c4c0 Don't pretty the min.js file 2022-02-27 14:03:45 -08:00
Vivianne Langdon fbe7e860e8 Prettier 2022-02-27 14:01:25 -08:00
Mouse Reeve 8259d16ee9 Check available themes in form 2022-02-27 11:20:11 -08:00
Mouse Reeve 005b69177c
Merge branch 'themes' into dark-theme 2022-02-27 10:54:15 -08:00
Mouse Reeve c8d3222c33
Rename dark.scss to bookwyrm-dark.scss 2022-02-27 10:52:07 -08:00
Mouse Reeve fd0f739418
Rename light.scss to bookwyrm-light.scss 2022-02-27 10:51:49 -08:00
Mouse Reeve 8850b68b52 Show theme options 2022-02-27 10:48:33 -08:00
Mouse Reeve cc015536fa Adds theme instructions 2022-02-27 10:12:47 -08:00
Mouse Reeve 3dfbb3272e Theme selector 2022-02-27 10:00:50 -08:00
Mouse Reeve 6e96c1eee7 Avoid linter error 2022-02-27 08:09:17 -08:00
Vivianne Langdon e4d7dd7ee4 Fix progress bar 2022-02-27 05:29:33 -08:00
Vivianne Langdon 40319302b7 Initial theme 2022-02-27 05:20:29 -08:00
Vivianne Langdon 789626a9da Stray line 2022-02-27 00:39:45 -08:00
Vivianne Langdon f5c66b5b4a Adjust layout more
Ensure camera select box is never hidden.
2022-02-27 00:33:54 -08:00
Vivianne Langdon 43f62ef5d7 d'oh, fix event leak 2022-02-27 00:18:38 -08:00
Vivianne Langdon 9f67a74340 Show grant access dialog every time we initialize 2022-02-27 00:04:25 -08:00
Vivianne Langdon e71a5e3bdf Add barcode icon and use other icons
Minor formatting and messaging tweaks
2022-02-27 00:00:22 -08:00
Vivianne Langdon f4d5b7b4d2 Adjusted message 2022-02-26 23:28:52 -08:00
Vivianne Langdon 9b0874f889 Fix barcode button 2022-02-26 23:28:13 -08:00
Vivianne Langdon cdddf73e29 Improve layout for some camera types 2022-02-26 23:22:44 -08:00
Vivianne Langdon 464050deaa Implement switching cameras
Also, use session storage to remember last selected camera deviceId, if any
2022-02-26 21:32:01 -08:00
Vivianne Langdon fee6ffcbd8 Fix formatting in chrome
Was using experimental selector, forget about it.
Also reduce jumping around of video size
2022-02-26 21:29:18 -08:00
Vivianne Langdon 8d0e549480 Improve visuals and quality of scanning 2022-02-26 20:19:26 -08:00
Vivianne Langdon 649ffe571a Fix typos with searching 2022-02-26 18:29:38 -08:00
Vivianne Langdon fcc8b6aaab Move to sass 2022-02-26 18:19:12 -08:00
Vivianne Langdon 340b306d2e Fix path 2022-02-26 18:08:07 -08:00
Vivianne Langdon 48c8166e58 Merge branch 'main' into code-scanning 2022-02-26 17:54:33 -08:00
Mouse Reeve 43269429ac Use selected theme 2022-02-26 13:40:06 -08:00
Mouse Reeve e15193e100 Adds themes 2022-02-26 12:44:20 -08:00
Mouse Reeve 6b5bebdf78 Cleans up scheduler form 2022-02-26 10:45:43 -08:00
Mouse Reeve 0870eccad9 Adds unscheduler 2022-02-26 10:24:23 -08:00
Mouse Reeve 2a436800c4 Schedules automod task 2022-02-26 10:14:47 -08:00
Mouse Reeve 95e9119817 Adds django celery beat 2022-02-26 08:44:19 -08:00
Mouse Reeve a5571c65bc
Update 0134_alter_stopped_reading.py 2022-02-25 18:25:41 -08:00
Mouse Reeve b511928400
Create 0134_alter_stopped_reading.py 2022-02-25 18:08:30 -08:00
Mouse Reeve eea7d9d4e5 Retain author across saves 2022-02-25 17:57:18 -08:00
Mouse Reeve 29a6d74ff2 Python formatting 2022-02-25 17:23:13 -08:00
Mouse Reeve b001c31f97 Save author along with added edition 2022-02-25 16:54:03 -08:00
Mouse Reeve c67f92af46 Add editions view 2022-02-25 16:40:34 -08:00
Mouse Reeve 1d99e455e8 Adds link to add edition to editions page 2022-02-25 16:40:21 -08:00
Thomas Versteeg 8deee2220e Fix stopped reading status model in non-javascript environment 2022-02-25 22:39:42 +01:00
Mouse Reeve ab1c7c6d0a
Merge pull request #1971 from bookwyrm-social/scroll-bug
Removes scrollIntoView script behavior for tabs
2022-02-25 13:21:20 -08:00
Thomas Versteeg 5eb113af6b Create merge migration 2022-02-25 22:03:49 +01:00
Thomas Versteeg e9dfa42e11
Merge branch 'main' into partially-read-shelf 2022-02-25 21:00:29 +00:00
Mouse Reeve 02808f88e6 eslint fixes 2022-02-25 13:00:23 -08:00
Mouse Reeve 65bd3945e7 Prettify tabs file 2022-02-25 12:52:35 -08:00
Mouse Reeve cec7625e1e Moves tabs script to main scripts directory
It's our own custom script at this point
2022-02-25 12:47:46 -08:00
Mouse Reeve 5d4efd457a Removes scrollIntoView script behavior for tabs 2022-02-25 12:39:44 -08:00
Mouse Reeve ac36aa9327
Merge pull request #1969 from bookwyrm-social/author-book-sort
Sort author books by rating
2022-02-25 12:30:06 -08:00
Mouse Reeve ad1d768be9
Merge pull request #1970 from bookwyrm-social/locales
Updates locales
2022-02-25 12:29:54 -08:00
Mouse Reeve ee8c1659ab Updates locales 2022-02-25 12:13:20 -08:00
Mouse Reeve 8ca2b55e7e Sort author books by rating 2022-02-25 12:04:21 -08:00
Mouse Reeve 6d1d62cf2f View for starting to edit a book with existing data 2022-02-25 11:50:25 -08:00
Mouse Reeve f1f7b21d43
Merge pull request #1968 from bookwyrm-social/automod
Automod
2022-02-24 17:51:40 -08:00
Mouse Reeve 689be8c94b Only scan local data 2022-02-24 17:42:28 -08:00
Mouse Reeve 84ef214ca1 Valid template markup 2022-02-24 17:36:49 -08:00
Mouse Reeve eb8b9fdaed Fixes bugs in model task 2022-02-24 17:33:22 -08:00
Mouse Reeve 1aa6b99d1f Adds tests 2022-02-24 17:33:05 -08:00
Mouse Reeve f446828175 Fixes template typo 2022-02-24 14:39:09 -08:00
Mouse Reeve 84b9a19339 Expands scanned fields 2022-02-24 13:29:17 -08:00
Mouse Reeve 93f82fbf18 Adds notifications 2022-02-24 13:20:18 -08:00
Mouse Reeve ad41f19dc5 Updates report model 2022-02-24 13:00:41 -08:00
Mouse Reeve 3ce8b3390e Adds task 2022-02-24 12:16:18 -08:00
Mouse Reeve e837da37db Adds task 2022-02-24 12:15:08 -08:00
Mouse Reeve 12f67dc0ce Adds automod view 2022-02-24 11:18:43 -08:00
Mouse Reeve c8b4d5ecf1 Adds model for creating automated moderation flags 2022-02-24 09:58:37 -08:00
Mouse Reeve 20df7cbdd6
Merge pull request #1966 from bookwyrm-social/missing-tag
Adds missing tag
2022-02-21 09:24:19 -08:00
Mouse Reeve 2457315ed8 Adds missing tag 2022-02-21 08:44:04 -08:00
Mouse Reeve 70601612f8
Removes unused dependency (#1965) 2022-02-20 18:42:14 -08:00
Mouse Reeve 4672294d7c
Cache fix (#1961) 2022-02-19 16:34:48 -08:00
Mouse Reeve c77e5a1a90
Split css (#1959)
Divides the css into sub-files and normalizes how colors are defined.

Co-authored-by: Joachim <joachim.robert@protonmail.com>
2022-02-19 16:34:17 -08:00
Mouse Reeve 6daaffeaa7
Compiles css framework from sass (#1956)
* Compiles css framework from sass

* Adds watch commands

* Copies existing css to sass file

* Moves sass out of static path

* Removes global linter

I wasn't sure how to customize this, and it's not providing a lot of
additional value on top of the domain-specific linters

* Reverts invalid change to dockerfile

* Changes stylelint path

* Remove unused bulma files

* Properly minifies generated css

* Fixes regression in thread display

* rgba function only works with percents for whatever reason

* Hush stylelint

* Removes trailing zeros

* Compile sass in Django

Co-authored-by: Joachim <joachim.robert@protonmail.com>

* Python formatting

* Updates linter

* Updates commands

* Adds css-config file

Co-authored-by: Joachim <joachim.robert@protonmail.com>

* Stylelint fix

* Removes unused compiled bulma files

Co-authored-by: Joachim <joachim.robert@protonmail.com>
2022-02-19 15:29:47 -08:00
Mouse Reeve c5f8715c59
Merge pull request #1957 from bookwyrm-social/env-errors
Removes inline comments that are causing errors
2022-02-19 08:11:29 -08:00
Mouse Reeve 57fd675857 Ticks javscript cache buster 2022-02-19 07:52:05 -08:00
Mouse Reeve 275f3cbedb Removes inline comments that are causing erros 2022-02-18 21:07:39 -08:00
Mouse Reeve cd65cfafce
Merge pull request #1955 from bookwyrm-social/dev-tools-tweaks
Updates dev tools
2022-02-18 09:21:45 -08:00
Mouse Reeve 7d68c23ce5 Updates dev tools 2022-02-18 08:48:44 -08:00
Mouse Reeve 1d44c2bf1f
Merge pull request #1954 from bookwyrm-social/locales
Updates locales for new view
2022-02-17 21:14:28 -08:00
Mouse Reeve 3d2ea40ad4 Updates locales for new view 2022-02-17 20:24:03 -08:00
Mouse Reeve 731ab88604
Merge pull request #1953 from bookwyrm-social/cache-translation
Fixes cache translation
2022-02-17 19:13:35 -08:00
Mouse Reeve 98736925f7 Fixes cache translation 2022-02-17 18:59:35 -08:00
Mouse Reeve 9eb798e932
Merge pull request #1952 from bookwyrm-social/settings
Fixes admin settings view
2022-02-17 18:10:17 -08:00
Mouse Reeve edf3b61602 Show error or success states 2022-02-17 18:00:19 -08:00
Mouse Reeve 1aac665094 Fixes settings form 2022-02-17 17:50:57 -08:00
Mouse Reeve 64a83b38b5
Merge pull request #1951 from bookwyrm-social/accessibility-fixes
Accessibility fixes
2022-02-17 17:21:17 -08:00
Mouse Reeve 1b63c19a9c Fixes error in previous PR 2022-02-17 17:10:12 -08:00
Mouse Reeve 5d098b3c10 Removes duplicate selector 2022-02-17 17:01:21 -08:00
Mouse Reeve 31a61713d9 Runs stylelint fix 2022-02-17 16:53:53 -08:00
Mouse Reeve d510299ae4 Reverts change to shelve button dropdown 2022-02-17 16:51:54 -08:00
Mouse Reeve 561eaeaf54
Merge pull request #1935 from joachimesque/accessibility/fixes
[Accessibility] Fixes
2022-02-17 16:50:32 -08:00
Mouse Reeve 98cad7c51a
Merge pull request #1950 from bookwyrm-social/release-notice
Adds notice to admin about available updates
2022-02-17 16:37:22 -08:00
Mouse Reeve 3869f0cc1a Python formatting 2022-02-17 16:28:55 -08:00
Mouse Reeve 9132c054f2 Adds notice to admin about available updates 2022-02-17 16:23:15 -08:00
Mouse Reeve ebf905e20b
Merge pull request #1949 from bookwyrm-social/admin-setup
Flow for creating the admin account on a new instance
2022-02-17 16:04:30 -08:00
Mouse Reeve 92f3357977 Anchor link to dev chat 2022-02-17 15:53:58 -08:00
Mouse Reeve 31d362d715 Adds setup views tests 2022-02-17 14:55:48 -08:00
Mouse Reeve 3b0fc9785e Removes unused file 2022-02-17 13:31:38 -08:00
Mouse Reeve 08e378a539 Fixes register tests 2022-02-17 13:27:44 -08:00
Mouse Reeve be479fe4cb Adds warnings about misconfigurations 2022-02-17 13:22:33 -08:00
Mouse Reeve f6e2ec02aa Adds overview page to setup 2022-02-17 13:02:07 -08:00
Mouse Reeve 1b9688832a Don't use my name as the default flower user 2022-02-17 12:18:35 -08:00
Mouse Reeve bf75dff338 Contextualize admin code command output 2022-02-17 11:53:29 -08:00
Mouse Reeve 637f7c9cb9 Initialize site settings in install mode 2022-02-17 11:51:48 -08:00
Mouse Reeve 679b55d9ad Updates bw-dev and adds setup command 2022-02-17 11:50:16 -08:00
Mouse Reeve 63558bb75e Python formatting 2022-02-17 11:31:52 -08:00
Mouse Reeve 54b0bf02b5
Merge pull request #1948 from bookwyrm-social/locales
Updates locales
2022-02-17 11:29:36 -08:00
Mouse Reeve 2883c42534 Disable registration by default 2022-02-17 11:27:05 -08:00
Mouse Reeve 23d0d3e2b7 Register admin user 2022-02-17 11:25:11 -08:00
Mouse Reeve ed536e6b41 Adds command to get admin code 2022-02-17 10:59:28 -08:00
Mouse Reeve b4e0749f73 Disallow registration in install mode and adds redirects 2022-02-17 10:52:12 -08:00
Mouse Reeve 8e3c39d319 Adds admin key field to admin user setup form 2022-02-17 10:39:08 -08:00
Mouse Reeve 4eb4efee9d Create admin account markup 2022-02-17 10:22:44 -08:00
Mouse Reeve c31ec7dbd5 Adds setup view 2022-02-17 10:03:02 -08:00
Mouse Reeve e9397eaedd Adds setup templates 2022-02-17 10:02:27 -08:00
Mouse Reeve 1a8f4a916e
Merge pull request #1891 from bookwyrm-social/openlibrary-author-fields
Openlibrary author fields
2022-02-17 09:00:04 -08:00
Mouse Reeve 0da759bfd5 Updates locales 2022-02-17 08:59:05 -08:00
Mouse Reeve c04d2d285b Python formatting 2022-02-17 08:42:12 -08:00
Thomas Versteeg d67dac4519
Merge branch 'main' into partially-read-shelf 2022-02-17 16:34:10 +00:00
Mouse Reeve 88999168bc
Merge pull request #1946 from bookwyrm-social/use-https-defualt
Sets default USE_HTTPS value based on debug
2022-02-17 08:30:49 -08:00
Mouse Reeve a2c4dd4f9f Updates migration and database fields 2022-02-17 08:25:01 -08:00
Mouse Reeve 39691bed3a Merge branch 'main' into openlibrary-author-fields 2022-02-16 18:06:04 -08:00
Mouse Reeve 839d91e4d4
Merge pull request #1941 from bookwyrm-social/dev-tools
Adds dev tools docker image
2022-02-16 18:05:22 -08:00
Mouse Reeve cfc1302b23 Fixes spacing 2022-02-16 17:53:03 -08:00
Mouse Reeve 954e914638 Linebreaks? who knows. 2022-02-16 17:50:30 -08:00
Mouse Reeve 7afb5bc493 Stylelint needs libraries 2022-02-16 17:47:58 -08:00
Mouse Reeve 862b6f49bd Correct npm package names 2022-02-16 17:45:04 -08:00
Mouse Reeve 4b2ac4fa10 Re-adds yarn.lock 2022-02-16 17:40:59 -08:00
Mouse Reeve e23e108e3a Merge branch 'main' into dev-tools 2022-02-16 17:39:03 -08:00
Mouse Reeve c054ccc84b Try ci with yarn instead of npx 2022-02-16 17:36:44 -08:00
Mouse Reeve 60b2453d4d Fixes bw-dev stylelint command 2022-02-16 17:34:14 -08:00
Mouse Reeve 9038afd7f1 Changes npm install 2022-02-16 13:16:05 -08:00
Mouse Reeve c1853e03ab Updates stylelint command 2022-02-16 13:14:48 -08:00
Mouse Reeve 6f90c80494 Gets stylelint command working 2022-02-16 13:13:11 -08:00
Mouse Reeve 1412fa507c Gets prettier command working 2022-02-16 12:54:03 -08:00
Mouse Reeve d593a3a503 Sets default USE_HTTPS value based on debug 2022-02-15 13:15:04 -08:00
Mouse Reeve 55177990e3 Adds stylelint-config-recommended 2022-02-15 12:47:15 -08:00
Mouse Reeve c19b9d7575 Updates stylelintrc filename and removes yarn 2022-02-15 12:46:28 -08:00
Mouse Reeve f28d60b94f Tries adding packages 2022-02-15 12:41:22 -08:00
Mouse Reeve 450d4cdace Try using npx instead of yarn for stylelint 2022-02-15 12:39:14 -08:00
Mouse Reeve 7ff1ad7c83 Try again with yarn added as separate step 2022-02-15 12:37:28 -08:00
Mouse Reeve 4428c0f14d Remoes yarn line 2022-02-15 12:34:28 -08:00
Mouse Reeve 09978fc195 Tries npm install with yarn 2022-02-15 12:29:59 -08:00
Mouse Reeve 714bb081ea Updates workflows 2022-02-15 12:25:35 -08:00
Mouse Reeve a07239c6a9
Merge pull request #1933 from bookwyrm-social/announcements
Cleans up code for announcements
2022-02-15 10:40:56 -08:00
Mouse Reeve 6fa29a6293 Fixes tests 2022-02-15 10:32:04 -08:00
Vivianne Langdon 82cb170a91 Switch version of quagga to new fork quagga2 2022-02-15 02:39:16 -08:00
Vivianne Langdon 1e04385f0c Worked more on visuals of modal
Need to finish camera selection mode.
2022-02-15 02:38:57 -08:00
Thomas Versteeg d63e5ab2d2 Fix tests 2022-02-14 18:12:08 +01:00
Willi Hohenstein 03ff8c248d Added input control and better char replacement 2022-02-14 17:38:45 +01:00
Vivianne Langdon 5ae4eb9b8f Super messy initial working version. To clean up. 2022-02-14 02:56:05 -08:00
Willi Hohenstein 0b02287378 add docstring 2022-02-13 20:49:44 +01:00
Willi Hohenstein 526a1c6ef4 removed unnecessary code 2022-02-13 20:31:06 +01:00
Willi Hohenstein 54eeeb5798 fix style to pass tests 2022-02-13 20:30:11 +01:00
Willi Hohenstein 3c05cecb50 function moved 2022-02-13 19:07:25 +01:00
Willi Hohenstein a4b08d7213 add test with valid isbn10 2022-02-13 17:10:32 +01:00
Willi Hohenstein 5801ef011f add isbn check 2022-02-13 09:35:15 +01:00
Willi Hohenstein 27c26b4d16 add test for dashed ISBN 2022-02-13 09:34:28 +01:00
Mouse Reeve b601ac6f91 Adds dev tools docker image 2022-02-12 14:06:18 -08:00
Mouse Reeve 1a2c85a327
Merge pull request #1938 from willhoh/main
Change cover class
2022-02-12 11:03:32 -08:00
Mouse Reeve 5df8bf03e6 Fixes black versioning error 2022-02-12 11:00:24 -08:00
Mouse Reeve 7fdf07c6ec Updates tests 2022-02-12 10:56:55 -08:00
Thomas Versteeg c88b34814f Rename 'Partially Read' to 'Stopped Reading' 2022-02-12 19:49:54 +01:00
Willi Hohenstein 164e0686b9 add class for correct display 2022-02-12 19:35:44 +01:00
Mouse Reeve 9827cef9a9 Python formatting 2022-02-12 10:34:16 -08:00
Mouse Reeve 1761db5444
Merge pull request #1920 from bookwyrm-social/branch-convergence
Moves towards single branch setup
2022-02-12 10:31:55 -08:00
Mouse Reeve 72818d4ab2
Merge pull request #1939 from bookwyrm-social/list-bug
Fixes display name of list contributor comments
2022-02-12 10:29:41 -08:00
Mouse Reeve a2d9bf50c5 Fixes display name of list contributor comments 2022-02-12 10:18:14 -08:00
Mouse Reeve df0467a662
Merge pull request #1930 from bookwyrm-social/dependabot/pip/django-3.2.12
Bump django from 3.2.11 to 3.2.12
2022-02-12 10:10:38 -08:00
Mouse Reeve 6bf6b118bf
Merge pull request #1937 from bookwyrm-social/stylelint-prettier
Adds stylelint fix to bw-dev
2022-02-12 09:58:26 -08:00
Mouse Reeve d49e9b4dcd Updates packages 2022-02-12 09:41:18 -08:00
Mouse Reeve 30ad3bba0b Suggest stylelint --fix in CI and add to bw-dev 2022-02-12 09:00:38 -08:00
Willi Hohenstein 67ea18c840 Changed cover class for proper image size in mobile 2022-02-12 17:58:36 +01:00
Joachim c33cf60624 aria-hidden elements do not contain focusable elements
https://dequeuniversity.com/rules/axe/4.3/aria-hidden-focus
2022-02-12 16:33:16 +01:00
Joachim 7877524116 ARIA button, link, and menuitem must have an accessible name
https://dequeuniversity.com/rules/axe/4.3/aria-command-name

In this case, the menuitem wasn't displayed (because the div was hidden). I prefer not to include the menuitem in that situation.
2022-02-12 16:25:40 +01:00
Joachim f742cc023b ARIA attributes must conform to valid values
https://dequeuniversity.com/rules/axe/4.3/aria-valid-attr-value
2022-02-12 16:18:56 +01:00
Joachim b27b6a5980 Certain ARIA roles must contain particular children
https://dequeuniversity.com/rules/axe/4.3/aria-required-children

In order to make this work, I had to translate Bulma's style so it doesn't use `ul` and `li` anymore.

The JS code had to be adapted, I also changed `button` to `tab` (seemed like a more relevant name) and added a `scrollIntoView()` on load the active tab is always visible.
2022-02-12 16:14:35 +01:00
Joachim bbb89605a5 Page must have one main landmark
https://dequeuniversity.com/rules/axe/4.3/landmark-one-main
2022-02-12 16:10:40 +01:00
Willi Hohenstein 6cb480d111 Merge branch 'main' of github.com:willhoh/bookwyrm 2022-02-12 15:36:30 +01:00
Thomas Versteeg bc89dd7041 Change shelf Finished label
When the shelf is read the label is 'Finished', otherwise it's 'Until'.
2022-02-12 11:19:00 +01:00
Mouse Reeve 89de03bffe Adds breadcrumbs 2022-02-11 14:58:40 -05:00
Mouse Reeve b95f0ed287 Use color in announcement 2022-02-11 14:43:37 -05:00
Mouse Reeve 01b52f023a Adds edit announcement view 2022-02-11 14:42:47 -05:00
Mouse Reeve cfa91e2570 Adds color options to announcements 2022-02-11 14:00:01 -05:00
Mouse Reeve ee23aba994 Use details and summary for announcement panel 2022-02-11 13:50:55 -05:00
Mouse Reeve 62741a5d2e Allow html in announcement header 2022-02-11 13:36:08 -05:00
Mouse Reeve 059fd84d06 Adds delete button to announcements list view
It's handy to have it there
2022-02-11 13:33:42 -05:00
Thomas Versteeg 2b27889457 Add 'Partially Read' shelf 2022-02-11 14:33:46 +01:00
dependabot[bot] 046f516091
Bump django from 3.2.11 to 3.2.12
Bumps [django](https://github.com/django/django) from 3.2.11 to 3.2.12.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.11...3.2.12)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 13:02:16 +00:00
Mouse Reeve 542957364c
Merge pull request #1929 from bookwyrm-social/link-federation
Use correct model type for federated links
2022-02-09 09:30:26 -08:00
Mouse Reeve bd846bba34
Merge pull request #1927 from bookwyrm-social/update-command
Refresh web and celery in update command
2022-02-09 09:25:15 -08:00
Mouse Reeve c06817e9ff Python formatting 2022-02-09 12:23:01 -05:00
Mouse Reeve 6323b0e700 Use correct model type for federated links 2022-02-09 12:20:11 -05:00
Mouse Reeve e9e4f70ae4 Refresh web and celery in update command 2022-02-08 09:17:42 -05:00
Mouse Reeve 74fd13fb22 Consistent ordering of items in docker-compose file 2022-02-06 06:37:03 -08:00
Mouse Reeve 4b88ea142f
Merge pull request #1922 from bookwyrm-social/version
Tick version number
2022-02-04 20:21:49 -08:00
Mouse Reeve 73b611d68d Tick version number 2022-02-04 20:12:26 -08:00
Mouse Reeve d65a80d9ea
Merge pull request #1921 from bookwyrm-social/author-page-query
Fixes author page query
2022-02-04 19:51:24 -08:00
Mouse Reeve a73960a0da Python formatting 2022-02-04 19:44:03 -08:00
Mouse Reeve 49ceb2a978 Fixes warning in author view tests 2022-02-04 19:41:21 -08:00
Mouse Reeve a9a6fd1242 Adds test for author page bug 2022-02-04 19:34:37 -08:00
Mouse Reeve 28a8edfdc4 Fixes author page query 2022-02-04 19:06:47 -08:00
Mouse Reeve bc7aa91b97 Fixes pylint complaints 2022-02-04 18:50:57 -08:00
Mouse Reeve 28fe0b0bc6
Merge pull request #1919 from bookwyrm-social/locales
Updates locales
2022-02-04 18:37:05 -08:00
Mouse Reeve 7811a9920e Copy config from prod branch to main 2022-02-04 18:36:12 -08:00
Mouse Reeve d8c3699adc Updates locales 2022-02-04 18:21:48 -08:00
Mouse Reeve 0601f68685
Merge pull request #1918 from bookwyrm-social/ports
Don't expose unnecessary ports
2022-02-04 18:12:05 -08:00
Mouse Reeve ea035b9fbe Don't expose unnecessary ports 2022-02-04 17:58:29 -08:00
Mouse Reeve 70bd6b9a65
Merge pull request #1917 from bookwyrm-social/list-page-error
Fixes errors in how lists with notes display
2022-02-04 15:44:49 -08:00
Mouse Reeve 18768a23f3 Fixes test 2022-02-04 15:30:58 -08:00
Mouse Reeve 0c3b6e6938
Merge pull request #1900 from willhoh/main
Added check for bocked or pending domains. Fixes #1850
2022-02-04 12:11:41 -08:00
Mouse Reeve 547d246375 Fixes 500 error 2022-02-04 12:09:20 -08:00
Mouse Reeve 0683ce1c33 Proper markdown formatting 2022-02-04 12:07:26 -08:00
Mouse Reeve fefb7e582a Fixes list note display 2022-02-04 12:02:10 -08:00
Mouse Reeve 719df5621c Unit test to catch error on list page 2022-02-04 11:58:03 -08:00
Mouse Reeve 82aacf8f2a
Update forms.py 2022-02-04 11:47:18 -08:00
Mouse Reeve e80a4c16f0
Merge pull request #1915 from bookwyrm-social/url-validation
Adds some simple url validation
2022-02-04 08:45:43 -08:00
Willi Hohenstein 495af09c4c
Merge branch 'bookwyrm-social:main' into main 2022-02-04 14:11:50 +01:00
Willi Hohenstein a3e2cd77a1 Merge branch 'main' of github.com:bookwyrm-social/bookwyrm 2022-02-04 14:09:15 +01:00
Mouse Reeve da8e07057c
Merge pull request #1916 from bookwyrm-social/user-view
Fixes duplicted shelves on user view
2022-02-03 19:31:49 -08:00
Mouse Reeve 7c0d51ed14 Fixes duplicted shelves on user view 2022-02-03 18:59:08 -08:00
Mouse Reeve 3e635f497e Adds some simple url validation 2022-02-03 15:11:01 -08:00
Willi Hohenstein 58fb9ba0d4
Merge branch 'bookwyrm-social:main' into main 2022-02-03 23:55:17 +01:00
Mouse Reeve ebc3f14f22
Merge pull request #1914 from bookwyrm-social/static-close-buttons
Show cancel buttons on modals in static mode
2022-02-03 14:08:36 -08:00
Mouse Reeve f545184c5b
Merge pull request #1913 from bookwyrm-social/import-ui-fixes
Fixes links on import page
2022-02-03 14:01:28 -08:00
Mouse Reeve 9013b1417a Show cancel buttons on modals in static mode 2022-02-03 13:59:53 -08:00
Mouse Reeve 3b12af63b6 Fixes links on import page 2022-02-03 13:49:33 -08:00
Mouse Reeve 582b84ecaa
Merge pull request #1911 from bookwyrm-social/more-tests
Activitystreams tests
2022-02-03 13:33:15 -08:00
Mouse Reeve 8518b4f877
Merge pull request #1912 from bookwyrm-social/sanitize-tags
Adds allowlist for html attrs
2022-02-03 13:29:40 -08:00
Mouse Reeve 85aad7c219 Another sorting order error 2022-02-03 13:25:44 -08:00
Mouse Reeve cae7191a2b Python formatting 2022-02-03 13:19:56 -08:00
Mouse Reeve 2c7a6e8518 Correct status order 2022-02-03 13:17:16 -08:00
Mouse Reeve 1f6ecc39ac Adds allowlist for html attrs 2022-02-03 13:15:06 -08:00
Mouse Reeve 7b5bee8d7b Merge branch 'main' into more-tests 2022-02-03 12:48:11 -08:00
Mouse Reeve 3b48d986d5
Merge pull request #1910 from bookwyrm-social/superlative-rating
Fixes rating in about page superlatives
2022-02-03 12:46:07 -08:00
Mouse Reeve 5a3ce5e328 Fixes rating in about page superlatives 2022-02-03 11:48:56 -08:00
Mouse Reeve a370602903
Merge pull request #1860 from cincodenada/image-generation-add-cjk
Use Source Han Sans for preview images generation (bis)
2022-02-03 11:11:38 -08:00
Mouse Reeve c58a3ac114
Merge branch 'main' into main 2022-02-03 10:40:27 -08:00
Mouse Reeve e4b53266b3
Merge pull request #1909 from bookwyrm-social/list-notes-edit
Fixes add/edit notes form on list page
2022-02-03 10:39:22 -08:00
Mouse Reeve a46ab96d9b Fixes add/edit notes form on list page 2022-02-03 10:30:30 -08:00
Mouse Reeve baf28c523a
Merge pull request #1908 from bookwyrm-social/fix-shelf-view
Fix shelf names on books page
2022-02-03 08:58:16 -08:00
Mouse Reeve 2c16b8f33b Fix shelf names on books page 2022-02-03 08:44:51 -08:00
Willi Hohenstein 1b313c2b62 added check of existing url for book
sould also fix #1899
2022-02-02 22:34:30 +01:00
Mouse Reeve 4a299bd5d0
Merge pull request #1905 from bookwyrm-social/locale-migration
Adds migration for locale name update
2022-02-02 13:25:23 -08:00
Mouse Reeve e18f6fbfaf Adds migration for locale name update 2022-02-02 12:44:11 -08:00
Mouse Reeve f8bd0800f1
Merge pull request #1904 from bookwyrm-social/book-page-add-list
Fixes adding book to list from book page
2022-02-02 12:40:44 -08:00
Mouse Reeve fedc8deaa1
Merge pull request #1901 from bookwyrm-social/swedish-locale-name
Fixes name of Swedish locale
2022-02-02 12:30:47 -08:00
Mouse Reeve 36a52019fb Fixes adding book to list from book page 2022-02-02 12:29:01 -08:00
Mouse Reeve 36a47760cd Updates locales 2022-02-02 12:15:00 -08:00
Mouse Reeve e9370fe4c9 Fixes name of Swedish locale 2022-02-02 11:43:54 -08:00
Willi Hohenstein c2c33fe1e8 fixed merge conflict 2022-02-02 20:20:16 +01:00
Mouse Reeve b5baf1620f
Merge pull request #1897 from bookwyrm-social/verify-image-types
Check image extensions before saving
2022-02-02 11:04:52 -08:00
Willi Hohenstein 4503dd6864 Merge branch 'main' of github.com:willhoh/bookwyrm 2022-02-02 19:51:23 +01:00
Willi Hohenstein e37982d285 added domain pending or blocked check
fixes #1850
2022-02-02 19:35:26 +01:00
Mouse Reeve 6fd3ac0cb1 Changes how test image data is loaded 2022-02-02 09:36:47 -08:00
Mouse Reeve f84241b085
Merge pull request #1804 from cincodenada/run-not-exec
Use run --rm instead of exec for initdb
2022-02-02 09:10:28 -08:00
Mouse Reeve 194c69f512 Fixes return values of null responses 2022-02-02 07:09:35 -08:00
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
Mouse Reeve 754e24812b Check image extensions before saving 2022-02-01 21:18:25 -08:00
Mouse Reeve 9611815b44 Extract wikipedia and inventaire ids 2022-01-30 12:02:18 -08:00
Mouse Reeve 44dad43f36 Load new fields via connector 2022-01-30 11:41:33 -08:00
Mouse Reeve c4b8e7949d Add more book identifier fields 2022-01-30 11:41:31 -08:00
Mouse Reeve 1dfe4d0f52
Merge pull request #1890 from bookwyrm-social/shelf-display
Don't display empty shelves on user page
2022-01-30 11:39:25 -08:00
Mouse Reeve e674f85d4e Don't display empty shelves on user page 2022-01-30 11:23:23 -08:00
Mouse Reeve 4e607d38eb
Merge pull request #1888 from bookwyrm-social/ap-delete
More resilient hanlding of deletions
2022-01-30 11:21:16 -08:00
Mouse Reeve ef44b407e5
Merge pull request #1889 from bookwyrm-social/dm-button
Fixes display of dm button
2022-01-30 11:21:04 -08:00
Mouse Reeve a7afd4c47b Fixes display of dm button 2022-01-30 11:10:18 -08:00
Mouse Reeve f2d2d050f5
Merge pull request #1886 from bookwyrm-social/filter-panels-display
Fixes form element display inside details panel
2022-01-30 10:45:26 -08:00
Mouse Reeve 2d5b6ba0e9
Merge pull request #1887 from bookwyrm-social/locale-updates
Updates locales
2022-01-30 10:44:53 -08:00
Mouse Reeve 18b53a608c More resilient hanlding of deletions 2022-01-30 10:42:29 -08:00
Mouse Reeve 65496fea49 Fixes black regression 2022-01-30 10:26:28 -08:00
Mouse Reeve f52fd25313 Updates locales 2022-01-30 10:19:12 -08:00
Mouse Reeve 79be02230b
Merge pull request #1885 from bookwyrm-social/reporting-improvements
Reporting improvements
2022-01-30 09:55:37 -08:00
Mouse Reeve ae0e67f076 Fixes form element display inside details panel 2022-01-30 09:31:57 -08:00
Mouse Reeve 68f9ee9d8a Fixes access level control in report view 2022-01-30 09:20:26 -08:00
Mouse Reeve 24c1d5a168 Add prompt to respond to reporter 2022-01-30 09:17:12 -08:00
Mouse Reeve c04bf4638f Avoid duplicate emails 2022-01-30 08:59:32 -08:00
Mouse Reeve 8a07f5c396 Fixes report remote id 2022-01-30 08:50:53 -08:00
Mouse Reeve ae53b479f5 Fixes status field on report modal form 2022-01-30 08:36:20 -08:00
Mouse Reeve dd39046ff9
Merge pull request #1884 from bookwyrm-social/dependabot/pip/django-3.2.11
Bump django from 3.2.10 to 3.2.11
2022-01-30 07:39:53 -08:00
Mouse Reeve 6983884eaa
Merge pull request #1883 from bookwyrm-social/cache-fix
Fixes bad cache on status shelve buttons
2022-01-30 07:19:30 -08:00
Mouse Reeve aaccab6dce Merge branch 'main' into cache-fix 2022-01-30 07:09:32 -08:00
dependabot[bot] 36d2a7cc1d
Bump django from 3.2.10 to 3.2.11
Bumps [django](https://github.com/django/django) from 3.2.10 to 3.2.11.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.10...3.2.11)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-30 15:09:29 +00:00
Mouse Reeve 65e4e6418e
Merge pull request #1882 from bookwyrm-social/fix-urls
Bring prod and main into sync on urls
2022-01-30 07:09:07 -08:00
Mouse Reeve f86016ba33 Python formatting for black update 2022-01-30 07:01:38 -08:00
Mouse Reeve 3c2aa72424 Fixes bad cache on status shelve buttons 2022-01-30 06:56:15 -08:00
Mouse Reeve 29a7c59d5f Bring prod and main into sync on urls 2022-01-30 06:43:50 -08:00
Mouse Reeve 224dc4100a Activitstreams tests 2022-01-28 17:32:41 -08:00
Mouse Reeve 8fc23ba184
Merge pull request #1878 from bookwyrm-social/tests
Some tests
2022-01-28 06:54:51 -08:00
Mouse Reeve c6c1534c85 Adds id to report page 2022-01-27 20:05:17 -08:00
Mouse Reeve e8e2cb08a5
Merge pull request #1877 from bookwyrm-social/locale-updates
Updates locales and adds new strings
2022-01-27 19:55:03 -08:00
Mouse Reeve 1d45e8b4cc Updates ip blocklists tests 2022-01-27 19:43:42 -08:00
Mouse Reeve 778975d492 Merge branch 'misc-tests' into user-view 2022-01-27 19:39:19 -08:00
Mouse Reeve 89aa1673b2 Admin views tests 2022-01-27 19:39:07 -08:00
Mouse Reeve afdaa776e2 Fixes syntax 2022-01-27 19:38:51 -08:00
Mouse Reeve e7ecae0f96 Adds annual review test 2022-01-27 18:57:18 -08:00
Mouse Reeve 8ec1b49800 Updates locales and adds new strings 2022-01-27 18:52:33 -08:00
Mouse Reeve 40a14a05ad
Merge pull request #1865 from bookwyrm-social/unread-status-translation
Calculate and translate unread status counts in view
2022-01-27 18:47:35 -08:00
Mouse Reeve 107f02e4e5
Merge pull request #1876 from bookwyrm-social/initdb-tests
Adds tests for initdb command
2022-01-27 18:38:55 -08:00
Mouse Reeve 59b5369654 Updates tests 2022-01-27 18:23:31 -08:00
Mouse Reeve d711c7a5a2 Test fixes 2022-01-27 13:32:49 -08:00
Mouse Reeve 047e3a324a
Merge pull request #1855 from bookwyrm-social/instance-default-language
Makes default language configurable
2022-01-27 13:25:12 -08:00
Mouse Reeve ba18e1e34b Adds tests for initdb command 2022-01-27 13:23:29 -08:00
Mouse Reeve b3d9a46c98
Merge pull request #1869 from bookwyrm-social/list-notes
Let users add info about their list entry submissions
2022-01-27 13:04:08 -08:00
Mouse Reeve d925395f9d
Merge pull request #1874 from willhoh/main
This fixes #1871 and fixes #1873
2022-01-27 13:01:50 -08:00
Mouse Reeve a80c19d3e5 Screen reader fixes for list view 2022-01-27 12:55:53 -08:00
Mouse Reeve 2cf10b932d
Merge pull request #1875 from bookwyrm-social/get-started-books
Don't check suggested books against shelved books
2022-01-27 12:43:04 -08:00
Mouse Reeve 8a8d09fc30
Merge pull request #1872 from officialkzhang/main
Added a class for fixing onboarding logo's size
2022-01-27 12:42:46 -08:00
Willi Hohenstein 72c22cdcc0 reformatted file 2022-01-27 21:21:28 +01:00
Mouse Reeve 577bc18a47 Minor simplification for user shelf view 2022-01-27 12:05:26 -08:00
officialkzhang f62e66f5ee
Revised HTML element for onboarding logo
Added navbar class to the parent header of the onboarding logo and removed the previously appended icon class from the image.
2022-01-27 14:51:57 -05:00
Mouse Reeve c0dabeee04 Don't check suggested books against shelved books
It takes too long, and ideally this is your first action so you don't
have any books shelved yet.
2022-01-27 11:45:40 -08:00
Mouse Reeve d62473c432 Tests that list item notes federate 2022-01-27 11:04:30 -08:00
Willi Hohenstein dd35c90042 fix linging errors 2022-01-27 19:54:12 +01:00
Willi Hohenstein f8afdfc6a9 This fixes #1871 huge amount of traffic from bots
and closes #1873 that leaves a file after testing.
2022-01-27 17:30:02 +01:00
officialkzhang 13edeffb53
Added a class for fixing onboarding logo's size
Added a CSS class for fixing the onboarding logo's size to a reasonable dimension (about 3rem).
2022-01-27 00:22:50 -05:00
Mouse Reeve 0d69d9b48b Adds more unit tests for list views 2022-01-26 12:02:48 -08:00
Mouse Reeve 65b9872c72 Fixes approving curated submissions 2022-01-26 10:37:50 -08:00
Mouse Reeve eddd9ccc32 Refer to user by id in form tests 2022-01-25 13:57:12 -08:00
Mouse Reeve 2eabe29401 Show notes on curation page 2022-01-25 13:54:44 -08:00
Mouse Reeve 3f9a401d98 Put list action tests in correct files 2022-01-25 13:54:38 -08:00
Mouse Reeve 3a5289a999 Separate lists view test files 2022-01-25 13:38:13 -08:00
Mouse Reeve dd16fb2a26 Move embed view to separate file 2022-01-25 13:37:57 -08:00
Mouse Reeve d456ab7306 Move lists tests into directory 2022-01-25 13:22:04 -08:00
Mouse Reeve f85158191b Use form for saving list items 2022-01-25 12:11:17 -08:00
Mouse Reeve a43731b335 Fixes tests for list actions 2022-01-25 10:08:54 -08:00
Mouse Reeve e1599384b0 Fixes list views tests 2022-01-25 09:46:00 -08:00
Mouse Reeve 38ccc23cd5 Add notes form 2022-01-25 09:40:03 -08:00
Mouse Reeve 6009593b6b Migration formatting 2022-01-25 09:17:00 -08:00
Mouse Reeve 037cc35eeb Adds merge migration and python formatting 2022-01-25 08:45:22 -08:00
Mouse Reeve de4576bc44 Merge branch 'main' into list-notes 2022-01-25 08:44:29 -08:00
Mouse Reeve 9902794bbd Adds edit note view 2022-01-25 08:44:04 -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 ca0dbeb0ab Move list views into more files 2022-01-24 19:39:30 -08:00
Mouse Reeve a1a84b28b0 Adds edit box 2022-01-24 13:56:18 -08:00
Mouse Reeve 8280386f0e Context for note block in list item 2022-01-24 13:45:52 -08:00
Mouse Reeve 5206d08dbb Adds demo display of comment in list entry 2022-01-24 13:37:51 -08:00
Mouse Reeve d0a4c78d02 Limit length on list item note 2022-01-24 12:02:05 -08:00
Mouse Reeve 91f085c876
Merge pull request #1868 from bookwyrm-social/swedish-locale
Adds Swedish locale
2022-01-24 10:08:38 -08:00
Mouse Reeve eeee62cd04 Adds Swedish to the app 2022-01-24 09:39:13 -08:00
Mouse Reeve 906456802a Adds Swedish locale files and updates all locales 2022-01-24 09:38:56 -08:00
Mouse Reeve a651352b8b
Merge pull request #1866 from cincodenada/patch-3
Fix typo from models refactor
2022-01-24 07:25:19 -08:00
Joel Bradshaw 7373fb4132
Fix typo from models refactor
Looks like this got caught up when moving to importing `models`
instead of the individual models, and was throwing an error on
`./bw-dev initdb`
2022-01-23 23:41:22 -08:00
Mouse Reeve 191079a922 Python formatting 2022-01-22 19:01:42 -08:00
Mouse Reeve e5c8500547 Updates cache buster 2022-01-22 17:05:31 -08:00
Mouse Reeve 3fc690e763 Calculate and translate unread status counts in view 2022-01-22 17:03:48 -08:00
Mouse Reeve ec63ca3817
Merge branch 'main' into run-not-exec 2022-01-22 15:51:42 -08:00
Mouse Reeve a74f907a61
Merge pull request #1864 from bookwyrm-social/fixes-initdb
Fixes option checking in initdb management command
2022-01-22 15:42:56 -08:00
Mouse Reeve 67c3091aa1 Fixes option checking in initdb management command 2022-01-22 15:09:30 -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 e2e5ed9aa3 Makes default language configurable 2022-01-20 16:04:42 -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
Mouse Reeve 02dd1e9443 Use False instead of None for test values 2022-01-17 12:45:32 -08:00
Mouse Reeve 1e4aee8276 Cache user-specific ratings 2022-01-17 12:17:24 -08:00
Mouse Reeve 4cc35ba25e Cache query for author's books 2022-01-17 12:05:11 -08:00
Mouse Reeve 63b21fe1c2
Merge pull request #1835 from bookwyrm-social/noreferrer
Uses both noopener and noreferrer on external links
2022-01-17 11:49:11 -08:00
Mouse Reeve 8e1352fb75 Updates locales 2022-01-17 11:27:06 -08:00
Mouse Reeve 32acccc350 Use both noopener and noreferrer 2022-01-17 11:25:41 -08:00
Mouse Reeve 8a0ea674ea
Merge pull request #1834 from bookwyrm-social/links-display
Improve link filetype and add availability field
2022-01-17 11:08:40 -08:00
Mouse Reeve 4c356cbeb4 Case insensitive suggestions 2022-01-17 10:52:16 -08:00
Mouse Reeve a23e49c9f3 Fixes filetype field length 2022-01-17 10:48:42 -08:00
Mouse Reeve 2f924faa05 Adds tests 2022-01-17 10:47:49 -08:00
Mouse Reeve cfcacb4797 Edit book availability 2022-01-17 10:00:12 -08:00
Mouse Reeve 1595bac9b5 Show availability in links panel 2022-01-17 09:26:00 -08:00
Mouse Reeve 39814a21f2 Set book availability 2022-01-17 09:22:40 -08:00
Mouse Reeve 7b1693a435 Larger file type field 2022-01-17 09:03:53 -08:00
Mouse Reeve 942092d6b1 Show link status more prominently on edit page 2022-01-17 08:54:52 -08:00
Mouse Reeve d4cfe5b8f0 Fixes embedded links modal 2022-01-17 08:44:30 -08:00
Mouse Reeve f769c42abe
Merge pull request #1833 from bookwyrm-social/links-admin-improvements
Links admin improvements
2022-01-17 08:36:48 -08:00
Mouse Reeve 6d7243b6cb
Merge pull request #1832 from bookwyrm-social/locale-updates
Updates locales
2022-01-17 08:23:29 -08:00
Mouse Reeve da6e43a7eb Avoid two character wide urls on mobile 2022-01-17 08:22:55 -08:00
Mouse Reeve e12372250a Mobile-friendly edit button on link domains 2022-01-17 08:17:36 -08:00
Mouse Reeve b9fde85b49 Sort domains in admin view 2022-01-17 08:15:14 -08:00
Mouse Reeve 3c26e9ead1
Merge pull request #1830 from bookwyrm-social/bad-cache
Removes bad cache on content status reading buttons
2022-01-17 08:11:33 -08:00
Mouse Reeve 32a3570b5a Updates locales 2022-01-17 08:08:59 -08:00
Mouse Reeve b060cf47f2 Fixes bad cache on content status reading buttons 2022-01-17 08:01:39 -08:00
Mouse Reeve e218b73272
Merge pull request #1829 from bookwyrm-social/author-page
Fixes weird display of author page
2022-01-16 19:58:42 -08:00
Mouse Reeve 7dc7965b76 Fixes weird display of author page 2022-01-16 19:38:21 -08:00
Mouse Reeve 0c2537e27a
Merge pull request #1527 from bookwyrm-social/book-file-links
Book file links
2022-01-13 11:10:05 -08:00
Mouse Reeve d95830037a Adds admin notice 2022-01-13 11:00:59 -08:00
Mouse Reeve 1c821263ab
Merge pull request #1824 from bookwyrm-social/locale-updates
Updates locales
2022-01-13 09:12:56 -08:00
Mouse Reeve abd7c213ff
Merge pull request #1823 from bookwyrm-social/update-main
Adds update command to main for bw-dev
2022-01-13 09:07:38 -08:00
Mouse Reeve a06fb777d7 Updates locales 2022-01-13 09:00:02 -08:00
Mouse Reeve 66c67a54e2
Merge pull request #1822 from bookwyrm-social/group-query
Fixes searching for users in group view, with test
2022-01-13 08:53:15 -08:00
Mouse Reeve b76cb0a22f Adds update command to main for bw-dev 2022-01-13 08:52:22 -08:00
Mouse Reeve 0d12d82c12
Merge pull request #1818 from iamruinous/support-redis-db
add support for different redis db
2022-01-13 08:42:00 -08:00
Mouse Reeve c7b2b303da Fixes searching for users in group view, with test 2022-01-13 08:38:54 -08:00
Jade Meskill 900937ee5f
use REDIS_x_DB_INDEX instead of REDIS_x_DB, add optional setting to example env file 2022-01-13 09:16:16 -07:00
Jade Meskill 5a3d108c62
update fomatting to pass automated checks 2022-01-12 22:46:51 -07:00
Mouse Reeve fcd2a62e2a
Merge pull request #1819 from iamruinous/fix-email-domain
use correct environment variable for EMAIL_SENDER_DOMAIN
2022-01-12 21:38:07 -08:00
Jade Meskill 6490c1eded
use correct environment variable for EMAIL_SENDER_DOMAIN 2022-01-12 21:49:57 -07:00
Jade Meskill 3638e18844
add support for different redis db 2022-01-12 19:44:11 -07:00
Mouse Reeve 2fbbdbc06a Runs prettier 2022-01-12 17:19:34 -08:00
Mouse Reeve e6355f76de Adds merge migration 2022-01-12 17:16:20 -08:00
Mouse Reeve d74360a13f Merge branch 'main' into book-file-links 2022-01-12 17:14:27 -08:00
Mouse Reeve a2fb1489b9 Merge branch 'main' into book-file-links 2022-01-12 17:11:29 -08:00
Mouse Reeve d1183fd003 Python formatting 2022-01-12 17:11:24 -08:00
Mouse Reeve 7bb634b71f
Merge pull request #1699 from bookwyrm-social/autocomplete
Autocomplete script
2022-01-12 17:09:34 -08:00
Mouse Reeve fc06f0cdd1 Avoid console error 2022-01-12 17:08:10 -08:00
Mouse Reeve 80efd58881 Javascript file in correct template 2022-01-12 17:06:36 -08:00
Mouse Reeve 34635b0c3f Select trie based on data attr 2022-01-12 17:02:30 -08:00
Mouse Reeve 99ec87c67c Merge branch 'book-file-links' into autocomplete 2022-01-12 16:51:59 -08:00
Mouse Reeve 262e641c79 Creates link template subdirectory 2022-01-12 16:50:52 -08:00
Mouse Reeve 5fcdc284ce Removes duplicate atomic block 2022-01-12 16:41:23 -08:00
Mouse Reeve dedcbda2d8 Adds inbox test 2022-01-12 16:41:20 -08:00
Mouse Reeve b2262a5f98
Merge pull request #1816 from bookwyrm-social/privacy-translation
Build-in translations to privacy choices dropdown
2022-01-12 16:15:03 -08:00
Mouse Reeve 1513c73d48
Merge pull request #1817 from bookwyrm-social/opensearch-site-name
Use site name as shortname for opensearch
2022-01-12 16:14:09 -08:00
Mouse Reeve 84575cef9a Use site name as shortname for opensearch 2022-01-12 15:29:40 -08:00
Mouse Reeve 8b2335c52c Build-in translations to privacy choices dropdwon 2022-01-12 15:26:13 -08:00
Mouse Reeve 899f9beb82
Merge pull request #1815 from bookwyrm-social/status-headers
Status headers
2022-01-12 11:35:26 -08:00
Mouse Reeve c08b9e61c4 Fixes book link in table 2022-01-12 11:34:44 -08:00
Mouse Reeve 57a05e239b Python formatting 2022-01-12 11:17:30 -08:00
Mouse Reeve 24045685e1 Updates tests 2022-01-12 11:03:04 -08:00
Mouse Reeve 9c86132701 Adds missing bracket 2022-01-12 10:43:40 -08:00
Mouse Reeve 4a7013f104 Adds book path variable 2022-01-12 10:42:27 -08:00
Mouse Reeve 581e3d17e0 Fixes nested quotes 2022-01-12 10:41:48 -08:00
Mouse Reeve 7f23e8c112 Updates locales 2022-01-12 10:37:26 -08:00
Mouse Reeve 5da2ce6427 Include author in content status headers 2022-01-12 10:35:02 -08:00
Mouse Reeve e452ec87d3 Link to book title in pure activitypub serialization of review 2022-01-12 10:15:26 -08:00
Mouse Reeve 4cf3f378ef Delete view 2022-01-12 10:08:49 -08:00
Mouse Reeve ebc451fdd2 Edit links view 2022-01-12 09:59:46 -08:00
Mouse Reeve 2ca41a0b11 Renames add link view 2022-01-12 09:16:24 -08:00
Mouse Reeve e6d9895854
Merge branch 'main' into book-file-links 2022-01-12 06:39:22 -08:00
Mouse Reeve de0c50196e
Merge pull request #1812 from bookwyrm-social/modal-triggers
Use updated modal triggers on shelf page shelf selector
2022-01-11 13:19:14 -08:00
Mouse Reeve e378e74901
Merge pull request #1811 from bookwyrm-social/cache-fix
Fixes active readthrough cache bug
2022-01-11 13:11:02 -08:00
Mouse Reeve 549d6e9b3b Use updated modal triggers on shelf page shelf selector 2022-01-11 13:10:25 -08:00
Mouse Reeve 6baab5d5a9 python formatting 2022-01-11 12:58:14 -08:00
Mouse Reeve 2fabad63e0
Merge pull request #1809 from bookwyrm-social/unread-notifications
Show unread notifications color
2022-01-11 12:55:18 -08:00
Mouse Reeve 26a089b3c9
Merge pull request #1810 from bookwyrm-social/shelf-breadcrumbs
Shelf breadcrumbs
2022-01-11 12:55:08 -08:00
Mouse Reeve 591bb955f8 Fixes active readthrough cache bug 2022-01-11 12:37:07 -08:00
Mouse Reeve 5fd0115216 Use translation snippet 2022-01-11 12:10:30 -08:00
Mouse Reeve 150756dbd0 Adds breadcrumbs to shelf page 2022-01-11 12:03:04 -08:00
Mouse Reeve 0abfc67c12
Merge pull request #1808 from bookwyrm-social/readthrough-form
Updates editing read-through flow
2022-01-11 12:01:21 -08:00
Mouse Reeve f4b655f952 Makes form names unique in readthrough modal 2022-01-11 11:45:37 -08:00
Mouse Reeve c12aa1ef79 Fixes test 2022-01-11 11:38:26 -08:00
Mouse Reeve 0d7801f6f4 Show unread notifications color 2022-01-11 11:04:56 -08:00
Mouse Reeve 9fdb75e2d3 Renames item layout file 2022-01-11 10:47:55 -08:00
Mouse Reeve 834eb95d9d Reformats readthrough view test 2022-01-11 10:43:17 -08:00
Mouse Reeve 0f9881365b Python formatting 2022-01-11 10:41:33 -08:00
Mouse Reeve 4ca90ca10f Renames class view 2022-01-11 10:40:32 -08:00
Mouse Reeve 68d943fb26 Preserve readthrough id in edit 2022-01-11 10:33:58 -08:00
Mouse Reeve a412f87c64 Match wording to state 2022-01-11 10:29:11 -08:00
Mouse Reeve 7ccb02f635 Use new modal for edits 2022-01-11 10:27:10 -08:00
Mouse Reeve cdaf0fe8e3 Show error message when start and finish date is invalid 2022-01-11 10:22:19 -08:00
Mouse Reeve 9521c477b2 Moves readthrough templates to dir 2022-01-11 09:58:28 -08:00
Mouse Reeve 0d2c6e63d1 Converts create readthrough to modal 2022-01-11 09:50:04 -08:00
Mouse Reeve a47bd7a05b
Merge pull request #1807 from bookwyrm-social/ui-small-fixes
UI small fixes
2022-01-11 09:28:02 -08:00
Mouse Reeve 048460aec2 Don't show filters notice on paged feed 2022-01-11 09:12:30 -08:00
Mouse Reeve 4faf3cf09a Fixes button on search page 2022-01-11 09:12:04 -08:00
Mouse Reeve de1bace8f3 Updates tests 2022-01-11 08:06:52 -08:00
Mouse Reeve 60761b19ba Run prettier 2022-01-10 16:55:30 -08:00
Mouse Reeve 4202498442 Fixes one option trie case 2022-01-10 16:53:30 -08:00
Mouse Reeve f6d6285009 Updates trie function 2022-01-10 16:44:43 -08:00
Mouse Reeve 2746318152 Uses datalist for autocomplete suggestions 2022-01-10 15:47:40 -08:00
Mouse Reeve 380087da90 Merge branch 'book-file-links' into autocomplete 2022-01-10 15:32:20 -08:00
Mouse Reeve dcf8a8dab9 Fixes settings tab highlighting 2022-01-10 15:27:33 -08:00
Mouse Reeve c0b5e6ad78 Fixes linting errors 2022-01-10 15:00:37 -08:00
Mouse Reeve aee7e1ae41 Fixes redirect on reports modal 2022-01-10 14:58:10 -08:00
Mouse Reeve 78dd5caf9f Allow users to report spam links 2022-01-10 14:55:10 -08:00
Mouse Reeve 651d468b13 Show who added the link in admin view 2022-01-10 13:33:22 -08:00
Mouse Reeve 34f375c53c Store user that added link 2022-01-10 13:27:01 -08:00
Mouse Reeve 6c78a7b6ef Add user attribution to links and domains 2022-01-10 13:20:31 -08:00
Mouse Reeve 93fead47ef Reformats init command and adds Standard EBooks 2022-01-10 13:13:28 -08:00
Mouse Reeve dcf51020bc Removes initialization from migration
Just doesn't seem right
2022-01-10 13:05:08 -08:00
Mouse Reeve 8928e8da26 Corrects tests 2022-01-10 12:42:05 -08:00
Mouse Reeve 2880b311e1 HTML validity fix for summary tag 2022-01-10 12:30:24 -08:00
Mouse Reeve eec1155bb8 Adds admin view tests 2022-01-10 12:29:28 -08:00
Mouse Reeve 62f481c859 Fixes urls 2022-01-10 12:21:36 -08:00
Mouse Reeve d610115a5b Null state for links 2022-01-10 12:09:03 -08:00
Mouse Reeve 8ba3a4ab00 Adds link confirmation modal 2022-01-10 11:48:07 -08:00
Mouse Reeve 4ba375892a
Merge pull request #1793 from bookwyrm-social/more-caches
More caches
2022-01-10 11:25:26 -08:00
Mouse Reeve 4dfe9fd714 Support links with no name 2022-01-10 11:21:43 -08:00
Mouse Reeve 4820a2f982 Python formatting 2022-01-10 11:21:03 -08:00
Mouse Reeve f0ae37c331 Block or approve domains 2022-01-10 11:19:20 -08:00
Mouse Reeve 6b0967df39 Show related books in links preview 2022-01-10 11:03:10 -08:00
Mouse Reeve 3f280af715 Functionality to edit name 2022-01-10 10:48:27 -08:00
Mouse Reeve f580a51f24 Form to edit link domain display names 2022-01-10 10:39:09 -08:00
Mouse Reeve 32e3fdb438 Adds admin view 2022-01-10 10:12:28 -08:00
Joel Bradshaw 29ebfc456d Use run --rm instead of exec for initdb
This way we don't depend on the containers already being up and running.
2022-01-09 23:57:57 -08:00
Joel Bradshaw 5cf1d8a30a Make it black 2022-01-09 23:53:23 -08:00
Joel Bradshaw 085dd24a62 Simplify and explain our overrides
This should also fix the 500s-in-prod issue, yay
2022-01-09 23:49:14 -08:00
Joel Bradshaw 83851c2933 Add bookwyrm-specific logging 2022-01-09 23:49:14 -08:00
Joel Bradshaw af3c84cd87 Add basic logging config 2022-01-09 23:49:14 -08:00
Mouse Reeve 0bfa15bb47 Adds id on static link edit view 2022-01-09 20:48:16 -08:00
Mouse Reeve aa9864a21e Only show approved links 2022-01-09 20:30:23 -08:00
Mouse Reeve 70fe7e17af Removes name ap field 2022-01-09 14:25:22 -08:00
Mouse Reeve 63075a6fe9 Updates models 2022-01-09 14:21:13 -08:00
Mouse Reeve bae01e1ea5 Updates modal 2022-01-09 14:20:52 -08:00
Mouse Reeve bae355e8d2 Adds link domain table 2022-01-09 13:19:29 -08:00
Mouse Reeve 4931e5cad2 Merge branch 'main' into book-file-links 2022-01-09 13:15:58 -08:00
Mouse Reeve 0a182e8150 Caches query for landing page books 2022-01-09 13:04:41 -08:00
Mouse Reeve e8c830750a No cache for suggested books 2022-01-09 13:00:02 -08:00
Mouse Reeve 6492ca2941
Merge pull request #1769 from joachimesque/thumbnail-generation-strategy
Change thumbnail generation strategy
2022-01-09 12:34:42 -08:00
Mouse Reeve 78c707bc58
Merge pull request #1801 from bookwyrm-social/fixes-compiled-locales
Fixes compiled locales
2022-01-09 12:21:18 -08:00
Mouse Reeve 556c9ea98f Adjusts cache get_or_set to work with tests 2022-01-09 12:16:01 -08:00
Mouse Reeve 593d1638f9 Updates tests env 2022-01-09 12:04:45 -08:00
Mouse Reeve eee1d347d1 Fixes compiled locales 2022-01-09 11:21:06 -08:00
Mouse Reeve f03c6c46d6
Merge pull request #1800 from bookwyrm-social/locale-updates
Updates locales
2022-01-09 11:11:39 -08:00
Mouse Reeve 00e8574d1f Typo fix 2022-01-09 11:01:55 -08:00
Mouse Reeve 296951f437 Updates locales 2022-01-09 10:50:53 -08:00
Mouse Reeve ebf4c6127f
Merge pull request #1798 from joachimesque/annual-summary-fix-highest-link
Annual Summary: Fix link to book with highest page count
2022-01-09 10:08:13 -08:00
Mouse Reeve dc7034cd61
Merge pull request #1797 from joachimesque/populate-list-streams-add-message
Add end message for populate_list_streams command
2022-01-09 10:07:01 -08:00
Joachim 278ce88b82 Annual Summary: Fix link to book with highest page count 2022-01-09 12:18:18 +01:00
Joachim 4c07c5e47e Add end message for populate_list_streams command 2022-01-09 12:11:52 +01:00
Joachim 734da71037 Remove backend setting 2022-01-09 10:36:06 +01:00
Mouse Reeve 3048311a5e
Merge pull request #1796 from bookwyrm-social/about-admins
Makes query to get admins unique
2022-01-08 18:54:59 -08:00
Mouse Reeve 599c79917e Makes query to get admins unique 2022-01-08 18:44:32 -08:00
Mouse Reeve ad9d7bcd65
Merge pull request #1794 from bookwyrm-social/new-languages
Adds Italian and Norwegian locales
2022-01-08 18:42:23 -08:00
Mouse Reeve 79f6fb966e Updates migration 2022-01-08 17:07:51 -08:00
Mouse Reeve 16a58ae079 Merge branch 'main' into book-file-links 2022-01-08 16:58:37 -08:00
Mouse Reeve c23b91da32 New strings 2022-01-08 16:56:34 -08:00
Mouse Reeve ac1787ce6b Merge branch 'main' into new-languages 2022-01-08 16:54:31 -08:00
Mouse Reeve 82294909a8 Python formatting 2022-01-08 16:38:52 -08:00
Mouse Reeve e1a617f742
Merge pull request #1613 from bookwyrm-social/list-not-loading
Use a redis cache to store lists for user
2022-01-08 13:38:20 -08:00
Mouse Reeve a80cb4310e
Merge pull request #1771 from bookwyrm-social/about-page
Refactors about page
2022-01-08 13:28:23 -08:00
Mouse Reeve c822048509 Invalidate template cache on relationship change 2022-01-08 13:04:01 -08:00
Mouse Reeve f2f40cf3b9 Creates custom get_or_set function 2022-01-08 13:01:05 -08:00
Mouse Reeve 2cca9fab2d Cache user relationship for follow buttons 2022-01-08 12:33:13 -08:00
Mouse Reeve 26928252cd Use cache 2022-01-08 11:44:04 -08:00
Mouse Reeve b6d04e9997
Merge pull request #1792 from reesporte/lang-setting
save language preferences with cookies that last
2022-01-08 11:27:58 -08:00
Mouse Reeve bb4b724b1a Updates queries 2022-01-08 11:26:15 -08:00
Mouse Reeve a4cb8f7e89
Merge pull request #1788 from bookwyrm-social/single-env-file
Moves to a single example .env file
2022-01-08 11:02:57 -08:00
reesporte 85691478f1 save language preferences with cookies that last
(as long as login ones do)
2022-01-08 12:56:57 -06:00
Joachim 705c4cd636 Update thumbnail_generation.py 2022-01-08 17:54:03 +01:00
Joachim 12ea1910b4 Add docstrings 2022-01-08 17:47:45 +01:00
Joachim 656e0b84eb Fix 2022-01-08 17:42:25 +01:00
Joachim a54995eb9d Add new complete strategy 2022-01-08 17:41:44 +01:00
Mouse Reeve 02a963c4ef Adds locales to application 2022-01-08 07:38:14 -08:00
Mouse Reeve cb858b66fe Adds Italian and Norwegian locales 2022-01-08 07:34:18 -08:00
Mouse Reeve 392dbfce01 Merge branch 'main' into about-page 2022-01-07 14:59:26 -08:00
Mouse Reeve 9609e130f2 Moves to a single example .env file
The prod and dev ones hae gotten so close that it seems unnecessary to
have two different ones.
2022-01-07 14:49:15 -08:00
Mouse Reeve 7d2a53fec9
Merge pull request #1784 from bookwyrm-social/npm-update
Updates NPM dependencies to resolve security alerts
2022-01-07 14:40:10 -08:00
Mouse Reeve a9b88c0796 Use null to invalidate rules 2022-01-07 14:18:41 -08:00
Mouse Reeve 02feb0d594 Stylelint updates 2022-01-07 14:08:36 -08:00
Mouse Reeve db3b4465f6 Updates NPM dependencies to resolve security alerts
Amazing how many npm dependencies you can have when you don't even use
npm in an app
2022-01-07 13:50:27 -08:00
Mouse Reeve f43a9570e2 Updates test 2022-01-07 13:40:20 -08:00
Mouse Reeve 8a8ce0c0d4 Fixes deletion of lists 2022-01-07 13:30:11 -08:00
Mouse Reeve 0580b66c3b Fixes test 2022-01-07 10:34:45 -08:00
Mouse Reeve 7e1a4bc363 Ticks version number 2022-01-07 10:32:40 -08:00
Mouse Reeve 165fdc6d2d Merge branch 'main' into list-not-loading 2022-01-07 10:32:17 -08:00
Mouse Reeve 47c79afd75
Merge pull request #1770 from bookwyrm-social/email-config
Configure email sender from .env file
2022-01-07 10:23:50 -08:00
Mouse Reeve 5c7cc034d5
Merge pull request #1782 from bookwyrm-social/get-started-user-search
Fixes searching for users in get started view
2022-01-07 10:23:19 -08:00
Mouse Reeve db1485abb3
Merge pull request #1781 from bookwyrm-social/dependabot/npm_and_yarn/postcss-8.2.13
Bump postcss from 8.2.10 to 8.2.13
2022-01-07 10:14:28 -08:00
Mouse Reeve 2ff9ba8bee
Merge pull request #1783 from bookwyrm-social/bad-caches
Removes caches that cause CSRF token failures
2022-01-07 10:14:17 -08:00
Mouse Reeve e91947afbf Adds meaningful test mock 2022-01-07 10:06:11 -08:00
Mouse Reeve c918edb622 Fixes searching for users in get started view 2022-01-07 09:56:29 -08:00
dependabot[bot] 21ce7f3721
Bump postcss from 8.2.10 to 8.2.13
Bumps [postcss](https://github.com/postcss/postcss) from 8.2.10 to 8.2.13.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.2.10...8.2.13)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-07 17:54:08 +00:00
Mouse Reeve 7415166718
Merge pull request #1776 from bookwyrm-social/dependabot/pip/celery-5.2.2
Bump celery from 4.4.2 to 5.2.2
2022-01-07 09:53:46 -08:00
Mouse Reeve abcae9e6c4 Removes caches that cause CSRF token failures 2022-01-07 09:47:58 -08:00
Mouse Reeve c89b8ee5db Updates flower 2022-01-07 09:45:21 -08:00
Mouse Reeve 1c74c0c0d9 Merge branch 'main' into dependabot/pip/celery-5.2.2 2022-01-07 08:38:05 -08:00
Mouse Reeve f9d7512ffd
Merge pull request #1780 from bookwyrm-social/search-timeouts
Make search timeouts configurable
2022-01-07 08:12:30 -08:00
Mouse Reeve b18c69e186 Make search timeouts configurable 2022-01-07 07:42:05 -08:00
Mouse Reeve 0ddecd7049
Merge pull request #1778 from hughrun/register-403
do not cache registration form
2022-01-06 18:56:23 -08:00
Mouse Reeve a1e3ef1c79
Fixes pylint complaint 2022-01-06 18:47:14 -08:00
Hugh Rundle e4be6a98e8
do not cache registration form
Fixes #1777

Caching the Landing view also caches the registration form, including the CSRF value.

This moves the caching into the recently reviewed books landing template which is presumably what we're trying to cache here, instead of caching the whole view.

NOTE: this fixes the problem with registration, I haven't done enough testing to be sure it actually still caches the recent reviews data.
2022-01-07 13:13:56 +11:00
dependabot[bot] 2d5ea3a99d
Bump celery from 4.4.2 to 5.2.2
Bumps [celery](https://github.com/celery/celery) from 4.4.2 to 5.2.2.
- [Release notes](https://github.com/celery/celery/releases)
- [Changelog](https://github.com/celery/celery/blob/master/Changelog.rst)
- [Commits](https://github.com/celery/celery/compare/4.4.2...v5.2.2)

---
updated-dependencies:
- dependency-name: celery
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-06 22:42:44 +00:00
Mouse Reeve 602574566b
Merge pull request #1775 from bookwyrm-social/order-suggestions
Sort suggestions by mutuals
2022-01-06 13:12:51 -08:00
Mouse Reeve cc6c75c5ec
Merge pull request #1774 from hughrun/zero-annual
Minor grammar fix for annual review page
2022-01-06 13:05:33 -08:00
Mouse Reeve deaa06d44c Sort suggestions by mutuals 2022-01-06 13:02:12 -08:00
Hugh Rundle e2efd5fd5a
"any" is plural
English huh, what a weird language.
2022-01-07 07:50:36 +11:00
Mouse Reeve 00a14e89a0
Merge pull request #1772 from bookwyrm-social/cache-tweaks
Cache tweaks
2022-01-06 12:13:56 -08:00
Mouse Reeve 8722778ed0 Updates tests 2022-01-06 12:13:24 -08:00
Mouse Reeve cf57891482 Python formatting 2022-01-06 11:50:51 -08:00
Mouse Reeve cf6e101e55
Merge pull request #1773 from bookwyrm-social/load-generatednote-status-type
Loads subclass for generated note
2022-01-06 11:41:30 -08:00
Mouse Reeve 4d0fa2db4a Dummy cache for tests 2022-01-06 11:40:27 -08:00
Mouse Reeve 45393af843 Loads subclass for generated note
Fixes display weirdness in threads
2022-01-06 11:27:02 -08:00
Mouse Reeve 86b3789ffe Fixes display of filter inputs in chromium 2022-01-06 11:11:00 -08:00
Mouse Reeve e416ef05e8 Fixes cache of status interact
The CSRF token was being cached which caused submits to fail
2022-01-06 11:07:22 -08:00
Mouse Reeve 32ac4111aa
Merge pull request #1768 from bookwyrm-social/shelf-button-cache
Cache queries in feed view
2022-01-06 10:42:31 -08:00
Mouse Reeve b3bfaf0586 Use 6 month cache for items that don't really need to expire 2022-01-06 10:27:12 -08:00
Mouse Reeve 996d1fc571 Don't crash tests 2022-01-06 10:22:27 -08:00
Mouse Reeve d9857839dc Add all superusers to admin group 2022-01-06 10:14:21 -08:00
Mouse Reeve 1d2b6f038a Fixes wording on want-to-read superlative 2022-01-06 10:01:20 -08:00
Mouse Reeve ee1fd05430 Fixes book links 2022-01-06 09:58:46 -08:00
Mouse Reeve ee301afa61 Adds tests for views 2022-01-06 09:55:35 -08:00
Mouse Reeve 0f09759662 Separate out landing and about views files 2022-01-06 09:51:38 -08:00
Mouse Reeve b8c72d75e5 Python formatting 2022-01-06 09:48:36 -08:00
Mouse Reeve 461bfd0ce7 Link to books 2022-01-06 09:47:46 -08:00
Mouse Reeve d690224559 Use weighted averages 2022-01-06 09:39:51 -08:00
Mouse Reeve 840746754d Fixes superlatives 2022-01-06 09:22:10 -08:00
Mouse Reeve 705f6d36a6 Adds admins copy 2022-01-06 09:09:00 -08:00
Mouse Reeve 4caa68200f Adds more info to the about page 2022-01-06 09:04:59 -08:00
Mouse Reeve b855464396 Expands about pages 2022-01-05 21:42:41 -08:00
Mouse Reeve 99a5924ea8 Not bool 2022-01-05 17:36:52 -08:00
Mouse Reeve 2fed188862 Configure email sender from .env file 2022-01-05 17:35:42 -08:00
Mouse Reeve 6168ce91b3
Merge branch 'main' into list-not-loading 2022-01-05 16:33:05 -08:00
Mouse Reeve 69bd9246dd
Merge pull request #1767 from bookwyrm-social/suggested-users-query
Uses single query to get suggested users
2022-01-05 16:19:00 -08:00
Mouse Reeve 0f37e0ad42 Don't try to clear caches for nonexistant authors 2022-01-05 15:55:12 -08:00
Mouse Reeve b0fef8f0e3 Cache landing page 2022-01-05 15:53:01 -08:00
Mouse Reeve 7df99afdc7 Cache status interact buttons 2022-01-05 14:54:51 -08:00
Mouse Reeve 0da0091237 Cache title author snippet 2022-01-05 14:33:10 -08:00
Mouse Reeve 4a43ad95ef Linting on suggested_users 2022-01-05 13:51:34 -08:00
Mouse Reeve ad6d7d5eca Caches suggested books 2022-01-05 13:43:15 -08:00
Mouse Reeve 3cda27577f Removes status content cache 2022-01-05 13:01:53 -08:00
Mouse Reeve 6823d5f1b7 Cache follow button template snippet 2022-01-05 12:59:52 -08:00
Mouse Reeve a5309e9973 Cache status contents 2022-01-05 10:22:25 -08:00
Mouse Reeve d8dbf94c29 Fixes cache syntax 2022-01-05 10:16:49 -08:00
Mouse Reeve 2cad762646 Use in-memory cache for CI tests 2022-01-05 09:51:00 -08:00
Mouse Reeve 66456fc508 Adds test env var 2022-01-05 09:32:10 -08:00
Mouse Reeve e6f7828361 Python formatting 2022-01-05 09:30:54 -08:00
Mouse Reeve bebb2c167e Use redis with password in dev 2022-01-05 08:52:28 -08:00
Mouse Reeve 629140cad4 Adds redis cache backend 2022-01-05 08:27:31 -08:00
Joachim f141777d52 Change thumbnail generation strategy 2022-01-05 11:54:49 +01:00
Mouse Reeve b91649478b Fixes cache value 2022-01-04 18:07:30 -08:00
Mouse Reeve cc4469e7e1 Python formatting 2022-01-04 18:05:26 -08:00
Mouse Reeve 5981575f0e Cache template snipped for shelve buttons 2022-01-04 17:59:35 -08:00
Mouse Reeve c28fbbeb09 Uses single query to get suggested users 2022-01-04 16:33:19 -08:00
Mouse Reeve 1bd813c6f7
Merge pull request #1761 from bookwyrm-social/portuguese
Adds Portuguese locale
2022-01-04 14:45:07 -08:00
Mouse Reeve 96e8839d4b
Merge pull request #1690 from hughrun/group-list-button
add "Create list" form to group template
2022-01-04 14:39:12 -08:00
Mouse Reeve 557acd40ad Fixes locale names 2022-01-04 14:34:22 -08:00
Mouse Reeve 23e498879e Fixes account create tasks 2022-01-04 14:17:14 -08:00
Hugh Rundle 2153afe743 Merge branch 'main' into group-list-button
Hopefully fixes failing tests!
2022-01-05 08:47:01 +11:00
Mouse Reeve 3dd7847d7b Only remove non-public lists on unfollow 2022-01-04 13:46:21 -08:00
Mouse Reeve 77139385c1 Merge branch 'main' into list-not-loading 2022-01-04 13:36:06 -08:00
Mouse Reeve e5c5dd8f98
Merge pull request #1736 from bookwyrm-social/new-modals-bright-futures
Switch old modals to new modals
2022-01-04 13:31:56 -08:00
Mouse Reeve d8c682fb2b Adds Portuguese to the language list 2022-01-04 13:30:08 -08:00
Mouse Reeve 10792125ae Merge branch 'main' into portuguese 2022-01-04 13:28:19 -08:00
Mouse Reeve 160c758ce6 Adds and updates locale files 2022-01-04 13:23:43 -08:00
Mouse Reeve afa713e667 Adds locale to bw-dev update command 2022-01-04 13:23:28 -08:00
Mouse Reeve a5dc6b3d76
Merge pull request #1759 from bookwyrm-social/annual-goal-migration
Uses function to get current year for annual goal default
2022-01-04 13:03:53 -08:00
Mouse Reeve 10a51d9689 Changes how progress input fields are id'ed 2022-01-04 12:53:48 -08:00
Mouse Reeve 8a889e9a69
Merge branch 'main' into list-not-loading 2022-01-04 12:27:41 -08:00
Mouse Reeve 24faa45cc7 Merge branch 'main' into annual-goal-migration 2022-01-04 12:24:34 -08:00
Mouse Reeve abb9686158
Merge pull request #1760 from bookwyrm-social/fragile-test
Updates fragile unit test causing nondeterministic failures
2022-01-04 12:23:30 -08:00
Mouse Reeve cbc8ecb4b3 NotEqual, not False 2022-01-04 11:46:44 -08:00
Mouse Reeve 1ff653ddeb
Merge pull request #1749 from joachimesque/summary-goals
Display completed goal on Annual Summary page
2022-01-04 11:42:47 -08:00
Mouse Reeve 9dd2b88054 Updates fragile unit test causing nondeterministic failures 2022-01-04 11:35:12 -08:00
Mouse Reeve aa1a7189ae Uses function to get current year for annual goal default 2022-01-04 11:02:59 -08:00
Mouse Reeve cccd28cb74
Merge pull request #1726 from joachimesque/options-panels
Front-end: New look and behavior for Filters and Result panels
2022-01-03 09:23:12 -08:00
Hugh Rundle d4acd89a28 Merge branch 'main' into group-list-button 2022-01-03 10:28:59 +11:00
Hugh Rundle ea08b302c9
improve group page layout
- move 'Add list' button down to the group lists
- move member search box underneath members heading
- note about members being able to create lists is now under lists heading
2022-01-03 10:09:52 +11:00
Joachim 6e8a29aebf Update annual_summary.py 2022-01-02 17:52:49 +01:00
Mouse Reeve 0734e5cb62
Merge pull request #1755 from bookwyrm-social/locale-updates
Updates locales
2022-01-02 07:47:24 -08:00
Mouse Reeve dcd1fec695 Updates locales 2022-01-02 07:38:37 -08:00
Mouse Reeve 8c265b1857
Merge pull request #1740 from bookwyrm-social/shelf-dupes
Removes duplicates from all books view
2022-01-02 07:28:50 -08:00
Mouse Reeve 5313b283dd Adds comment 2022-01-02 07:16:46 -08:00
Mouse Reeve 73d6dbab4c
Merge pull request #1752 from hughrun/shelf-selector-fix
only show own shelves in shelf_selector dropdown
2022-01-02 07:14:20 -08:00
Mouse Reeve 49ecd86afe Runs prettier 2022-01-02 07:01:11 -08:00
Mouse Reeve f50294875f
Merge pull request #1748 from joachimesque/handle-modal-buttons-with-fallback
Handle modal component when already active at page load
2022-01-02 06:58:42 -08:00
Hugh Rundle 93d59c33ff
only show own shelves in shelf_selector dropdown 2022-01-02 13:09:40 +11:00
Hugh Rundle 38bd1f46d6
emblacken 2022-01-02 10:19:57 +11:00
Hugh Rundle c73491b05c
Show add list button to group members 2022-01-02 10:06:59 +11:00
Hugh Rundle 045506d6e0
show group lists on group FindUsers page 2022-01-02 10:06:02 +11:00
Hugh Rundle b1fa57d2ca
fix group form ids
Also adds the List form to the group FindUsers view
2022-01-02 09:08:04 +11:00
Mouse Reeve da85df57b2
Merge pull request #1750 from bookwyrm-social/hide-summary-fix
Default to hidden state for local storage visibility toggle
2022-01-01 13:43:25 -08:00
Mouse Reeve 265fd1cb52 Default to hidden state for local storage visibility toggle 2022-01-01 13:09:24 -08:00
Hugh Rundle 8e17e20802
Merge branch 'bookwyrm-social:main' into group-list-button 2022-01-02 07:50:56 +11:00
Joachim fd8423b73c Update annual_summary.py 2022-01-01 21:37:53 +01:00
Joachim 29b688b68d Update annual_summary.py 2022-01-01 21:32:30 +01:00
Joachim 864b731cfa remove testing line 2022-01-01 21:30:13 +01:00
Joachim 358aa142b2 Display completed goal on Annual Summary page 2022-01-01 21:28:14 +01:00
Joachim e1642561ec Fix search panel validation error 2022-01-01 18:48:53 +01:00
Joachim b7eb285f7b Handle modal when it is active on page load 2022-01-01 18:18:23 +01:00
Joachim cc05e30605 Remove duplicate code 2022-01-01 18:17:11 +01:00
Mouse Reeve cb3d224a5b
Merge pull request #1739 from bookwyrm-social/notification-link
Don't do fancy javascript clicks on the notification page
2022-01-01 08:41:00 -08:00
Mouse Reeve 653970054c
Merge pull request #1745 from bookwyrm-social/goal-status
Fixes display for goal statuses
2022-01-01 07:02:27 -08:00
Mouse Reeve 28fed2c6ae Fixes display for goal statuses 2022-01-01 06:52:13 -08:00
Mouse Reeve 3c1552d435
Merge pull request #1738 from bookwyrm-social/reading-modals
Refactors reading modals
2021-12-31 10:40:17 -08:00
Mouse Reeve 30bf84fe7b Adds aria-described-by to modal component 2021-12-31 10:39:18 -08:00
Mouse Reeve 31be6de665 Python formatting 2021-12-30 20:23:22 -08:00
Mouse Reeve 2cc9e3bbca Removes duplicates from all books view 2021-12-30 20:14:49 -08:00
Mouse Reeve 8d72169bbd Don't do fancy javascript clicks on the notification page 2021-12-30 19:48:47 -08:00
Mouse Reeve 2f4899dc1f Remove old modal, new modal is our best friend now 2021-12-30 19:19:55 -08:00
Mouse Reeve 48d3b4bf58 Merge branch 'new-modals-bright-futures' into reading-modals 2021-12-30 19:16:46 -08:00
Mouse Reeve d4e24227df Updates shelve button menu options 2021-12-30 19:15:36 -08:00
Mouse Reeve ed93eda18d Adds preventDefault to modal js 2021-12-30 19:09:03 -08:00
Mouse Reeve 8ad75084de Force state for active modal 2021-12-30 18:56:37 -08:00
Mouse Reeve e3321c9bad Updates buttons to call modals in shelve buttons 2021-12-30 18:42:38 -08:00
Mouse Reeve 5f3a5c87b6 Update report modal 2021-12-30 18:37:49 -08:00
Mouse Reeve a576b128c3 Updates reading modals 2021-12-30 18:06:33 -08:00
Mouse Reeve 65c719d2d4 Move readthrough delete modal into books dir 2021-12-30 17:49:41 -08:00
Mouse Reeve 7af4af278d Readthrough delete modal 2021-12-30 17:48:09 -08:00
Mouse Reeve c6b5ecc418 Updates delete group modal 2021-12-30 17:29:06 -08:00
Mouse Reeve 57ce894667 Updates book sync modals 2021-12-30 14:19:31 -08:00
Mouse Reeve 472c003293 Merge branch 'main' into list-not-loading 2021-12-30 14:09:04 -08:00
Mouse Reeve 0031a63511 Updates add cover modal 2021-12-30 14:07:30 -08:00
Mouse Reeve 4400c62274 Adds sync modal for inventaire 2021-12-30 13:38:35 -08:00
Mouse Reeve 82ea04f247 Uses new modals for author sync 2021-12-30 13:37:07 -08:00
Mouse Reeve d60684e08e
Merge pull request #1735 from bookwyrm-social/lists-markup
Cleans up html on list and list curate page
2021-12-30 13:33:37 -08:00
Mouse Reeve c16312b068 Python formatting 2021-12-30 13:21:38 -08:00
Mouse Reeve 04476d253e Uses new modal component for delete list modal 2021-12-30 13:18:06 -08:00
Mouse Reeve 80f7c253de Improves list curate page test 2021-12-30 12:55:40 -08:00
Mouse Reeve 1e879f66ac Simplify decorators in list curate view 2021-12-30 12:45:47 -08:00
Mouse Reeve ec0b1e8cc3 Switches position of list delete and save buttons 2021-12-30 12:38:36 -08:00
Mouse Reeve 821e579a39 Refactors list curate page 2021-12-30 12:34:21 -08:00
Mouse Reeve b090490cd9 Revert test of add list on create command 2021-12-30 12:06:22 -08:00
Mouse Reeve cc37d7404e Fixes calls to add lists 2021-12-30 11:58:27 -08:00
Mouse Reeve 4de406afe1 Some tests fixes 2021-12-30 11:07:04 -08:00
Mouse Reeve 975ef7d38e Merge branch 'main' into list-not-loading 2021-12-30 10:44:23 -08:00
Mouse Reeve 906e0c9c7c Renames function for loading lists 2021-12-30 10:40:26 -08:00
Mouse Reeve f993195752
Merge pull request #1725 from joachimesque/book-page-cover-show-modal
Front-end: On book page, click on cover to show/add image
2021-12-30 09:29:43 -08:00
Mouse Reeve 3d808a0122
Merge pull request #1734 from joachimesque/summary-book-grid-fixes
Fix: Display a denser summary book grid and limit big books
2021-12-30 09:25:54 -08:00
Joachim dabd1e919d Fix: Display a denser summary book grid and limit big books
Closes #1731
2021-12-30 12:01:28 +01:00
Joachim cd89271724 Apply review suggestions 2021-12-30 10:43:23 +01:00
Mouse Reeve 9f6918767b Corrects documentation on sort order 2021-12-29 17:41:31 -08:00
Mouse Reeve 2640c26bb1 Fixes wording in comments 2021-12-29 17:39:14 -08:00
Mouse Reeve 1d1ef6589a
Merge pull request #1730 from bookwyrm-social/locales
Updates locales with new translations
2021-12-29 16:20:40 -08:00
Mouse Reeve a9ff23ece0 Fixes nondeterministic test failure 2021-12-29 13:44:04 -08:00
Mouse Reeve cefd0e4d5d
Merge pull request #1728 from joachimesque/summary-feed-panel-smol-fix
Front-end: Update Feed summary card style
2021-12-29 13:41:53 -08:00
Mouse Reeve e1ab346418 Updates locales with new translations 2021-12-29 13:34:38 -08:00
Mouse Reeve b43b3a26c7
Merge pull request #1729 from bookwyrm-social/templatetag-tests
Templatetag tests
2021-12-29 13:15:42 -08:00
Mouse Reeve b1687f5cac Adds another test 2021-12-29 13:03:23 -08:00
Mouse Reeve 4b8daf6874
Merge branch 'main' into group-list-button 2021-12-29 12:52:24 -08:00
Joachim ce679cec75 Update bookwyrm.css 2021-12-29 21:45:36 +01:00
Mouse Reeve d89c7a3617
Merge pull request #1727 from bookwyrm-social/feed-template-tests
HTML validation fixes
2021-12-29 12:42:22 -08:00
Mouse Reeve 18213e2d24 Moves tests into separate files 2021-12-29 12:42:02 -08:00
Joachim f204cff42b Fix filter panel validation error 2021-12-29 21:40:16 +01:00
Mouse Reeve 0ae6d5e708 Renames templatetags test file 2021-12-29 12:33:42 -08:00
Mouse Reeve 9e5707a9e1 Move templatetags test file into subdirectory 2021-12-29 12:31:42 -08:00
Mouse Reeve 7623168410 Fixes search html
And suppresses more warnings
2021-12-29 12:26:40 -08:00
Mouse Reeve 65e59e7b56 Validate search page html 2021-12-29 11:52:32 -08:00
Mouse Reeve af63c9c187 Line breaks, why not 2021-12-29 11:52:14 -08:00
Mouse Reeve 0968802fd3 Adds alt tag to logo 2021-12-29 11:45:17 -08:00
Mouse Reeve 6075a88438 Validate html in get started views tests 2021-12-29 11:45:07 -08:00
Joachim 383f9fa228 Front-end: Update Feed summary card style
Now the header's background is contained by the border-radius
2021-12-29 20:41:11 +01:00
Mouse Reeve e48d2c35ee Unqiue form names on list items 2021-12-29 11:38:53 -08:00
Mouse Reeve 3e550a13ad Unique names for shelve forms 2021-12-29 11:31:26 -08:00
Mouse Reeve 4e1b155c6c Encode characters in iframe copy text 2021-12-29 11:21:21 -08:00
Joachim a001dabc52 Fix validation (︺︹︺) 2021-12-29 20:21:06 +01:00
Joachim 0c2997e562 Curlylint fixes 2021-12-29 20:16:53 +01:00
Mouse Reeve 8e89d02093 Fixes html form for editing lists 2021-12-29 11:11:09 -08:00
Joachim c53b5c306f Lint fix 2021-12-29 20:03:07 +01:00
Joachim 4cb520f242 Front-end: New look and behavior for Filters and Result panels 2021-12-29 19:50:32 +01:00
Mouse Reeve 3770713e07 Validate html in discover page tests 2021-12-29 10:44:04 -08:00
Mouse Reeve 1e27b64af4 Valid dl html syntax on announcement page 2021-12-29 10:39:47 -08:00
Mouse Reeve 161532f8a8 Adds validate_html to announcement page tests 2021-12-29 10:37:21 -08:00
Mouse Reeve 9facaf404f Validates html in feed views 2021-12-29 10:20:54 -08:00
Mouse Reeve 0dcd7bee10
Merge pull request #1715 from bookwyrm-social/summary-queries
Simplifies query for earliest year
2021-12-29 10:17:52 -08:00
Mouse Reeve 41fb44a46a Python formatting 2021-12-29 10:07:27 -08:00
Mouse Reeve f9e9dc55d5 Updates tests 2021-12-29 09:58:42 -08:00
Joachim faa52503a3 Update bookwyrm.css 2021-12-29 18:57:45 +01:00
Joachim 3b0096caf0 Add button overlay 2021-12-29 18:55:02 +01:00
Mouse Reeve 6ca57ae314 Linter fixes 2021-12-29 09:43:06 -08:00
Mouse Reeve 7eb8d027c4
Merge pull request #1722 from cincodenada/no-more-fedireads-main
Remove last traces of fedireads, but in main
2021-12-29 09:32:43 -08:00
Joachim 6952ab0081 Solve markup validation issues 2021-12-29 17:10:44 +01:00
Joachim e5f3e9cd2c fix curlylint issue 2021-12-29 17:00:40 +01:00
Joachim 3de2396cb8 Update cover_show_modal.html 2021-12-29 16:45:36 +01:00
Joachim 87ab665583 fix for editorConfig linting 2021-12-29 16:43:38 +01:00
Joachim e5bca3873c Remove useless additoins 2021-12-29 16:41:14 +01:00
Joachim f12ba8609f Front-end: On book page, click on cover to show/add image
Closes #1009
2021-12-29 16:40:19 +01:00
Mouse Reeve 0c0bfc046d
Merge pull request #1723 from bookwyrm-social/dependabot/pip/django-3.2.10
Bump django from 3.2.5 to 3.2.10
2021-12-28 17:06:37 -08:00
dependabot[bot] 49ee040241
Bump django from 3.2.5 to 3.2.10
Bumps [django](https://github.com/django/django) from 3.2.5 to 3.2.10.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.5...3.2.10)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-29 00:54:20 +00:00
Joel Bradshaw 66df16eb78 Fix typo while we're here 2021-12-28 16:49:34 -08:00
Joel Bradshaw 9d1db3f67c Remove last traces of fedireads 2021-12-28 16:49:32 -08:00
Mouse Reeve 934a202738
Merge pull request #1683 from bookwyrm-social/prettier
Adds Prettier javascript formatter
2021-12-28 16:41:45 -08:00
Mouse Reeve 49e0f9437e Merge branch 'main' into prettier 2021-12-28 16:30:06 -08:00
Mouse Reeve 4b3d2e87a6
Merge pull request #1633 from joachimesque/tidy-header
Front-end: New modal component + header alignment
2021-12-28 16:24:27 -08:00
Mouse Reeve c34c53b672
Merge pull request #1720 from bookwyrm-social/server-errors
Various fixes for server errors that popped up on bookwyrm.social
2021-12-28 16:12:30 -08:00
Mouse Reeve 5b75f3d310 Avoid clash with existing test data user 2021-12-28 16:02:48 -08:00
Mouse Reeve 6745cd73cc Deterministic ordering for OL import test 2021-12-28 15:53:35 -08:00
Mouse Reeve a8ae427aeb Updates domain regex 2021-12-28 15:53:26 -08:00
Mouse Reeve 14a90e805a Test users with domains that contain dashes 2021-12-28 15:52:35 -08:00
Mouse Reeve 1a30546b99 Adds test for dm view with partner 2021-12-28 15:44:47 -08:00
Mouse Reeve 5b192d1b3d Fixes error when librarything csv is missing isbn 2021-12-28 15:27:35 -08:00
Mouse Reeve a58d600030 Adds librarything line without isbn to test data 2021-12-28 15:22:02 -08:00
Mouse Reeve 21e0f4234e Don't try to create a json view of the all books page
It's a fake view, a liar
2021-12-28 15:04:25 -08:00
Mouse Reeve 3f8e309680 Adds test for json requests to all books view 2021-12-28 15:04:06 -08:00
Mouse Reeve 14601a0c31 Don't error out on invalid login POST
Thanks, log4j exploit scanners, for catching this one
2021-12-28 14:50:28 -08:00
Mouse Reeve 638ea166be More trailing slashes in urls 2021-12-28 14:41:45 -08:00
Mouse Reeve f62cd5fd12 Makes embed key non-optional in urls 2021-12-28 14:40:11 -08:00
Mouse Reeve 0422421d60 Fixes bug in logged out group view 2021-12-28 14:33:30 -08:00
Mouse Reeve 8a3be920c6 Adds test for logged out view of group 2021-12-28 14:29:51 -08:00
Mouse Reeve ec7c1e75fe
Merge pull request #1714 from joachimesque/handle-user-at-urls
Redirect /@<username> to /user/<username>
2021-12-28 13:19:46 -08:00
Mouse Reeve c3ec25dbf8 Simplifies query for earliest year 2021-12-28 13:02:12 -08:00
Joachim 17cb936a16 Update test_user.py 2021-12-28 21:54:06 +01:00
Joachim 5284e7009d fix pylint remark 2021-12-28 21:51:45 +01:00
Joachim cae4934b48 Apply review suggestion 2021-12-28 21:49:52 +01:00
Joachim 05142f4b73 Add test 2021-12-28 21:49:41 +01:00
Mouse Reeve a06e1e37c9
Merge pull request #1712 from bookwyrm-social/plurals
Adds more plurals to summary translation
2021-12-28 12:44:44 -08:00
Joachim ff3021d1f3 Redirect /@<username> to /user/<username> 2021-12-28 21:40:01 +01:00
Mouse Reeve faafcbebd7 Fixes calls to counter 2021-12-28 12:26:57 -08:00
Mouse Reeve f4f3659c6f Updates locales 2021-12-28 12:25:01 -08:00
Mouse Reeve d974e251f1 Adds more plurals to summary translation 2021-12-28 12:05:32 -08:00
Mouse Reeve 4159776771
Merge pull request #1710 from joachimesque/summary-images-fixes
Summary images fixes
2021-12-28 12:00:38 -08:00
Joachim b26d41cefc Update bookwyrm.css 2021-12-28 17:59:01 +01:00
Joachim b6e90ce2b2 Fix grid on mobile 2021-12-28 17:58:10 +01:00
Joachim 9e0ebc3ec7 Fix hardcoded year in translation key 2021-12-28 17:40:33 +01:00
Joachim b2f6c61bb6 Slightly better quality images 2021-12-28 17:40:13 +01:00
Mouse Reeve daa3a1ee77
Merge pull request #1708 from bookwyrm-social/summary-mobile
Tweaks mobile view for annual summary
2021-12-28 07:25:44 -08:00
Mouse Reeve 38d4172e2c
Merge pull request #1707 from bookwyrm-social/locale_updates
Adds annual review translations for Galician and Spanish
2021-12-28 07:18:21 -08:00
Mouse Reeve d67150fb7f Tweaks mobile view for annual summary 2021-12-28 07:16:33 -08:00
Mouse Reeve 86e8d36b25 Adds annual review translations for Galician and Spanish 2021-12-28 07:02:52 -08:00
Mouse Reeve d0e44f1ee4
Merge pull request #1706 from joachimesque/summary-list-bugfixes
Fixes: Annual summary book list
2021-12-28 06:59:24 -08:00
Joachim 3a015062ec Reverse sorting order 2021-12-28 10:49:09 +01:00
Joachim 489c827673 fix sizes 2021-12-28 10:29:35 +01:00
Joachim 8fd0d5baf0 Fix images stretch 2021-12-28 10:18:40 +01:00
Mouse Reeve 0dde5d4a4b
Merge pull request #1705 from bookwyrm-social/annual-ids
Use readthroughs only to determine books read this year
2021-12-27 14:56:32 -08:00
Mouse Reeve b35cc90be6
Merge pull request #1704 from bookwyrm-social/summary-strings
Adds translation strings for summary page
2021-12-27 14:51:30 -08:00
Mouse Reeve b99ff9ef85 Removes unused import 2021-12-27 14:49:48 -08:00
Mouse Reeve a064333a96 Use readthroughs only to determine books read this year 2021-12-27 14:45:11 -08:00
Mouse Reeve 66d5f16f82
Merge pull request #1703 from bookwyrm-social/hide-annual-summary
Hide annual summary
2021-12-27 14:32:53 -08:00
Mouse Reeve 90c321caae Adds translation strings for summary page
Plus locale updates
2021-12-27 14:27:37 -08:00
Mouse Reeve e6b15f25eb Fixes variable name 2021-12-27 14:22:09 -08:00
Mouse Reeve 3cddd69274 Option to hide the annual summary card 2021-12-27 14:12:57 -08:00
Mouse Reeve 1be164425a Merge branch 'main' into prettier 2021-12-27 13:39:34 -08:00
Mouse Reeve 2345845560
Merge pull request #1692 from joachimesque/summary-review-sharing
Feature: Annual summary sharing
2021-12-27 13:37:59 -08:00
Mouse Reeve ed3ae0940b
Merge pull request #1701 from bookwyrm-social/annual-summary-tweaks
Adds minor changes to null states for annual summary
2021-12-27 13:31:57 -08:00
Mouse Reeve 85486dcfad
Update bookwyrm.css 2021-12-27 13:29:47 -08:00
Mouse Reeve 5afd59f4d4
Merge branch 'main' into summary-review-sharing 2021-12-27 13:19:15 -08:00
Mouse Reeve a96466bf35 Adds minor changes to null states for annual summary 2021-12-27 13:16:27 -08:00
Mouse Reeve c85f881f97
Merge pull request #1691 from joachimesque/2021-in-the-books
Feature: Create annual summary page
2021-12-27 13:15:54 -08:00
Mouse Reeve e1614a52ac
Merge pull request #1700 from bookwyrm-social/locales
Locale updates
2021-12-27 13:03:43 -08:00
Mouse Reeve ae2d869fa9
Merge pull request #1695 from joachimesque/fix-text-right-on-shelf-modal
Fix: Fix modal alignment in Shelf page
2021-12-27 13:02:33 -08:00
Mouse Reeve 935cca2dd7
Merge pull request #1689 from joachimesque/details-fixes
Front-end: Fix Safari details display and enhance dropdown on mobile
2021-12-27 13:00:29 -08:00
Mouse Reeve a148f0e2be
Merge pull request #1686 from cincodenada/sync-s3
Adds sync_media_to_s3 command
2021-12-27 12:48:25 -08:00
Mouse Reeve 38c132e251
Merge pull request #1684 from bookwyrm-social/remove-checkall
Removes check_all javascript that is no longer used
2021-12-27 12:47:21 -08:00
Mouse Reeve 119a030aab Locale updates 2021-12-27 12:44:22 -08:00
Mouse Reeve 76694bb891 Demo for file type 2021-12-27 12:42:24 -08:00
Mouse Reeve 3d07618b5f Styling for autocomplete box 2021-12-27 12:42:11 -08:00
Mouse Reeve e2d1c987b5 Adds autocomplete scrip 2021-12-27 12:41:42 -08:00
Joachim cc7f1ef73d Fix: Fix modal alignment in Shelf page 2021-12-22 20:03:13 +01:00
Joachim 5314681641 Update layout.html 2021-12-22 19:47:39 +01:00
Joachim df7b40359a Add translation calls 2021-12-22 18:15:20 +01:00
Joachim 07f2d9a11c Update tests 2021-12-22 18:15:05 +01:00
Joachim b03b6f6d6f Add docstring 2021-12-22 17:14:21 +01:00
Joachim b9265bdd29 Update annual_summary.py 2021-12-22 17:10:47 +01:00
Joachim 04d51cde3f pylint 2021-12-22 17:09:12 +01:00
Joachim d4b8aa51f6 lint styles 2021-12-22 16:55:02 +01:00
Joachim 13ee7e7a65 Use readthrough finish date instead of shelving date 2021-12-22 16:53:10 +01:00
Joachim 357eddf16e Limit page availability to earliest completed readthrough / shelving 2021-12-22 16:52:42 +01:00
Joachim 8de2bca2c5 Add + adjust text copy component 2021-12-22 15:13:42 +01:00
Joachim 45dd39d370 Add key creation/revocation 2021-12-22 15:12:56 +01:00
Joachim af9c983145 Change voice for no read book 2021-12-22 15:11:55 +01:00
Joachim 1022e3e165 Add basic key verification and change voice in template 2021-12-22 15:11:05 +01:00
Joachim 24b0e086e7 Add summary_keys JSONField for the user 2021-12-22 14:57:26 +01:00
Joachim ce9c6f1727 Color links in green 2021-12-22 14:54:36 +01:00
Joachim 13d668e49e Color links in green 2021-12-22 14:53:34 +01:00
Joachim 0da0a62660 Don't crash if there's no ratings 2021-12-22 11:18:47 +01:00
Joachim 6308625bab Don't crash if there's no ratings 2021-12-22 11:18:26 +01:00
Joachim 67092fd3e3 🤦 2021-12-22 10:27:59 +01:00
Joachim ce8bb306a3 🤦 2021-12-21 17:35:57 +01:00
Joachim 73551f1602 Fix tests? 2021-12-21 17:24:44 +01:00
Joachim 66ee5ccacf Fix tests? 2021-12-21 17:24:15 +01:00
Joachim 8f0df388e6 Update test_annual_summary.py 2021-12-21 15:57:58 +01:00
Joachim 37abf9531d fix test 2021-12-21 15:55:51 +01:00
Joachim c13e7479c3 Add tests 2021-12-21 14:44:21 +01:00
Joachim b7545bf0dd Style fixes 2021-12-21 13:50:05 +01:00
Joachim 545fb9e4be disable no-self-use 2021-12-21 13:17:18 +01:00
Joachim 581e7f3e40 R0914 & R0201 2021-12-21 12:22:40 +01:00
Joachim 7e9c7ce9e3 Improve pylint 2021-12-21 12:12:32 +01:00
Joachim d9bd7be1ec same 2021-12-21 12:06:57 +01:00
Joachim 7c9995a5e5 Fix EditorConfig linting 2021-12-21 12:02:57 +01:00
Joachim da51711ddf black 2021-12-21 11:58:46 +01:00
Joachim 4d6c4d3ad2 Add rounding for averages 2021-12-21 11:54:20 +01:00
Joachim c2c57db8e6 Fix for empty years 2021-12-21 11:52:33 +01:00
Joachim 1fd44aeb5c Style fixes 2021-12-21 11:43:45 +01:00
Joachim ce6ca49620 Add link to current summary on home feed 2021-12-21 11:43:39 +01:00
Joachim a8e8785106 Add previous/next year links 2021-12-21 11:43:09 +01:00
Joachim a24afdb6bf Use aggregate queries 2021-12-21 10:21:30 +01:00
Joachim b2f3f03197 Lint style 2021-12-20 23:40:53 +01:00
Joachim 8d64b2d55e Add serif styles 2021-12-20 23:38:18 +01:00
Joachim c1459dbcf9 Feature: Create annual summary page 2021-12-20 23:37:45 +01:00
Hugh Rundle 1603df0817
add "Create list" form to group template 2021-12-19 14:19:35 +11:00
Joachim 89713ce685 same but for js 2021-12-17 20:53:06 +01:00
Joachim b15e0e37fc same 2021-12-17 20:51:41 +01:00
Joachim 9a2a31028b fix linting issues 2021-12-17 20:50:04 +01:00
Joachim 355405daa3 Front-end: Fix Safari details display and enhance dropdown on mobile 2021-12-17 20:40:58 +01:00
Joachim df8427921b Add alignment rule for button reset 2021-12-17 17:34:22 +01:00
Joachim f88b511bbf Update bookwyrm.css 2021-12-17 17:32:44 +01:00
Joachim ce0e2eb61a Handle navbar alignment thank to Bulma helper classes 2021-12-17 17:30:14 +01:00
Joachim f300104c4d Add reset button style 2021-12-17 17:29:46 +01:00
Joachim 2544ea12c7 Revert changes on layout 2021-12-17 17:00:10 +01:00
Joel Bradshaw faffbdce21 Fix spacing 2021-12-16 23:44:47 -08:00
Joel Bradshaw 37a7899f6f Consistently quote $@, check for argument
Also add $@ to a couple commands, and add a check for the argument to
the CORS command since it's required
2021-12-16 23:41:58 -08:00
Joel Bradshaw 8eb340945b Add sync_media_to_s3 command
This is useful if the copy gets aborted, or to sync over remnants
generated between the copy and the switchover to S3
2021-12-16 23:40:40 -08:00
Mouse Reeve 8bda0bc0dc Removes check_all javascript that is no longer used 2021-12-16 11:06:53 -08:00
Mouse Reeve 2b6c9d9d31 Runs prettier 2021-12-16 10:53:38 -08:00
Mouse Reeve 34a16667d8 Adds github workflow 2021-12-16 10:47:22 -08:00
Mouse Reeve 2fa1aa4cc7 Adds bw-dev command 2021-12-16 10:43:24 -08:00
Mouse Reeve ea457eae58 Adds prettier package 2021-12-16 10:40:20 -08:00
Mouse Reeve 5d47f33972 Tick version number 2021-12-16 10:29:08 -08:00
Mouse Reeve 400417c79f Fixes form 2021-12-16 10:15:32 -08:00
Mouse Reeve 2f47284c77 Removes outdated code 2021-12-16 09:12:00 -08:00
Mouse Reeve 0629fce171 Fixes post test 2021-12-15 17:25:20 -08:00
Mouse Reeve 5c99f142f9 Serialize links for books 2021-12-15 17:12:53 -08:00
Mouse Reeve 86b294afd7 Re-structures link models 2021-12-15 16:23:21 -08:00
Mouse Reeve af8cb51325 Adds view tests 2021-12-15 13:58:29 -08:00
Mouse Reeve ed7d8e5501 Removed unused import 2021-12-15 13:39:20 -08:00
Mouse Reeve 322bb909fc Better mobile display 2021-12-15 13:35:10 -08:00
Mouse Reeve d911e2c6db Cleans up sidebar html 2021-12-15 13:23:25 -08:00
Mouse Reeve 5ed5d5d222 Don't show cancel button in static mode 2021-12-15 13:21:08 -08:00
Mouse Reeve c8e038cd4e Adds form errors 2021-12-15 13:20:05 -08:00
Mouse Reeve dcf5694b66 Use class view 2021-12-15 13:15:51 -08:00
Mouse Reeve cc3db31db9 Adds noscript fallback for links modal 2021-12-15 13:11:49 -08:00
Mouse Reeve 4f576b77a0 Use urlfield 2021-12-15 12:46:10 -08:00
Mouse Reeve 1d6b200172 Modal to add link 2021-12-15 12:40:25 -08:00
Mouse Reeve 40d1beee20 Adds links to activitypub spec 2021-12-15 10:56:49 -08:00
Mouse Reeve c6bdc34499 Updates migration 2021-12-15 10:20:00 -08:00
Mouse Reeve a4859668b8 Merge branch 'main' into book-file-links 2021-12-15 10:05:29 -08:00
Mouse Reeve c3a32b3a54
Merge branch 'main' into tidy-header 2021-12-15 10:02:36 -08:00
Mouse Reeve f7c6cb3598
Merge pull request #1677 from nycterent/fix/sample-config
removing quotes as they are interpreted as part of a value
2021-12-15 09:59:04 -08:00
Mouse Reeve 5e932711f9 Merge branch 'main' into list-not-loading 2021-12-15 09:56:33 -08:00
Mouse Reeve f5b7fcd0c7
Merge pull request #1680 from bookwyrm-social/openlibrary-import
Support csv import from Openlibrary
2021-12-14 20:00:55 -08:00
Mouse Reeve e6d500df6b Removes debugging print statements 2021-12-14 19:52:43 -08:00
Mouse Reeve 6ba5d53d38 trying item.last instead of going by list lookup 2021-12-14 19:46:35 -08:00
Mouse Reeve 69204a1c94 More print statements 2021-12-14 19:38:28 -08:00
Mouse Reeve 6af2182879 Test print statements 2021-12-14 19:20:29 -08:00
Mouse Reeve 8cb2e74c81 Uncomment test 2021-12-14 19:05:45 -08:00
Mouse Reeve 778027688a
Merge pull request #1681 from bookwyrm-social/locale-updates
Updates locales
2021-12-14 19:01:19 -08:00
Mouse Reeve 7ce1d8cd1a Updates locales 2021-12-14 18:53:53 -08:00
Mouse Reeve 86fcaad72c Comments out failing test 2021-12-14 18:47:17 -08:00
Mouse Reeve 3545085a7d Fixes tests 2021-12-14 14:19:27 -08:00
Mouse Reeve 09f5218f9c Fixes accept header 2021-12-14 13:47:09 -08:00
Mouse Reeve a33b5b054f Retain source on retry jobs 2021-12-14 13:14:45 -08:00
Mouse Reeve 73ea44e532 Add openlibrary selector to list 2021-12-14 12:59:24 -08:00
Mouse Reeve ba390dc3ad Safer user of "lower" 2021-12-14 12:50:53 -08:00
Mouse Reeve bee3c86223 Lookup by openlibrary key 2021-12-14 12:49:00 -08:00
Mouse Reeve 4f1d4d9bc0 Adds openlibrary keys to data 2021-12-14 12:42:56 -08:00
Mouse Reeve bb69c32a6c Adds support for openlibrary csv shelf name format 2021-12-14 11:58:56 -08:00
Mouse Reeve 79af354dfd Don't produce error is author is unset in import 2021-12-14 11:27:13 -08:00
Mouse Reeve 65ec626573 Don't trim stream if max length is unset 2021-12-14 11:11:05 -08:00
Mouse Reeve 0012f4464d Consider group membership for list cache 2021-12-14 11:07:36 -08:00
Mouse Reeve 3358e45086 Updates mocks on list stream tasks 2021-12-14 09:31:57 -08:00
Mouse Reeve 3d6266cca2 Merge branch 'main' into list-not-loading 2021-12-14 09:17:00 -08:00
Martynas Sklizmantas 6e0f322d12 removing quotes as they are interpreted as part of a value 2021-12-12 10:53:55 +02:00
Mouse Reeve fec1827302
Merge pull request #1672 from bookwyrm-social/unused-view
Removes unused groups view
2021-12-10 15:56:44 -08:00
Mouse Reeve 288c396c49 Removes test line 2021-12-10 13:45:50 -08:00
Mouse Reeve 3fb9d140ed Fixes typo in test 2021-12-10 13:39:41 -08:00
Mouse Reeve d28b22a361 Adds test for generated links in book model 2021-12-10 13:33:00 -08:00
Mouse Reeve a3d5acc70c Model name in comment 2021-12-10 12:46:40 -08:00
Mouse Reeve cfd0d0d56a Pylint changes for group model tests 2021-12-10 12:32:53 -08:00
Mouse Reeve 8d6059ae32 Fixes mocks on group model tests 2021-12-10 12:32:05 -08:00
Mouse Reeve 00fdca681f Fixes retry test 2021-12-10 12:16:33 -08:00
Mouse Reeve 5430e389d9 Adds group accept and reject tests 2021-12-10 12:10:58 -08:00
Mouse Reeve 73e09f8d18 Use transaction decorator on group accept 2021-12-10 12:03:18 -08:00
Mouse Reeve 08a8f37a0b Simpler error states for when model values aren't found 2021-12-10 12:02:57 -08:00
Mouse Reeve 3aebb54feb Adds remove member tests 2021-12-10 11:53:10 -08:00
Mouse Reeve 9f04919bec Remove unrelated tests changes
these will happen elsewhere
2021-12-10 11:44:38 -08:00
Mouse Reeve d546d9dce9 Changes spacing on import method 2021-12-10 11:43:13 -08:00
Mouse Reeve 10c74d0619 Additional import tests 2021-12-10 11:41:54 -08:00
Mouse Reeve 7a547d9a1a Adds more groups tests 2021-12-10 11:21:11 -08:00
Mouse Reeve b890e93533 Adds saved list view test 2021-12-10 09:55:50 -08:00
Mouse Reeve f7c8a550cf Fixes references to populate lists task 2021-12-10 09:34:17 -08:00
Mouse Reeve 94250dab42 Mocks for list signals tests 2021-12-10 09:19:32 -08:00
Mouse Reeve 59e6b67bc8 Activitystreams mocks 2021-12-09 20:38:44 -08:00
Mouse Reeve 0c193b6ce1 ActivityStream mocks 2021-12-09 20:33:11 -08:00
Mouse Reeve 5e6b28bbc0 Prefs mocks 2021-12-09 20:30:53 -08:00
Mouse Reeve acde30887d Importer tests 2021-12-09 20:12:06 -08:00
Mouse Reeve 936f045344 Adds resolve book view test 2021-12-09 19:36:12 -08:00
Mouse Reeve d9d0919ad4 More mocks for more tests 2021-12-09 19:14:10 -08:00
Mouse Reeve 234d44b5c7 Adds delete test 2021-12-09 19:00:48 -08:00
Mouse Reeve 9c86bb1bc3 Removes invalid render 2021-12-09 18:54:15 -08:00
Mouse Reeve 23842f7501 Test for followers api view 2021-12-09 18:46:24 -08:00
Mouse Reeve b57aa4c9d3 Fixes redirect 2021-12-09 18:42:09 -08:00
Mouse Reeve cf275d0c59 Removes unused groups view 2021-12-09 18:38:05 -08:00
Mouse Reeve 074c2cfb95 Gets updates view to 100% test coverage 2021-12-09 18:16:34 -08:00
Mouse Reeve 2d63bfb791 Updates views tests 2021-12-09 18:02:59 -08:00
Mouse Reeve 93dbe2daa0 Updates inbox tests 2021-12-09 15:02:53 -08:00
Mouse Reeve 7a89552892 Updates test_* tests 2021-12-09 13:02:23 -08:00
Mouse Reeve eb4a399472 Updates models tests 2021-12-09 12:43:09 -08:00
Mouse Reeve fe56402b69
Merge pull request #1670 from bookwyrm-social/locale-updates
Locale updates
2021-12-09 11:22:27 -08:00
Mouse Reeve e9c58295f3 Merge branch 'main' into list-not-loading 2021-12-09 11:10:26 -08:00
Mouse Reeve ee0485a8d5 Locale updates 2021-12-09 11:07:22 -08:00
Mouse Reeve 6e61e4d52c
Merge pull request #1578 from bookwyrm-social/improve-compatibility
Improve federation compability with Hubzilla and Zap
2021-12-09 11:06:04 -08:00
Mouse Reeve 2ffddeaa1f
Merge pull request #1647 from joachimesque/list-embed
List embed
2021-12-09 10:53:16 -08:00
Joachim 5b09035690 Update i18n messages 2021-12-08 16:42:49 +01:00
Joachim 5b8c1bde89 Merge branch 'main' into list-embed 2021-12-08 16:40:15 +01:00
Joachim 793ce4d33b Remove query in view response 2021-12-08 16:39:43 +01:00
Mouse Reeve 7e7af792ca
Merge pull request #1667 from bookwyrm-social/new-copy
Adds strings for load data feature
2021-12-07 14:33:26 -08:00
Mouse Reeve 14452dcccf Adds strings for load data feature
Plus, updated locales
2021-12-07 14:20:24 -08:00
Mouse Reeve 142616b996
Merge pull request #1660 from bookwyrm-social/update-from-remote
Button to manually load remote data for editions and authors
2021-12-07 14:11:06 -08:00
Mouse Reeve 4248c23c49 Test loading ISNI from openlibrary 2021-12-07 13:58:23 -08:00
Mouse Reeve 6ee1a628b0 inventaire remote id test 2021-12-07 13:53:25 -08:00
Mouse Reeve b6071da3fc Connector tests 2021-12-07 13:48:22 -08:00
Mouse Reeve 31883a9f7c Linting fixes 2021-12-07 13:08:25 -08:00
Mouse Reeve cf26f48d5c Adds view tests 2021-12-07 13:05:31 -08:00
Mouse Reeve e500f53125 Sync button for books 2021-12-07 12:47:33 -08:00
Mouse Reeve 4973e0a010 Adds confirm modal for loading data 2021-12-07 12:32:17 -08:00
Mouse Reeve 7dbb9b4b26 Cleans up styling on author page
Better mobile display, trim long text blocks
2021-12-07 11:33:44 -08:00
Mouse Reeve 85ab679b68
Merge pull request #1663 from bookwyrm-social/locale-updates
Loads new translation strings and adds remote follow text
2021-12-07 10:17:02 -08:00
Mouse Reeve c178c4de80 Loads new translation strings and adds remote follow text 2021-12-07 09:39:46 -08:00
Mouse Reeve 857bc6adae
Merge pull request #1635 from hughrun/remote-follow
Remote follow
2021-12-06 14:36:21 -08:00
Mouse Reeve 8680fde2b8
Merge pull request #1661 from bookwyrm-social/revert-1656
Revert "Fixes alignment of search bpx and login form"
2021-12-06 13:37:25 -08:00
Hugh Rundle caf1d4163b
simplify translation blocks 2021-12-07 08:36:57 +11:00
Mouse Reeve c9216fe14e Revert "Fixes alignment of search bpx and login form"
This reverts commit 2797386608.
2021-12-06 13:27:57 -08:00
Hugh Rundle 5847bc1924
handle type errors 2021-12-06 18:18:12 +11:00
Hugh Rundle c3f24316a0
lint 2021-12-06 17:02:47 +11:00
Hugh Rundle 6d894d71ec
stop pylint contradicting itself 2021-12-06 16:59:51 +11:00
Hugh Rundle 4ade580732
pylint called my code useless how rude 2021-12-06 16:47:04 +11:00
Hugh Rundle c817ea0ff9
improve error handling 2021-12-06 16:40:18 +11:00
Hugh Rundle 5bbd6faa8b
tidy templates 2021-12-06 16:26:16 +11:00
Hugh Rundle 027520d923
add remote follow tests 2021-12-06 16:26:02 +11:00
Hugh Rundle 685e0a172d
make code WET again
moving url discovery borked general webfinger tests for some reason IDK why.
2021-12-06 10:45:39 +11:00
Hugh Rundle 781fe69470
more descriptive remote follow errors
- distinguish between invalid username, user not found, and remote follow not supported
- make helpers DRYer
2021-12-06 09:29:51 +11:00
Mouse Reeve 02313f40b8 Adds update from inventaire link for books 2021-12-05 13:48:05 -08:00
Mouse Reeve 071da7d4fb Handle various link generation needs 2021-12-05 13:38:15 -08:00
Mouse Reeve 4085714764 Update openlibrary author with ISNI 2021-12-05 13:26:22 -08:00
Mouse Reeve d7e4e6aa1e Adds openlibrary update for book 2021-12-05 13:02:42 -08:00
Mouse Reeve 113eda33e9 Adds update views 2021-12-05 12:47:43 -08:00
Mouse Reeve b824841cb3 Adds update logic to connectors 2021-12-05 12:47:27 -08:00
Mouse Reeve 2d875b5575 Add link properties for remotes 2021-12-05 12:29:54 -08:00
Mouse Reeve 099b516321
Merge pull request #1659 from bookwyrm-social/edit-author-isni
Add isni to edit author form
2021-12-05 11:22:17 -08:00
Mouse Reeve 68a489dbe0 Add isni to edit author form 2021-12-05 11:02:36 -08:00
Mouse Reeve 8383bc20f5
Merge pull request #1640 from NonSparkly/patch-1
Comment out trailing block ending in production nginx config template
2021-12-05 10:33:33 -08:00
Mouse Reeve 9b0b771a40
Merge pull request #1658 from bookwyrm-social/isni-check
More thoroughly checking if title is set to avoid error
2021-12-05 10:16:10 -08:00
Mouse Reeve 89c23c3e0c More thoroughly checking if title is set to avoid error 2021-12-05 09:07:17 -08:00
Hugh Rundle c77edab79c
minor functionality fixes 2021-12-05 18:09:51 +11:00
Mouse Reeve 660b2e48e7
Merge pull request #1649 from bookwyrm-social/detail-menus
Use html details instead of javascript menus
2021-12-04 17:03:36 -08:00
Mouse Reeve 977d09bc06
Merge pull request #1656 from bookwyrm-social/top-bar-alignment
Fixes alignment of search box and login form
2021-12-04 16:55:06 -08:00
Mouse Reeve 2797386608 Fixes alignment of search bpx and login form 2021-12-04 16:41:07 -08:00
Mouse Reeve 08255508a3
Merge pull request #1654 from bookwyrm-social/locale-updates
Locale updates
2021-12-04 15:13:35 -08:00
Mouse Reeve 2fd8f1887f
Merge pull request #1655 from bookwyrm-social/display-fixes
Display fixes
2021-12-04 15:13:22 -08:00
Mouse Reeve 4b5a0d4a03 Fix display of long words in list titles 2021-12-04 14:51:18 -08:00
Mouse Reeve 591fd1e803 Stop is-small class from propogating to modal buttons 2021-12-04 14:47:17 -08:00
Mouse Reeve e19fe3321b Javascript cache buster 2021-12-04 14:47:06 -08:00
Mouse Reeve 525ed16016 Updates locale files with new translations 2021-12-04 14:40:38 -08:00
Mouse Reeve f9c78c79c8 Removes inoperative translation string 2021-12-04 14:40:25 -08:00
Mouse Reeve 17b25c0a87
Merge pull request #1652 from bookwyrm-social/saved-flag
Display "saved!" indicator in status form
2021-12-04 13:57:03 -08:00
Mouse Reeve 597d537461 Display "saved!" indicator in status form 2021-12-04 13:43:01 -08:00
Mouse Reeve ba34e11fb0 Fixes auto-closing menu 2021-12-04 12:11:29 -08:00
Mouse Reeve 7050013144 Close menus when the rest of the page is clicked
Ce-authored-by: Joachim <joachim.robert@protonmail.com>
2021-12-04 11:51:57 -08:00
Mouse Reeve f98fe0348a Fixes merge error 2021-12-04 11:45:02 -08:00
Mouse Reeve 5e919ab07f
Merge pull request #1650 from joachimesque/fix-preview-image-wrap
Fix preview image text wrap length
2021-12-04 11:44:06 -08:00
Mouse Reeve 403382e4b4
Merge branch 'main' into detail-menus 2021-12-04 11:30:49 -08:00
Mouse Reeve 18f7863eac
Merge pull request #1651 from bookwyrm-social/feed-settings-style
Creates consistent styling for details element
2021-12-04 11:29:20 -08:00
Mouse Reeve 56609bbc2b Css linting 2021-12-04 11:18:41 -08:00
Joachim 5b690532fa Add an AttributeError exception for CI tests 2021-12-04 19:59:45 +01:00
Mouse Reeve c813ce1144 Creates consistent styling for details element 2021-12-04 10:41:42 -08:00
Joachim 5e9e7db935 Fix preview image text wrap length
Closes #1634
2021-12-04 19:08:55 +01:00
Mouse Reeve b6106691ef Force dropdown menus to always visible 2021-12-04 09:57:45 -08:00
Mouse Reeve 5b27952b34 Use html details instead of javascript menus 2021-12-04 09:48:55 -08:00
Mouse Reeve 2ae8cdaa88
Merge pull request #1648 from bookwyrm-social/completions
Adds bash completion script for bw-dev
2021-12-04 09:39:05 -08:00
Mouse Reeve 4e47c19901 Adds line breaks 2021-12-04 09:15:23 -08:00
Mouse Reeve ba04c3382b Adds autocomplete file for bw-dev 2021-12-04 09:12:04 -08:00
Joachim a1f76fa208 Update messages 2021-12-04 17:47:31 +01:00
Joachim 8a84bd3490 Apply suggestions from python lint 2021-12-04 17:33:28 +01:00
Joachim 0801c66878 Add tests 2021-12-04 17:29:22 +01:00
Mouse Reeve 14ba04d393 Add local copy of nginx conf to gitignore 2021-12-04 08:28:47 -08:00
Mouse Reeve 41fbfb627e
Merge pull request #1638 from joachimesque/font-end-accessibility-improvements
Add `aria-describedby` to field help/error messages
2021-12-04 08:23:09 -08:00
Joachim 57502c1f3c Fix js following review 2021-12-04 16:31:38 +01:00
Joachim 407d471065 Change footer link 2021-12-04 16:18:23 +01:00
Joachim 5ffe465a7a Better style for embedded cards 2021-12-04 16:18:11 +01:00
Joachim 78a0092f92 Translate home page on main layout 2021-12-04 16:17:51 +01:00
Joachim b2a274ba41 Add JS code for copy text component 2021-12-04 16:17:33 +01:00
Joachim 306ea962c4 Add embed URL component to list layout 2021-12-04 16:17:21 +01:00
Joachim 1b9291616b Add EmbedList view template 2021-12-04 16:08:47 +01:00
Joachim 2c7c3fd1c9 Create a new layout for embedded content 2021-12-04 16:08:15 +01:00
Joachim 8ee09a2284 Add url to reach the view 2021-12-04 16:07:38 +01:00
Joachim d22167e105 Add EmbedList view with an X-Frame-Options exemption 2021-12-04 16:07:21 +01:00
Joachim 3bd28afe93 Add unique embed_key to List model 2021-12-04 16:06:07 +01:00
Mouse Reeve 749c902070
Merge pull request #1645 from bookwyrm-social/status-previews
Use book preview card for social media on status page
2021-12-03 12:14:07 -08:00
Mouse Reeve c0ac838ed8
Merge branch 'main' into font-end-accessibility-improvements 2021-12-03 10:08:47 -08:00
Mouse Reeve f6dfe3530a Use book preview card for social media on status page 2021-12-03 09:58:14 -08:00
Mouse Reeve 9ee248033d
Merge pull request #1639 from hughrun/shelfnames
add translation strings
2021-12-02 12:45:41 -08:00
Mouse Reeve cb2a890c3b
Merge pull request #1630 from joachimesque/add-feed-filters
Add feed filters
2021-12-02 12:44:26 -08:00
Mouse Reeve da7f44791f
Merge branch 'main' into shelfnames 2021-12-02 12:25:19 -08:00
Mouse Reeve 4b55ffe99e
Merge branch 'main' into remote-follow 2021-12-02 12:16:56 -08:00
Mouse Reeve 7eb3de6247
Merge branch 'main' into tidy-header 2021-12-02 12:16:05 -08:00
Mouse Reeve ed28d5f945
Merge branch 'main' into add-feed-filters 2021-12-02 12:14:54 -08:00
Mouse Reeve baca5e50e7
Merge pull request #1608 from hughrun/move-shelves
refactor shelf activity on book page
2021-12-02 12:06:07 -08:00
Mouse Reeve b4f1a7a020
Merge pull request #1642 from bookwyrm-social/locale-updates
Updates locales
2021-12-02 11:03:01 -08:00
Mouse Reeve 26f28f7642
Merge pull request #1481 from bibliotechy/1203-better-ui-for-adding-authors
Improve UI for adding authors to books
2021-12-02 10:47:40 -08:00
Mouse Reeve 0794f1a286 Updates locales 2021-12-02 10:28:13 -08:00
Hugh Rundle 2ec6e56698
blocktrans for reading goal 2021-12-02 07:28:35 +11:00
Olof Pettersson 5f10ccd9c7
Comment out trailing block ending
For people installing an instance with only the reverse proxy server, the hidden trailing `}` at the end of the second server block is quite hard to catch and it took me a good while to figure it out. Having the entire server commented out makes the whole process more understandable in my opinion.
2021-12-01 14:18:28 +01:00
Hugh Rundle 8e6619294f
oclc server sure is slow 2021-12-01 21:02:25 +11:00
Hugh Rundle 2602ae42b0
add translation strings
- add logic when default shelves used
- add trans strings in a few spots they were missing
2021-12-01 20:07:52 +11:00
Chad Nelson 91997b6f4c Linting after merge conflict 2021-11-30 17:42:31 -05:00
Chad Nelson e59a480065
Merge branch 'main' into 1203-better-ui-for-adding-authors 2021-11-30 17:30:00 -05:00
Chad Nelson 66e414be3c Standardize JS, use button, & filter empty authors 2021-11-30 17:22:35 -05:00
Hugh Rundle 9be1a8f455
keep close button simple 2021-12-01 07:45:30 +11:00
Hugh Rundle 461c35f416
fix buttons 2021-11-30 21:02:39 +11:00
Hugh Rundle 080fa72c84
ostatus template fixes
- remove unnecessary links
- remove footer
- remove unnecessary JS scripts
- make block title and block heading empty
2021-11-30 21:01:07 +11:00
Hugh Rundle 7848ff7927
fix translation strings 2021-11-30 20:46:41 +11:00
Hugh Rundle fbb6368caf
undo footer component 2021-11-30 20:21:41 +11:00
Hugh Rundle 4ee234258a
remove OG meta in ostatus template
It's just a temporary popup so would be weird to share and just gunks things up.

Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-11-30 12:47:04 +11:00
Hugh Rundle 386371baa3
improve a11y on notifications
Also change close link to a button.

Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-11-30 12:42:52 +11:00
Joachim 4d93545d88 Lint forms 2021-11-29 23:31:05 +01:00
Joachim 43072a357f Password reset form 2021-11-29 23:30:23 +01:00
Joachim 80535a3b0c Login form 2021-11-29 23:30:14 +01:00
Joachim 3cf9660df3 Login form 2021-11-29 23:29:56 +01:00
Joachim 3eb4dfdc9b Get started user form 2021-11-29 23:29:36 +01:00
Joachim 63d31b8623 Edit book form 2021-11-29 23:29:22 +01:00
Joachim 659d13d0a6 Announcement form 2021-11-29 23:28:51 +01:00
Joachim a6760cabc8 Email domain form 2021-11-29 23:28:29 +01:00
Joachim 5d0c6bdde2 Edit instance form 2021-11-29 23:27:25 +01:00
Joachim 0a621550b8 IP address form 2021-11-29 23:27:04 +01:00
Joachim a154597de1 Delete user form 2021-11-29 23:26:53 +01:00
Joachim 08b4c538e6 User moderation actions 2021-11-29 23:26:43 +01:00
Joachim c2873c601f Register form 2021-11-29 23:26:25 +01:00
Joachim adb0d356a8 Update site.html 2021-11-29 22:39:44 +01:00
Joachim 28f0882ba6 Handle Author form errors 2021-11-29 22:39:01 +01:00
Joachim dd0114c644 Include errors display snippet 2021-11-29 22:33:03 +01:00
Hugh Rundle 1636dfd308
fix footer indentation 2021-11-29 20:42:16 +11:00
Hugh Rundle 1d90ca6fa6
keep footer DRY
Pulls footer and scripts after it into a separate component template.
This allows ostatus/template to use the footer without having to use
layout without repeating the same code.
2021-11-29 20:35:26 +11:00
Hugh Rundle 1211fda7ff
beautiful code quality, pylint will be pleased 2021-11-29 19:53:13 +11:00
Hugh Rundle 9a3ec4362b
code cleanup 2021-11-29 19:45:52 +11:00
Hugh Rundle f5d9a204eb
clean up ostatus templates 2021-11-29 19:37:56 +11:00
Hugh Rundle 3d73ea92e8
handle user blocks properly 2021-11-29 18:08:25 +11:00
Hugh Rundle 7b65edf10b
improve and bugfix remote follow templates 2021-11-29 15:33:26 +11:00
Hugh Rundle 587b0194fc
bugfix remote follows 2021-11-29 15:33:18 +11:00
Joachim 84b5c2da4e Documentation 2021-11-28 22:10:15 +01:00
Hugh Rundle 4a9713b812
fix template for remote follower error 2021-11-29 08:03:01 +11:00
Joachim 85c688b147 Update forms.py 2021-11-28 22:01:49 +01:00
Hugh Rundle c7242b6022
add popup warning 2021-11-29 07:56:31 +11:00
Hugh Rundle 46f3294431
fix remote follow template 2021-11-29 07:56:09 +11:00
Joachim 403e282d88 Add aria-describedby to field help/error messages 2021-11-28 21:52:28 +01:00
Joachim 9ec4ad6b31 Apply review suggestion 2021-11-28 21:46:32 +01:00
Joachim bf5cb898ef Apply review suggestion 2021-11-28 21:45:35 +01:00
Hugh Rundle feaf0d5e52
handle username errors in remote follow form 2021-11-29 07:11:57 +11:00
Joachim 3816b0aa57 Better JS 2021-11-28 18:34:54 +01:00
Mouse Reeve 1fed22b27e
Merge pull request #1636 from bookwyrm-social/missing-covers
Fixes checking if image fields are already set
2021-11-28 09:34:49 -08:00
Joachim a688c73b79 Fix stylelint rule 2021-11-28 18:28:49 +01:00
Joachim c924f578e5 Fix linting errors 2021-11-28 18:26:01 +01:00
Mouse Reeve 3f09b4bc8a More tests 2021-11-28 09:23:13 -08:00
Mouse Reeve 3a7f070a79 Typo fix 2021-11-28 08:50:29 -08:00
Mouse Reeve a7ee8fea24 Adds test for setting model image field 2021-11-28 08:49:54 -08:00
Mouse Reeve 7b89014e7b Updates image fields tests 2021-11-28 08:24:00 -08:00
Mouse Reeve 54cef421e2 Fixes checking if image fields are already set 2021-11-28 07:57:27 -08:00
Hugh Rundle 6abf5d6910
add submit button to remote follow form 2021-11-28 21:48:03 +11:00
Hugh Rundle e9bb2a04a4
code cleanup 2021-11-28 21:38:28 +11:00
Hugh Rundle f828f36cc5
show popup for remote follow 2021-11-28 21:16:57 +11:00
Hugh Rundle 6e7d23c1ae
add remote follow button 2021-11-28 20:09:29 +11:00
Hugh Rundle 2e428e6ea1
add remote follow templates 2021-11-28 20:08:54 +11:00
Hugh Rundle e275b98183
ostatus remote follow views 2021-11-28 16:56:21 +11:00
Hugh Rundle 610114b4eb
rearrange ostatus templates 2021-11-28 16:54:25 +11:00
Hugh Rundle d05e100421
update ostatus templates 2021-11-28 13:28:58 +11:00
Hugh Rundle f7c8f121b9
add remote follow ostatus templates 2021-11-28 12:43:29 +11:00
Joachim 89bbf005c3 Add an accessibility helper
This will display a default outline specifically for keyboard users (and some inputs)
2021-11-27 19:19:09 +01:00
Joachim 4ed4278826 Tidy header for non-authenticated visitors
with the help of a login modal
2021-11-27 19:18:20 +01:00
Hugh Rundle 9d52e3cf27
add ostatus subscribe to webfinger links 2021-11-27 18:32:50 +11:00
Hugh Rundle 1a37903583
remove unnecessary function call arg 2021-11-26 17:39:35 +11:00
Hugh Rundle a5efc798f8
clean up old vars 2021-11-26 17:30:27 +11:00
Hugh Rundle 951eb43aa6
bypass ajax for shelf_selector statuses 2021-11-26 17:16:26 +11:00
Hugh Rundle 5b67226571
forceReload prevents ajax submission
...instead of weird hacky workarounds forcing refreshes later.
2021-11-25 19:12:03 +11:00
Hugh Rundle b91915d316
change shelf var for shelf_selector in book view 2021-11-25 08:20:34 +11:00
Hugh Rundle c704c7eb8f
remove from any shelf in all books shelf view
- fixes removing book from 'all books' shelf erroring
- remove from any shelf item is on when in 'all books'
2021-11-25 07:38:08 +11:00
Joachim 7d24568dcd Update test_updates.py 2021-11-24 20:54:53 +01:00
Joachim 5f81be74cb Add test 2021-11-24 20:52:30 +01:00
Joachim 0001d6e92a PyLint 2021-11-24 19:04:14 +01:00
Joachim 8712b2fdab ESLint 2021-11-24 19:02:07 +01:00
Joachim db5e7a886a Handle count of notifications banner 2021-11-24 19:00:30 +01:00
Joachim 2ad37a22dd Move stream filter to helpers 2021-11-24 13:37:09 +01:00
Joachim 40e4591a24 Apply review suggestions 2021-11-24 11:59:45 +01:00
Mouse Reeve ad6c860951
Merge pull request #1627 from joachimesque/fix-preview-image-url
Don't change the preview image URL on update
2021-11-23 15:01:15 -08:00
Mouse Reeve a24fb5cd11
Merge pull request #1581 from hughrun/isni-poc
Query ISNI database when adding authors
2021-11-23 14:30:49 -08:00
Mouse Reeve 73abd2d342
Merge pull request #1631 from bookwyrm-social/locale
Updates for Spanish, Galician, French, Lithuanian locales
2021-11-23 14:19:04 -08:00
Mouse Reeve 8752fec37f Updates for Spanish, Galician, French, Lithuanian locales 2021-11-23 12:38:02 -08:00
Joachim 7bdfacb688 Add translation keys 2021-11-22 19:25:49 +01:00
Joachim 63e284dc41 Forgive me pylint 2021-11-22 18:59:46 +01:00
Joachim 47cfc2f157 Hardcode form 2021-11-22 18:52:57 +01:00
Hugh Rundle d8e83ffe82
moar code linting 2021-11-22 13:01:58 +11:00
Hugh Rundle a9d921cc06
code cleanup 2021-11-22 12:52:59 +11:00
Hugh Rundle 09c5a3861b
prefer English language sources for ISNI titles 2021-11-22 12:15:06 +11:00
Joachim 0b46db49a3 Fix pylint 2021-11-22 00:46:24 +01:00
Joachim bc7de410b7 Add migration 2021-11-22 00:33:08 +01:00
Joachim a0093a8a2e Add status type filters 2021-11-22 00:25:47 +01:00
Chad Nelson 6be9ac4f70 Abstract JS for multivalue form fields 2021-11-21 17:32:48 -05:00
Hugh Rundle fd3ed7fb8c
fix author is now class object not dict 2021-11-22 09:25:31 +11:00
Hugh Rundle 8691023fa9
display link to isni in author page when other identifiers missing 2021-11-22 09:24:05 +11:00
Hugh Rundle a218fa21ea Merge branch 'main' into isni-poc 2021-11-22 08:53:58 +11:00
Hugh Rundle fd2ade2313
refactor isni author enrichment
- use activitypub.Author instead of custom dict
- prefer to display "Author of [title]" from ISNI data instead of short description
- merge isni and db authors for edit_book display
- fix edit_book template to use changed data
- rename some functions in utils/isni.py
2021-11-22 08:49:22 +11:00
Hugh Rundle e2836d468d
don't use author name as deduplication field 2021-11-22 08:47:12 +11:00
Hugh Rundle 1e6e4b0f8d
use activitypub dataclass for isni authors
- add timeout to isni API call
- use activitypub.Author dataclass instead of bespoke dict
- display isni authors as "Author of" first title in ISNI record if possible
- sensible fallbacks if title info unavailable in isni record
2021-11-21 19:55:55 +11:00
Joachim ad6aaa6bc8 Update preview_images.py 2021-11-20 17:15:58 +01:00
Joachim 7d0a7ab766 Bump django-imagekit to remove deprecation warning 2021-11-20 17:12:54 +01:00
Joachim f26a41bd10 Prevent empty file name 2021-11-20 17:10:29 +01:00
Joachim d74df047c5 Clean up file before saving 2021-11-20 16:59:05 +01:00
Joachim 40264e372d Update preview_images.py 2021-11-20 16:26:02 +01:00
Joachim 37508d2583 Update preview_images.py 2021-11-20 16:23:50 +01:00
Hugh Rundle e247e96832
remove incorrect comment 2021-11-20 19:34:37 +11:00
Hugh Rundle a3270551f9
code cleanup 2021-11-20 19:19:51 +11:00
Hugh Rundle b406a03533
don't persist form state in firefox
Fixes shelves not being disabled in dropdowns.
See https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing
2021-11-20 19:04:51 +11:00
Hugh Rundle 4b6f5c9f51
remove out of date comment 2021-11-20 19:03:57 +11:00
Hugh Rundle b273123708
code style 2021-11-20 16:06:16 +11:00
Hugh Rundle 12810d8e34
don't try to update non-existent readthroughs 2021-11-20 16:03:46 +11:00
Hugh Rundle af9768a2e3
force page reload when adding status from move button 2021-11-20 14:59:59 +11:00
Hugh Rundle 41862e854c
move from reading to editable shelf with logic that actually works 2021-11-20 13:57:37 +11:00
Hugh Rundle c6a2de3bbc
pass readthrough id to shelf_selector
- allows user to move book from a shelf to the 'Read' shelf using the move button.
2021-11-20 10:29:17 +11:00
Hugh Rundle 373cc2c762
active_shelf should always be a reading status shelf 2021-11-20 09:58:34 +11:00
Hugh Rundle a082121930
fix shelves not being unshelved if any shelf is read-status 2021-11-20 08:55:43 +11:00
Hugh Rundle 6951b52365
disallow moving to shelf already used 2021-11-20 08:18:43 +11:00
Hugh Rundle 9ffe4d340e
trigger reading status modals from move button
- unhide reading status shelves
- trigger modals when moving to a read status shelf
- force page refresh when using move button
2021-11-20 08:06:13 +11:00
Mouse Reeve 8a6f78cfff
Merge pull request #1624 from bookwyrm-social/locale-updates
Full coverage in Galician locale!
2021-11-19 09:44:22 -08:00
Mouse Reeve 7ac3d5da7c Full coverage in Galician locale! 2021-11-19 09:34:43 -08:00
Mouse Reeve da39d91b68
Merge pull request #1622 from bookwyrm-social/email-reports
Include admin and moderator in reporting email
2021-11-18 15:19:33 -08:00
Mouse Reeve 417f09690f Include admin and moderator in reporting email 2021-11-18 15:08:00 -08:00
Mouse Reeve f4ad1dbbdf
Merge pull request #1620 from bookwyrm-social/email-reports
Email admins when a moderation report is created
2021-11-18 15:02:39 -08:00
Mouse Reeve 21c90ac99e Use groups not permissions 2021-11-18 14:51:00 -08:00
Mouse Reeve 3787a31c67 Updates image helpers on site 2021-11-18 14:39:22 -08:00
Mouse Reeve 253225cf43
Merge pull request #1621 from bookwyrm-social/locale-update
Updates locales
2021-11-18 14:36:46 -08:00
Mouse Reeve 235167f06c Updates locales 2021-11-18 14:03:19 -08:00
Mouse Reeve 41dd915d7f Email templates 2021-11-17 20:22:00 -08:00
Mouse Reeve 8cf6eb1c13
Merge pull request #1619 from bookwyrm-social/galician-locale
Adds Galician locale
2021-11-17 10:19:10 -08:00
Mouse Reeve 9662143518 Updates english locale file 2021-11-17 10:03:48 -08:00
Mouse Reeve 9961a08c93 Adds Galician locale 2021-11-17 10:02:39 -08:00
Mouse Reeve e6ffc48b17
Merge pull request #1618 from bookwyrm-social/locale-updates
Adds translations for french and lithuanian lcoales
2021-11-17 10:02:05 -08:00
Mouse Reeve 058184a81b Adds translations for french and lithuanian lcoales 2021-11-17 09:51:15 -08:00
Mouse Reeve b206aae32b Tasks tests 2021-11-17 09:47:24 -08:00
Mouse Reeve 3bf1121fa6 Signals tests 2021-11-17 09:38:02 -08:00
Mouse Reeve 157d891681 Adds tests files 2021-11-17 09:10:28 -08:00
Mouse Reeve f255b5f21d
Merge pull request #1617 from bookwyrm-social/nodeinfo
Fixes logic on nodeinfo page
2021-11-16 16:55:57 -08:00
Mouse Reeve e3fec5885a Fixes logic on nodeinfo page 2021-11-16 16:20:29 -08:00
Mouse Reeve 4cb572f4c7 Updates management tests 2021-11-16 11:25:59 -08:00
Mouse Reeve 903aaaf4c4 Adds management and bw-dev commands 2021-11-16 10:41:08 -08:00
Mouse Reeve d0e431cff5
Merge pull request #1580 from bookwyrm-social/inventaire-connector-tests
Adds more tests for the inventaire connector
2021-11-16 10:25:36 -08:00
Mouse Reeve 6dd7eebd98 Fixes tests 2021-11-16 10:16:28 -08:00
Mouse Reeve 50ca16a46f Merge branch 'main' into inventaire-connector-tests 2021-11-16 09:59:50 -08:00
Mouse Reeve a463e22bbe
Merge pull request #1615 from bookwyrm-social/locales-update
A command to update locales and updated locales
2021-11-16 09:41:17 -08:00
Mouse Reeve a26302683f List command in echo 2021-11-16 09:31:57 -08:00
Mouse Reeve a1830ac701 Adds updates locales 2021-11-16 09:30:11 -08:00
Mouse Reeve 77f29a621f Adds command to pull locale updates 2021-11-16 09:29:58 -08:00
Mouse Reeve 1d28c7e73d Load lists from redis cache 2021-11-16 09:21:12 -08:00
Hugh Rundle 8658e36ca8
code formatting 2021-11-16 20:40:22 +11:00
Hugh Rundle 03c59f2431
improve security on isni url 2021-11-16 20:37:37 +11:00
Hugh Rundle 9ca18d9cd4
isni utils cleanup
Utilises the requests module's built in functionality to pass params as a dict
which is url encoded by requests.
2021-11-16 20:35:47 +11:00
Hugh Rundle ec39346e67
check shelf.editable instead of custom filter 2021-11-16 19:26:49 +11:00
Mouse Reeve 2968145627
Merge pull request #1614 from bookwyrm-social/outbox-error
Safer call to get preview image or books
2021-11-15 13:47:00 -08:00
Mouse Reeve f22ae23574 Safer call to get preview image or books 2021-11-15 13:34:02 -08:00
Mouse Reeve fc520fdbdc Adds quick first pass on lists stream manager 2021-11-15 13:09:17 -08:00
Mouse Reeve 58f63280fd
Merge pull request #1612 from bookwyrm-social/lithuanian-space
Preserve spaces between links
2021-11-15 12:11:36 -08:00
Mouse Reeve 87e2b72056
Merge pull request #1611 from bookwyrm-social/follow-list-order
Sort followers/following lists by if you follow the user
2021-11-15 11:48:49 -08:00
Mouse Reeve 5e5cb26290 Preserve spaces between links 2021-11-15 11:47:39 -08:00
Mouse Reeve bcfe13bb4e Sort followers/following lists by if you follow the user 2021-11-15 11:28:43 -08:00
Mouse Reeve 054a85b0dd
Merge pull request #1610 from bookwyrm-social/lithuanian
Adds Lithuanian locale
2021-11-15 10:38:36 -08:00
Mouse Reeve 7d66013b52 Adds Lithuanian to the user options 2021-11-15 10:26:00 -08:00
Mouse Reeve 9050350113 Adds lithuanian locale 2021-11-15 10:19:13 -08:00
Mouse Reeve afbc742f47
Merge pull request #1600 from bookwyrm-social/import-field-names
Refactors import process
2021-11-15 09:59:54 -08:00
Mouse Reeve 30afe42b3a Removes extra space in progress bar 2021-11-15 09:41:05 -08:00
Mouse Reeve 83e468a4f8 Fixes "indeterminate" state of progress indicator on screen reader 2021-11-15 09:34:36 -08:00
Mouse Reeve 77ee1147d5 Adds return_first tests to book_search 2021-11-15 09:03:00 -08:00
Hugh Rundle eab2ec0ffd
code cleanup in is_shelf_type template tag 2021-11-15 21:19:16 +11:00
Hugh Rundle 168a2488e2
refactor shelf activity on book page
- disallow moving from custom shelf to a reading status shelf with shelf_selector
- always use shelve_button for moving books from a reading status shelf
- redesign shelf information as a list of boxes
2021-11-15 20:59:22 +11:00
Mouse Reeve 8612cf654d Invalid href 2021-11-14 11:31:47 -08:00
Mouse Reeve 14e2960d06 Update legacy jobs 2021-11-14 10:58:46 -08:00
Mouse Reeve 9f6796bbf5 Safer request for normalized data 2021-11-14 10:29:12 -08:00
Mouse Reeve 31f3351854 Fixes bug comparing dates to nonetype 2021-11-14 10:22:26 -08:00
Mouse Reeve 8cede05d32 Retry hanging items 2021-11-14 10:20:14 -08:00
Mouse Reeve f92863ad3e Notify when import completes 2021-11-14 09:56:23 -08:00
Mouse Reeve 47b98ad0d9 Track completed items on job 2021-11-14 09:04:12 -08:00
Mouse Reeve 9e673834dc Check for duplicates 2021-11-14 08:35:16 -08:00
Mouse Reeve 6cca3f9772 Updates test data 2021-11-14 07:57:13 -08:00
Mouse Reeve 2748e0a824 Check for existing reviews/ratings on import items 2021-11-14 07:50:19 -08:00
Mouse Reeve bdc3f6828b Python formatting 2021-11-14 07:11:48 -08:00
Mouse Reeve 66ad8c3b25 Updates locale 2021-11-14 07:11:33 -08:00
Mouse Reeve c614f638fd Merge branch 'import-field-names' of github.com:bookwyrm-social/bookwyrm into import-field-names 2021-11-14 07:06:48 -08:00
Mouse Reeve c50e791965
Merge pull request #1604 from bookwyrm-social/save-reviews
Associate imported review with import items
2021-11-14 07:02:40 -08:00
Mouse Reeve 403c0dc3a3
Merge pull request #1605 from hughrun/author-form
Don't delete non-form data when editing authors
2021-11-14 06:50:55 -08:00
Hugh Rundle 3357953a53
whoops forgot inventaire_id 2021-11-14 21:26:23 +11:00
Hugh Rundle 8495cf8a45
don't delete non-form data when editing authors
fixes #1584

This is a temporary fix. As Mouse has suggested, ultimately it would be good to re-import data from one or more of the linked data sources if there is anything missing.
2021-11-14 21:21:37 +11:00
Mouse Reeve 32d0d8d027 Expand librarything csv processing tests 2021-11-13 13:04:54 -08:00
Mouse Reeve 7f06ee3844 Fixes getting isbn for librarything imports 2021-11-13 12:46:27 -08:00
Mouse Reeve fb91c33682 Fixes isbn assignment for goodreads 2021-11-13 12:24:16 -08:00
Mouse Reeve a9622942cd Test correctly adding goodreads isbns 2021-11-13 12:11:07 -08:00
Mouse Reeve 8b7720c8b8 Use "reject" instead of "delete" on review page 2021-11-13 11:54:28 -08:00
Mouse Reeve 712d8ecfb4 Don't show empty stars when there's no review 2021-11-13 11:52:08 -08:00
Mouse Reeve 1e46de4c9d Associate imported review with import item 2021-11-13 11:44:05 -08:00
Mouse Reeve 1e2dca402b Adds null value to breadcrumb links 2021-11-13 11:40:19 -08:00
Mouse Reeve 644d969330 Fixes importer tests 2021-11-13 11:22:07 -08:00
Mouse Reeve 4dae851da0 Adds breadcrumbs 2021-11-13 11:18:10 -08:00
Mouse Reeve e77eea9c81 Adds tests for import manual review 2021-11-13 10:52:11 -08:00
Mouse Reeve c3156a1de5 Fixes import path in test 2021-11-13 10:22:28 -08:00
Mouse Reeve 628f104b13 Separates out imports views tests 2021-11-13 10:16:25 -08:00
Mouse Reeve 232e051dcb Fixes import job creates in tests 2021-11-13 10:16:05 -08:00
Mouse Reeve 3bdda973bc Creates subdirectory for import views tests 2021-11-13 09:52:09 -08:00
Mouse Reeve d3f23b4a0a Updates calls in tests 2021-11-13 09:50:56 -08:00
Mouse Reeve 659d0f19eb Improves import table ui
adds table container, plays with display a bit
2021-11-13 09:43:52 -08:00
Mouse Reeve 60fb1ac2e6 More flexible templates 2021-11-13 09:34:10 -08:00
Mouse Reeve acc32d579e Preview review in import preview 2021-11-13 09:22:35 -08:00
Mouse Reeve c245ad09bb Make sure book is in the right format 2021-11-13 09:07:50 -08:00
Mouse Reeve 08f4ad6cd4 Fixes call to import task 2021-11-13 09:02:42 -08:00
Mouse Reeve 40fff02eec Approve or delete import guesses 2021-11-12 17:10:47 -08:00
Mouse Reeve 221cde9be4 Adds manual review view 2021-11-12 16:24:45 -08:00
Mouse Reeve 9bff27e61f Separate import classes into files 2021-11-12 15:50:33 -08:00
Mouse Reeve be26e8363a Create import directory 2021-11-12 15:43:15 -08:00
Mouse Reeve 5558ed810e Show manual review flag 2021-11-12 15:40:07 -08:00
Mouse Reeve 6a5a598345 Raise errors when import items fail
This should make is way easier to debug
2021-11-12 15:17:01 -08:00
Mouse Reeve b784dcdb46 Removes uninformative test 2021-11-12 15:07:26 -08:00
Mouse Reeve 1d0f6d5243 Python formatting 2021-11-12 15:06:23 -08:00
Mouse Reeve 6161f60695 Use normalized data in table 2021-11-12 14:54:20 -08:00
Mouse Reeve 61eaf51310 Fixes html validity 2021-11-12 14:49:24 -08:00
Mouse Reeve e09c02017c Fixes title/author search handling 2021-11-12 14:46:39 -08:00
Mouse Reeve 60c777ed49 Updates tests 2021-11-12 14:41:25 -08:00
Mouse Reeve d8197cdcfa Indicate retry on status page 2021-11-12 14:38:41 -08:00
Mouse Reeve a65f07e0bf Adds retry page 2021-11-12 14:36:28 -08:00
Mouse Reeve 2a84c0a370 title author search already working correctly with return first 2021-11-12 13:59:54 -08:00
Mouse Reeve 80c1954aa3 Fixes first_search_result behavior 2021-11-12 13:48:31 -08:00
Mouse Reeve 1e8269b6c9 Refactors import status view 2021-11-12 13:10:52 -08:00
Mouse Reeve e211ece346
Merge pull request #1602 from bookwyrm-social/locale-updates
Updates existing locales
2021-11-12 11:25:26 -08:00
Mouse Reeve 843e9a7b32 Updates existing locales 2021-11-12 11:03:47 -08:00
Mouse Reeve 309d289a65 A few more mocks 2021-11-12 10:49:49 -08:00
Mouse Reeve cad5a128ac Fixes call to add_status signal 2021-11-12 10:19:13 -08:00
Mouse Reeve e6a251fdad Updates mocks across tests 2021-11-12 10:07:38 -08:00
Mouse Reeve f71ef286b6 Updates mocks 2021-11-12 08:55:47 -08:00
Mouse Reeve 3190ef4346 Deprioritize adding old statuses to timelines 2021-11-11 19:19:23 -08:00
Mouse Reeve 9fee860b00 Adds enum for queue names 2021-11-11 19:10:22 -08:00
Mouse Reeve 6aa57d4d34 Set queue for broadcast task 2021-11-11 19:00:01 -08:00
Mouse Reeve c33d791974 adds tests for new task system 2021-11-11 15:17:32 -08:00
Mouse Reeve 908c9dc689 Use many small tasks instead of one big task 2021-11-11 14:42:29 -08:00
Mouse Reeve f0ce236ffc Removes unused code 2021-11-11 14:28:49 -08:00
Mouse Reeve be94818a10 Fixes views tests 2021-11-11 14:27:29 -08:00
Mouse Reeve 915c41f59f Merge branch 'main' into import-field-names 2021-11-11 14:08:16 -08:00
Mouse Reeve 50ab4e8248 Updates model tests 2021-11-11 14:08:00 -08:00
Mouse Reeve c37472b484
Merge pull request #1599 from bookwyrm-social/remove-serialize-image-helper
Remove serialize image helper
2021-11-11 13:53:17 -08:00
Mouse Reeve 5130053249
Merge pull request #1601 from bookwyrm-social/import-view
Cleans up html in import view
2021-11-11 13:53:07 -08:00
Mouse Reeve ffcaef0559 Python formatting 2021-11-11 13:39:58 -08:00
Mouse Reeve 8c4e8361f2 Fixes tests 2021-11-11 13:35:56 -08:00
Mouse Reeve c744faf393 Fixes dictionary list html validity 2021-11-11 13:00:34 -08:00
Mouse Reeve d807774c2d Fixes label for privacy field 2021-11-11 12:53:48 -08:00
Mouse Reeve efcf7824dd iUpdates storygraph tests 2021-11-11 12:39:12 -08:00
Mouse Reeve 5967834805 Adds migration 2021-11-11 12:29:51 -08:00
Mouse Reeve f3bcced0a0 Adds shelf mappings 2021-11-11 12:29:38 -08:00
Mouse Reeve 147dd95e8d Removes unused import 2021-11-11 11:59:15 -08:00
Mouse Reeve a95e031140 Validate html in unit tests 2021-11-11 11:33:12 -08:00
Mouse Reeve 4d574a3536 Process dates in librarything import 2021-11-11 09:54:36 -08:00
Mouse Reeve 20baf9385d Updates goodreads tests 2021-11-11 09:22:44 -08:00
Mouse Reeve 4ccd9fc633 Use generalized mappings to handle import 2021-11-10 16:49:54 -08:00
Mouse Reeve 81450ac2d5
Merge pull request #1597 from bookwyrm-social/import-fixes
Don't broadcast imported reviews outside bookwyrm
2021-11-10 12:32:51 -08:00
Mouse Reeve 0736c7e160 Uses general names for fields in parsed csvs 2021-11-10 11:10:09 -08:00
Mouse Reeve 717da918cf Use social media preview images 2021-11-10 10:59:21 -08:00
Mouse Reeve d61595abb9 Clearer syntax 2021-11-10 10:50:05 -08:00
Mouse Reeve cf477a03ae Corrects broadcast flow for objects 2021-11-10 10:39:51 -08:00
Mouse Reeve 7e784fa705 Removes used import 2021-11-10 10:35:37 -08:00
Mouse Reeve 9815e9e100 Python formatting 2021-11-10 10:30:18 -08:00
Mouse Reeve 4f5d23e785 Replace image_serialzier helper with built-in serializers 2021-11-10 10:28:43 -08:00
Mouse Reeve d204e8dbb8
Merge pull request #1247 from joachimesque/image-absolute-url-getter
Add get_absolute_url to ImageField
2021-11-10 10:27:29 -08:00
Mouse Reeve 957d2b2872
Merge pull request #1598 from hughrun/discover
Fix reading actions and book links in Discover
2021-11-10 10:02:23 -08:00
Mouse Reeve 97a71f5e39 Cleans up software check syntax 2021-11-10 09:55:56 -08:00
Mouse Reeve 1b9d08414f Adds storygraph tests 2021-11-10 09:55:52 -08:00
Mouse Reeve aeef472ee1 Fixes flow in checking software for broadcast 2021-11-10 09:33:00 -08:00
Mouse Reeve 20c6a3ea1c Creates generic importer test file
And removes some tests that duplicate the generic tests
2021-11-10 09:32:53 -08:00
Hugh Rundle eb62474b97
fix broken book links in Discover 2021-11-10 22:04:19 +11:00
Hugh Rundle 3f6b0608b2
Show user and book names for reading actions in Discover
fixes #1596

This uses the same technique as #1572 to ensure read statuses from GeneratedNotes are translated.
2021-11-10 21:37:16 +11:00
Mouse Reeve e19c4620ce Don't broadcast imported reviews outside bookwyrm 2021-11-08 12:00:08 -08:00
Mouse Reeve 3af1ca693b
Merge pull request #1592 from nycterent/misc/small-default-template-fixes
Misc/small default template fixes
2021-11-08 11:33:26 -08:00
Mouse Reeve c6db7ffcbe
Merge pull request #1593 from bookwyrm-social/bw-dev-updates
bw-dev updates
2021-11-08 11:33:02 -08:00
Mouse Reeve 3f5fe83950 Renames run web with service ports command 2021-11-07 06:21:13 -08:00
Mouse Reeve c2f44a9f1e Removed outdated add_locales command from doc 2021-11-07 06:19:38 -08:00
Mouse Reeve b2dea343af Removes outdated test command 2021-11-07 06:17:04 -08:00
Mouse Reeve 23549c7fdb Removes unused rundb command 2021-11-07 06:13:44 -08:00
nycterent 67d830e327 fixed typo for the domain placeholder for easier substitution 2021-11-07 16:07:21 +02:00
nycterent 1dec882dba removed quotes from the host - fixes connecting to smtp server 2021-11-07 16:06:20 +02:00
Mouse Reeve 582d2e6d0d
Merge pull request #1589 from hughrun/shelf-names
match page title to active shelf
2021-11-07 05:41:40 -08:00
Hugh Rundle dfe92a27c0
use shelf name if not default shelf
(instead of shelf.identifier)
2021-11-06 11:10:58 +11:00
Hugh Rundle d8098357e6
match page title to active shelf
resolves #1586
2021-11-06 10:53:41 +11:00
Hugh Rundle c3ba7ba547 pylint Y U like this? 2021-11-01 20:04:25 +11:00
Hugh Rundle 6556090524 Update existing authors when isni data available
When an existing author is selected as a new author when editing a book,
if they have an ISNI ID recorded we check the record and augment the local
database record from the ISNI data.

Also dedupes author aliases for this feature and when adding a completely
new author.
2021-11-01 19:50:49 +11:00
Hugh Rundle c845b7a5d0 code cleanup 2021-11-01 16:00:34 +11:00
Hugh Rundle 775470a852 normalise isnis
Some isnis are imported with spaces and some not.
This normalises them for comparison and creating URLs
2021-11-01 15:48:52 +11:00
Hugh Rundle 55ac80cc16 ugh pylint 2021-11-01 12:01:57 +11:00
Hugh Rundle 1533b55a32 lint code 2021-11-01 11:58:08 +11:00
Hugh Rundle b593b9c9d3 Display link to isni record on author page 2021-11-01 11:45:47 +11:00
Hugh Rundle 630f508ee4 code cleanup 2021-11-01 11:39:37 +11:00
Hugh Rundle 552980e208 select correct isni record when adding authors
The original implementation of this was so, so broken.
Now it's not.
2021-11-01 11:34:32 +11:00
Hugh Rundle 37148c5127 display isni bio with existing author name
If an existing author has an isni on record and it matches an author from the isni api call,
display the isni short description to aid with identifying the appropriate author.
2021-11-01 10:26:17 +11:00
Hugh Rundle 30a959dfce make pylint happy 2021-11-01 10:20:19 +11:00
Hugh Rundle 3cfd31f1fe hide isni authors if isni in local db
Check the authors suggested from the local DB for a matching ISNI when pulling authors from ISNI.
i.e. we do not want to suggest the same author twice when we *know* it is the same author.
2021-10-31 20:48:47 +11:00
Hugh Rundle bce5f3f3b5 populate new authors with isni data
If a user selects an author pulled from the ISNI service when editing a book, use any relevant data from ISNI to populate the new author record.

This includes
- bio
- aliases
- isni
- wikipedia url
- viaf
2021-10-31 17:58:15 +11:00
Hugh Rundle 45158a1c03 improve isni search logic
- skip ISNIs that aren't persons
- don't look for text values in non-existent nameTitle elements
2021-10-30 09:24:42 +11:00
Hugh Rundle 87ed6f8380 code formatting 2021-10-29 21:14:32 +11:00
Hugh Rundle d87e1b1567 fix encoding
The OCLC server claims that the xml payload is encoded as latin1 (ISO-8859-1).
This causes Requests to incorrectly encode things as latin1, when actually everything is (thank goodness) UTF-8.
We can fix it by just telling Requests that it is really UTF-8

With thanks to Tex Texin, creator of http://i18nqa.com/debug/utf8-debug.html
2021-10-29 21:00:35 +11:00
Hugh Rundle f2e4865adf check isni sources when editing book authors 2021-10-29 16:13:05 +11:00
Hugh Rundle 625cfac76f isni author lookup utility 2021-10-29 16:12:31 +11:00
Mouse Reeve d3e4c7e8d9 Removes change to boolean logic 2021-10-27 10:40:37 -07:00
Mouse Reeve 07446fa7d2 Adds more tests for the inventaire connector 2021-10-27 10:03:09 -07:00
Joachim 56fd147c88 Update test_status_model.py 2021-10-27 19:00:09 +02:00
Joachim b956b79bd0 Add full URL generation to image_serializer 2021-10-27 18:56:37 +02:00
Joachim 35bd4a4071 Apply review suggestion 2021-10-27 18:13:47 +02:00
Mouse Reeve 8ba875af4a Improve federation compability with Hubzilla and Zap
Co-authored-by: hubzilla <redmatrix@users.noreply.github.com>
Fixes #1564
2021-10-26 14:41:06 -07:00
Mouse Reeve 6ba605cbd0
Merge pull request #1577 from hughrun/sort-recent
sort shelves by latest shelved date
2021-10-26 14:31:57 -07:00
Mouse Reeve 0e023fd9c9
Merge pull request #1572 from hughrun/trans-updates
translate all read statuses
2021-10-26 14:28:49 -07:00
Hugh Rundle f4573996e6 black wants double quotes 2021-10-26 21:01:45 +11:00
Hugh Rundle 097da148be sort shelves by latest shelved date
Display the latest 2 books to be shelved in each shelf, when in the homepage feed view.
fixes #1576
2021-10-26 20:17:53 +11:00
Mouse Reeve 98cf322eb1
Merge pull request #1573 from bookwyrm-social/author-page-fix
Fixes duplicate books in author page when there are multiple authors
2021-10-25 11:32:32 -07:00
Mouse Reeve 24bf3f408c Fixes duplicate books in author page when there are mulitple authors 2021-10-25 11:06:54 -07:00
Hugh Rundle c5d530c0c4 translate all read statuses
This fixes #1566 - "Already translated strings sometimes show up untranslated in UI"

- add generatednote status header template
- include the relevant template (to-read/reading/read) based on the status.content
- remove GeneratedNote block from note status header template

This is probably not the most correct way of resolving the problem, but it's simple and it works.
2021-10-25 15:30:48 +11:00
Mouse Reeve f2b11c6ad1
Merge pull request #1565 from bookwyrm-social/translation-whitespace
Translation whitespace
2021-10-24 10:55:11 -07:00
Mouse Reeve 7502158e58 Builds latest changes 2021-10-24 07:10:20 -07:00
Mouse Reeve 9a07c11b19 Fixes group quotes and button whitespace 2021-10-24 06:43:31 -07:00
Mouse Reeve 0f9c363b00 Updates locale file for quotes fix 2021-10-23 08:13:07 -07:00
Mouse Reeve d80a28e128 Consistent quotes around group names in notifications 2021-10-23 08:00:45 -07:00
Mouse Reeve 353ccc1d7d Updates references locale 2021-10-23 07:11:38 -07:00
Mouse Reeve 1e6390a405 Fixes whitespace in translation strings 2021-10-23 06:59:06 -07:00
Mouse Reeve b4a4f91002
Merge pull request #1563 from bookwyrm-social/locale-updates
Updates locales
2021-10-22 11:23:40 -07:00
Mouse Reeve 37ff68adb1 Updates with new translation strings 2021-10-22 10:48:22 -07:00
Mouse Reeve 230c6f6798 Updates locales 2021-10-22 10:46:56 -07:00
Mouse Reeve ac749d94b2
Merge pull request #1562 from bookwyrm-social/suggested-users-tests
Adds a few more tests to the suggested users module
2021-10-22 10:39:11 -07:00
Mouse Reeve c59abdc89a
Merge pull request #1561 from hughrun/group-privacy
Fix Group privacy
2021-10-22 10:38:43 -07:00
Mouse Reeve f39ff96a64 Adds a few more tests to the suggested users module 2021-10-22 10:25:33 -07:00
Hugh Rundle bdb6e4c911 fix template indenting
whoops
2021-10-22 21:15:48 +11:00
Hugh Rundle 1d791d950f add migration for updated notification types 2021-10-22 20:30:25 +11:00
Hugh Rundle bcbff4f002 Merge branch 'main' into group-privacy 2021-10-22 20:28:31 +11:00
Hugh Rundle 6bc86f189f notify group members of group changes
Send a notification to all group members when group name, description, or privacy are changed.
2021-10-22 20:23:45 +11:00
Hugh Rundle c9deda8fdd remove superfluous field 2021-10-22 20:21:55 +11:00
Hugh Rundle 80edc1e95e remove trailing spaces 2021-10-22 20:16:48 +11:00
Hugh Rundle bd20c9ce2c remove followers group visibility test
Also updates description of group.followers_filter() override
2021-10-22 18:42:18 +11:00
Hugh Rundle 19c7e43f50 remove followers privacy option from group form 2021-10-22 18:40:55 +11:00
Mouse Reeve c366f57a8d
Merge pull request #1557 from bookwyrm-social/author-page
Author page pagination
2021-10-21 08:02:50 -07:00
Mouse Reeve 278a9de673 Removes duplicate assertions in author view test 2021-10-20 18:29:00 -07:00
Mouse Reeve 72dc21e82a Adds tests and fixes unset ordering warnings 2021-10-20 18:27:19 -07:00
Mouse Reeve d706b26ac9 Python formatting 2021-10-20 18:11:31 -07:00
Mouse Reeve 14682ed8c6 Prefect related data in author view 2021-10-20 18:04:29 -07:00
Mouse Reeve de93beca84 Adds shelve buttons to books on author page 2021-10-20 17:51:42 -07:00
Mouse Reeve 3eb3225d2c Adds pagination to the template 2021-10-20 17:42:19 -07:00
Mouse Reeve 89a385da0a Paginate books on author page 2021-10-20 17:40:23 -07:00
Mouse Reeve 9d4e0851a0
Merge branch 'main' into image-absolute-url-getter 2021-10-20 15:12:06 -07:00
Mouse Reeve 74b697d844
Merge pull request #1555 from bookwyrm-social/shelf-views
Shelf views
2021-10-20 14:56:46 -07:00
Mouse Reeve f65a54eb4a Python formatting 2021-10-20 14:34:42 -07:00
Mouse Reeve 5c2d6e6510 Separate out test files and add more tests 2021-10-20 14:30:11 -07:00
Mouse Reeve 3d92afdf28 Moves shelf tests into subdirectory 2021-10-20 14:16:13 -07:00
Mouse Reeve 1bb23a8edf Adds more tests of shelf views 2021-10-20 14:15:05 -07:00
Mouse Reeve b64a616ff9 Fixes mock in test 2021-10-20 13:56:55 -07:00
Mouse Reeve 87deac17f9 Make import link a link not a button 2021-10-20 13:31:18 -07:00
Mouse Reeve d86ffc47a7 Fixes incorrect method comment 2021-10-20 13:16:38 -07:00
Mouse Reeve 6a2f962f8d Split shelf view into multiple files 2021-10-20 13:15:43 -07:00
Mouse Reeve baba2e2057 Move shelf views into directory 2021-10-20 13:09:28 -07:00
Mouse Reeve f8bdf3a533
Merge pull request #1552 from bookwyrm-social/german-locale-updates
Updates German locale
2021-10-20 10:40:57 -07:00
Mouse Reeve 9080cf1a6d Updates German locale 2021-10-20 10:22:15 -07:00
Mouse Reeve a27a55b40a
Merge pull request #1490 from hughrun/bookwyrm-groups
Bookwyrm groups
2021-10-17 07:54:59 -07:00
Hugh Rundle ca47f836d1 adjust Group test mocks 2021-10-17 07:21:47 +11:00
Mouse Reeve 2b18e4d235
Merge pull request #1545 from bookwyrm-social/locale_updates
Updates for Portuguese and Simplified Chinese locales
2021-10-16 12:39:04 -07:00
Hugh Rundle 9116af1b3f add makemigrations merge file 2021-10-17 06:33:11 +11:00
Mouse Reeve 5c29d64666 Updates for Portuguese and Simplified Chinese locales 2021-10-16 12:24:39 -07:00
Hugh Rundle 6e5c0cc4c3 Merge branch 'main' into bookwyrm-groups
There are database migrations in main ahead of this branch so they need to be merged in to the branch before we can merge back into main.
2021-10-17 06:22:04 +11:00
Mouse Reeve b215316080
Merge pull request #1544 from bookwyrm-social/landing-views
Landing views
2021-10-16 12:17:26 -07:00
Mouse Reeve 8bdedc9304 Catches some stray unvalidated html in landing tests 2021-10-16 12:07:16 -07:00
Mouse Reeve c852405e42 Moves invite tests 2021-10-16 12:01:24 -07:00
Mouse Reeve 5b22cf8c46 Updates mocks for new view locations 2021-10-16 12:00:06 -07:00
Mouse Reeve d735d03b59 Moves tests into subdirectory 2021-10-16 12:00:03 -07:00
Mouse Reeve 290039ac66 Moves landing views into directory 2021-10-16 11:45:55 -07:00
Mouse Reeve 86824ff1cb Fixes path to invite page in admin view 2021-10-16 11:32:51 -07:00
Mouse Reeve 63163ca0ff Python formatting 2021-10-16 11:23:45 -07:00
Mouse Reeve 4a695ce612 Update environs to fix zillions of warnings 2021-10-16 11:17:34 -07:00
Mouse Reeve 851a8f6958 More registration tests 2021-10-16 11:15:57 -07:00
Mouse Reeve ad26e65109 Fixes clashing identifier and attr with no quotes 2021-10-16 11:15:38 -07:00
Mouse Reeve 3118cdfbb6 Adds another register test 2021-10-16 10:56:22 -07:00
Mouse Reeve 7ec573bf50 Fixes duplicate form ids in login form 2021-10-16 10:55:51 -07:00
Mouse Reeve 5e9cc5eec5 Validate remaining templates 2021-10-16 10:46:05 -07:00
Mouse Reeve ea268449fa Python formatting 2021-10-16 10:38:45 -07:00
Mouse Reeve 68cbea60a9 Updates registration tests with html validation 2021-10-16 10:34:41 -07:00
Mouse Reeve dce0c85602 Fixes clashing input ids on reset password form 2021-10-16 10:28:38 -07:00
Mouse Reeve bec56180f0 Fixes label on layout login form 2021-10-16 10:20:06 -07:00
Mouse Reeve 974c05dedb Adds more password view tests 2021-10-16 10:14:53 -07:00
Mouse Reeve b56147d70c Use validate html in landing views tests 2021-10-16 10:09:25 -07:00
Mouse Reeve 8cb91acb93 Move logged out templates into a directory 2021-10-16 10:00:31 -07:00
Mouse Reeve 5558216917
Merge pull request #1542 from bookwyrm-social/cancel-button
A cancel button that leads nowhere
2021-10-16 07:21:39 -07:00
Mouse Reeve 17eebfb916
Merge pull request #1537 from bookwyrm-social/locale-improvements
Locale improvements
2021-10-16 07:13:56 -07:00
Mouse Reeve 94bce7fd83 Use javascript back button on create book page 2021-10-16 07:11:12 -07:00
Mouse Reeve 584e0a54af Adds test to catch invalid link 2021-10-16 07:06:49 -07:00
Hugh Rundle 8192d6ad10 code indenting fix 2021-10-16 18:00:55 +11:00
Hugh Rundle 0cd8ece474 code formatting 2021-10-16 17:45:39 +11:00
Hugh Rundle a476b52f86 database migrations for groups 2021-10-16 17:45:21 +11:00
Hugh Rundle 2a31bf2f0c delete groups
Whoops, forgot to add this functionality earlier.

- allow owner to delete a group
- change all group lists to closed curation with group=False when group deleted
2021-10-16 17:35:36 +11:00
Hugh Rundle 85784f07d2 groups templates improvements
- require confirmation before removing a member
- require confirmation before removing self
- make button text less verbose
- use more standardised formatting for group editing form
- improve button colours
- add missing trans tags
- reload group page when removing member
2021-10-16 16:43:09 +11:00
Hugh Rundle 1736419538 (hopefully) fix group tests 2021-10-16 16:42:08 +11:00
Hugh Rundle 91534aff82 group view fixes
- fix form details not appearing in group member search view
- fix query term appearing in main search box when searching for new members
- direct request user back to the group rather than the user when adding a user to a group
2021-10-16 16:39:50 +11:00
Hugh Rundle afd00cc67a improve group removal flow
Use .save() twice, but with broadcast=False on the second update. This is more efficient than doing a query and update() and avoids the duplicate AP broadcast.
2021-10-16 16:38:02 +11:00
Hugh Rundle 6f13c0d808 formatting fix 2021-10-16 16:09:03 +11:00
Mouse Reeve 3b817adf97 Updates locales with edit page change 2021-10-15 15:04:19 -07:00
Mouse Reeve fe00032da5 Merge branch 'main' into locale-improvements 2021-10-15 15:02:44 -07:00
Mouse Reeve 53e49baa20
Merge pull request #1538 from bookwyrm-social/author-page
Author page validation
2021-10-15 15:02:22 -07:00
Mouse Reeve 2945a88a1d
Merge pull request #1539 from bookwyrm-social/edit-tweaks
Edit tweaks
2021-10-15 14:56:16 -07:00
Mouse Reeve 0e30d1f856 Show status header on edit page 2021-10-15 14:45:26 -07:00
Mouse Reeve 896885bffd Don't show progress field on status update comments
Also retitle the view
2021-10-15 14:43:02 -07:00
Mouse Reeve a9daa4670e Retain reading status on comments 2021-10-15 14:41:14 -07:00
Mouse Reeve 1e7b56cdb0 Don't show last edited by link if it's not set 2021-10-15 14:26:16 -07:00
Mouse Reeve 931f78d7c2 Validate author page html 2021-10-15 14:26:07 -07:00
Hugh Rundle e261bfdb6a fix local filter for suggested users 2021-10-16 08:20:12 +11:00
Hugh Rundle 864d8cea2b clean up templates 2021-10-16 08:18:55 +11:00
Hugh Rundle 97ea61dd7e efficiency improvement to remove_from_group 2021-10-16 08:17:42 +11:00
Mouse Reeve 9e7b73a884 Compiles locales 2021-10-15 14:13:59 -07:00
Mouse Reeve 4178d1f7f6 Adds context to translation strings on discover page 2021-10-15 14:10:34 -07:00
Mouse Reeve 3621224074 Properly localize book format 2021-10-15 13:59:07 -07:00
Mouse Reeve dede101d17 Capitalize html and markdown 2021-10-15 13:58:59 -07:00
Mouse Reeve 032dedabb4 Goodreads capitalization standardization 2021-10-15 13:50:05 -07:00
Mouse Reeve 7f75cd329a Use instance name instead of the word "instance" where possible
trying to use less jargon
2021-10-15 13:42:32 -07:00
Mouse Reeve eac1ed3484
Merge pull request #1534 from bookwyrm-social/followers-display
Fixes privacy filters for followers-only replies
2021-10-15 13:38:42 -07:00
Mouse Reeve 145a31045a Use "like" consistently (instead of mixing in "favorite") 2021-10-15 13:36:48 -07:00
Mouse Reeve c6caa5a3f4 Fixes privacy display 2021-10-15 13:26:02 -07:00
Mouse Reeve 66a2b4c7c7 Tests for status raise_visible_to_user function 2021-10-15 13:25:47 -07:00
Hugh Rundle 2f38af4faa Revert "clean up List db queries"
This reverts commit 41f27a4a66.

I forgot that update() can only be done on a query result, not on an object, so we will need to go back to querying in order to update rather than saving.
2021-10-16 06:59:07 +11:00
Mouse Reeve 1072381b7d Fixes followers filter for non-status objs 2021-10-15 11:09:46 -07:00
Mouse Reeve 72a8f34a8f
Merge pull request #1536 from bookwyrm-social/markdown
Edit posts in original markdown syntax
2021-10-15 10:48:21 -07:00
Mouse Reeve bd0e4abd56 Uses correct model field for raw values 2021-10-15 10:36:46 -07:00
Mouse Reeve 61a0b50b91 Test raw version is saved 2021-10-15 10:10:38 -07:00
Mouse Reeve e8f5678867 More test names 2021-10-15 10:10:25 -07:00
Mouse Reeve 60b910172d Update migration 2021-10-15 10:09:34 -07:00
Mouse Reeve b9e6824360 Imrpove test names 2021-10-15 10:07:29 -07:00
Mouse Reeve 117e6a08b2 Merge branch 'main' into markdown 2021-10-15 10:06:34 -07:00
Mouse Reeve 1e41458a44
Merge pull request #1535 from bookwyrm-social/edit-posts
Edit posts
2021-10-15 10:04:17 -07:00
Mouse Reeve 9ac5384d68 Fixes test and css linter 2021-10-15 09:54:14 -07:00
Mouse Reeve b84152d84b tick version number 2021-10-15 09:42:21 -07:00
Mouse Reeve 2f40394c0a Updates edited display 2021-10-15 09:41:29 -07:00
Mouse Reeve 1b1e557800 Updates app to use date instead of boolean 2021-10-15 09:08:10 -07:00
Mouse Reeve b11b810ec9 Use edit date to track is status has been updated 2021-10-15 08:56:07 -07:00
Mouse Reeve 20cca69f06 Test update status via inbox 2021-10-15 08:52:32 -07:00
Mouse Reeve 4002df04fc Send update activity on edit 2021-10-15 08:15:48 -07:00
Hugh Rundle 1634c8774e remove useless field in Notifications model 2021-10-15 17:59:39 +11:00
Hugh Rundle 41f27a4a66 clean up List db queries
- don't unnecessarily query DB in List views
- use more efficient query in remove_from_group List class method
2021-10-15 17:56:23 +11:00
Mouse Reeve 50db0bd012 Hide reply panel in no interact mode 2021-10-14 20:29:45 -07:00
Mouse Reeve 0dba071126 Fixes editing replies 2021-10-14 19:14:47 -07:00
Mouse Reeve e43cade6cc Test edit view 2021-10-14 19:13:02 -07:00
Mouse Reeve af567ba05e Edit posts in original markdown syntax 2021-10-14 18:34:26 -07:00
Mouse Reeve 01911d3b23 Update and indicate edit status 2021-10-14 17:33:45 -07:00
Mouse Reeve 175df2181c Adds edited field to status model 2021-10-14 17:33:04 -07:00
Mouse Reeve 2d1052766d Fixes undefined variable error 2021-10-14 17:32:38 -07:00
Mouse Reeve f5e52d6a11 Save updated statuses 2021-10-14 17:23:54 -07:00
Mouse Reeve 066f14ca84 Save edited statuses 2021-10-14 17:13:54 -07:00
Mouse Reeve 8a08d789cb Removes delete and redraft tests 2021-10-14 17:13:15 -07:00
Mouse Reeve 92535a5481 Python formatting 2021-10-14 16:57:58 -07:00
Mouse Reeve df27614937 Don't use localstorage cache for edits 2021-10-14 16:53:46 -07:00
Mouse Reeve e149a14e73 Use href instead of POST form to edit status 2021-10-14 16:53:42 -07:00
Mouse Reeve 7488f8da96 Creates edit status endpoint 2021-10-14 16:30:27 -07:00
Mouse Reeve cc650e235b Fixes privacy filters for followers-only replies 2021-10-14 16:26:28 -07:00
Mouse Reeve 599818dc43
Merge pull request #1533 from bookwyrm-social/fixes-display-identifiers
Fixes book identifiers not displaying
2021-10-14 16:25:50 -07:00
Mouse Reeve b9251b4dc7 Fixes book identifiers not displaying 2021-10-14 16:11:33 -07:00
Mouse Reeve 1f6f543847 Use url templatetag to load posting urls 2021-10-14 15:56:34 -07:00
Mouse Reeve d5b247b905 Merge branch 'main' into edit-posts 2021-10-14 15:49:08 -07:00
Mouse Reeve c1287f800e
Merge pull request #1529 from scientia-ac-labore/add_sort_books
Add sorting to shelf. Use table-sort-header
2021-10-14 15:46:08 -07:00
Faiazov Dmitrii 1abbc67483 Make requested changes.
Signed-off-by: Faiazov Dmitrii <jjsolutions0110@gmail.com>
2021-10-14 13:39:15 +03:00
Mouse Reeve 803ad3c911 Removes delete and redraft view 2021-10-13 13:12:56 -07:00
Mouse Reeve 5b25811034
Merge pull request #1531 from bookwyrm-social/german-updates
Adds additional German translations
2021-10-13 12:46:44 -07:00
Mouse Reeve 48d3ef1f3c
Merge pull request #1530 from bookwyrm-social/portuguese-update
Updates to Portuguese locale
2021-10-13 12:34:38 -07:00
Mouse Reeve 94fcd3c8a1 Adds additional German translations 2021-10-13 12:31:54 -07:00
Mouse Reeve de09d73016 Updates to Portuguese locale 2021-10-13 12:22:27 -07:00
Faiazov Dmitrii ce16f36fe8 Add sorting to shelf. Use table-sort-header
existing template.

Signed-off-by: Faiazov Dmitrii <jjsolutions0110@gmail.com>
2021-10-13 21:25:40 +03:00
Mouse Reeve e340e7360d
Merge pull request #1526 from bookwyrm-social/spanish-locale
Updates Spanish locale
2021-10-11 12:34:43 -07:00
Mouse Reeve 2882f96c08 Adds compiled spanish file 2021-10-11 12:19:38 -07:00
Mouse Reeve 4384098292 Updates Spanish locale 2021-10-11 12:17:39 -07:00
Mouse Reeve 2ad547a90b
Merge pull request #1525 from bookwyrm-social/unused-locales
Remove locales without translations
2021-10-11 10:34:53 -07:00
Mouse Reeve e958bd7680 Remove locales without translations 2021-10-11 10:21:42 -07:00
Mouse Reeve 551a8c459f
Merge pull request #1524 from bookwyrm-social/portuguese
Portuguese locale
2021-10-11 10:19:28 -07:00
Mouse Reeve 81e0115551 Up to date locale 2021-10-11 10:10:37 -07:00
Mouse Reeve 58ba1ddf87 Typo fix 2021-10-11 10:07:02 -07:00
Mouse Reeve 48b84afbde Python formatting 2021-10-11 09:37:25 -07:00
Mouse Reeve 18cec21a37 Compiles locales 2021-10-11 09:25:11 -07:00
Mouse Reeve 69110497ae Adds Brazilian Portuguese locale 2021-10-11 09:23:28 -07:00
Hugh Rundle 5d7f77021b dammit eslint 2021-10-10 14:02:55 +11:00
Hugh Rundle 3d74b10c5f eslinting 2021-10-10 13:55:18 +11:00
Hugh Rundle 726217577f linting 2021-10-10 13:18:16 +11:00
Hugh Rundle 14d3158871 add database migrations for Groups 2021-10-10 12:33:51 +11:00
Hugh Rundle 2a78c1221c style cleanup
Even tests must be formatted to please Black...
2021-10-10 12:33:11 +11:00
Hugh Rundle 8ae20928bb add tests for groups 2021-10-10 12:06:54 +11:00
Hugh Rundle 18735bdd42 use update() to remove orphaned groups on list edit
Using add() broadcasts the database change, which is unnecessary potentially broadcast AP messages twice.
2021-10-10 12:04:03 +11:00
Hugh Rundle d6a5794ac3 do not load list edit form if viewer not authenticated 2021-10-10 12:02:27 +11:00
Hugh Rundle 83f46b6cda remove print() statement
Whoops accidentally left this behind from manual troubleshooting
2021-10-10 12:01:21 +11:00
Hugh Rundle 252ff0d689 emblacken files
Wouldn't it be great if I just remembered to run Black before every commit?
2021-10-09 22:15:24 +11:00
Hugh Rundle b3cc9e5b75 remove user and their lists from group when group.user blocks them
Lists are changed to closed curation with no group.
2021-10-09 22:13:12 +11:00
Hugh Rundle 9940abfd81 refactor removing user from group
This is in preparation for removing a user and their lists when the group owner blocks them.
Remove the user via models.group
Remove the lists via models.list
2021-10-09 22:11:46 +11:00
Hugh Rundle 1bf5758e01 overide filters for groups and group lists
- use more sensible query for displaying groups on user page
- privacy_filter now allows group members to see followers_only and private lists and groups they would otherwise not see
2021-10-09 16:11:11 +11:00
Hugh Rundle 714a369246 only show list edit form to list.user 2021-10-09 16:10:00 +11:00
Mouse Reeve d7f8a7b99e
Merge pull request #1518 from bookwyrm-social/french-locale
Updates for French locale
2021-10-08 11:32:43 -07:00
Mouse Reeve 1702cbf76d Compiled locale 2021-10-08 11:21:09 -07:00
Mouse Reeve aeafb54d8d Updates for French locale 2021-10-08 10:40:02 -07:00
Hugh Rundle 056150d583 CASCADE group.user
Delete groups when group.user is deleted.
2021-10-08 21:21:19 +11:00
Hugh Rundle 39e002ee13 Merge remote-tracking branch 'origin/bookwyrm-groups' into bookwyrm-groups
Merge changes from main project into local branch
2021-10-08 18:53:59 +11:00
Hugh Rundle 5a4026cda3 group views tests 2021-10-08 18:47:03 +11:00
Hugh Rundle 05bde27944 remove commented out code 2021-10-08 18:46:30 +11:00
Hugh Rundle 48fc85c761 adjust commenting on js file 2021-10-08 18:45:28 +11:00
Mouse Reeve cef46a1827 Adds migration 2021-10-07 17:30:42 -07:00
Mouse Reeve 4ba3234f6c
Merge branch 'main' into bookwyrm-groups 2021-10-07 17:27:11 -07:00
Mouse Reeve 2ede3c63ec
Merge pull request #1516 from bookwyrm-social/l10n_main
New Crowdin updates
2021-10-07 17:25:20 -07:00
Mouse Reeve 5578efe50b New translations django.po (Oulipo) 2021-10-07 17:04:04 -07:00
Mouse Reeve dc15feeb57 New translations django.po (Spanish) 2021-10-07 17:04:03 -07:00
Mouse Reeve b3c441ed06 New translations django.po (Afrikaans) 2021-10-07 17:04:02 -07:00
Mouse Reeve 5a943362d4 New translations django.po (Arabic) 2021-10-07 17:04:01 -07:00
Mouse Reeve e1d1dc104a New translations django.po (Catalan) 2021-10-07 17:04:00 -07:00
Mouse Reeve a645c9cb1a New translations django.po (Czech) 2021-10-07 17:03:59 -07:00
Mouse Reeve 974cfcff0d New translations django.po (Danish) 2021-10-07 17:03:58 -07:00
Mouse Reeve 4d27d505f1 New translations django.po (German) 2021-10-07 17:03:57 -07:00
Mouse Reeve 3666e1e7f4 New translations django.po (Greek) 2021-10-07 17:03:56 -07:00
Mouse Reeve 96ab4b22ff New translations django.po (Finnish) 2021-10-07 17:03:55 -07:00
Mouse Reeve 6a989348cf New translations django.po (Hebrew) 2021-10-07 17:03:54 -07:00
Mouse Reeve 324b7b98c8 New translations django.po (Hungarian) 2021-10-07 17:03:52 -07:00
Mouse Reeve 3c744ffd2b New translations django.po (Italian) 2021-10-07 17:03:51 -07:00
Mouse Reeve 25cd9c8f6e New translations django.po (Japanese) 2021-10-07 17:03:50 -07:00
Mouse Reeve b89476ba2b New translations django.po (French) 2021-10-07 17:03:49 -07:00
Mouse Reeve ab238c51ae New translations django.po (Korean) 2021-10-07 17:03:48 -07:00
Mouse Reeve 0397892159 New translations django.po (Norwegian) 2021-10-07 17:03:47 -07:00
Mouse Reeve f068c691ee New translations django.po (Polish) 2021-10-07 17:03:46 -07:00
Mouse Reeve e107fdb752 New translations django.po (Portuguese) 2021-10-07 17:03:45 -07:00
Mouse Reeve 94564e63af New translations django.po (Russian) 2021-10-07 17:03:44 -07:00
Mouse Reeve 22e1c2b87a New translations django.po (Serbian (Cyrillic)) 2021-10-07 17:03:43 -07:00
Mouse Reeve 4b0e2ff93e New translations django.po (Swedish) 2021-10-07 17:03:42 -07:00
Mouse Reeve 961f499e15 New translations django.po (Turkish) 2021-10-07 17:03:41 -07:00
Mouse Reeve f67a042f52 New translations django.po (Ukrainian) 2021-10-07 17:03:40 -07:00
Mouse Reeve 245e3ccd07 New translations django.po (Chinese Simplified) 2021-10-07 17:03:39 -07:00
Mouse Reeve 610e7bab14 New translations django.po (Chinese Traditional) 2021-10-07 17:03:38 -07:00
Mouse Reeve ceb06f1b54 New translations django.po (Vietnamese) 2021-10-07 17:03:37 -07:00
Mouse Reeve 78e5e6dd93 New translations django.po (Portuguese, Brazilian) 2021-10-07 17:03:36 -07:00
Mouse Reeve 15297c55da New translations django.po (Dutch) 2021-10-07 17:03:35 -07:00
Mouse Reeve 2524785d11 New translations django.po (Romanian) 2021-10-07 17:03:34 -07:00
Mouse Reeve 37e03e8993 Merge branch 'main' into book-file-links 2021-10-07 15:27:16 -07:00
Hugh Rundle 3003b103e4 add group views tests
TODO: the POST test needs to test that the group was actually updated.
2021-10-08 08:38:00 +11:00
Mouse Reeve 21902b09c4 Update Crowdin configuration file 2021-10-06 21:50:47 -07:00
Mouse Reeve 3c36fa741a Update Crowdin configuration file 2021-10-06 21:35:28 -07:00
Mouse Reeve 3c01eddb56 Update Crowdin configuration file 2021-10-06 21:21:17 -07:00
Mouse Reeve be077c38a4 Update Crowdin configuration file 2021-10-06 21:03:58 -07:00
Mouse Reeve 86ab9dde68 Update Crowdin configuration file 2021-10-06 20:46:51 -07:00
Mouse Reeve 27d04d6825 Update Crowdin configuration file 2021-10-06 20:31:24 -07:00
Mouse Reeve 35fffa7b87
Merge pull request #1512 from bookwyrm-social/translation-improvements
Translation improvements
2021-10-06 18:13:02 -07:00
Mouse Reeve 674aa484fd Use target language in choice list 2021-10-06 16:58:27 -07:00
Mouse Reeve 982cd49c51 Fixes english grammar weirdness 2021-10-06 16:33:07 -07:00
Mouse Reeve b23f6afa6c Adds context to curation type "open" 2021-10-06 16:24:23 -07:00
Mouse Reeve f92cdeeb39 Updates locales
(Mostly just line number changes)
2021-10-06 16:23:27 -07:00
Mouse Reeve ab3119031b Adds new locale command in bw-dev 2021-10-06 16:22:30 -07:00
Mouse Reeve f5b0a6ad2d
Merge pull request #1510 from bookwyrm-social/language-preference
Users can language preference in account
2021-10-06 13:17:40 -07:00
Mouse Reeve 26de524247 Update language on login and edit preference 2021-10-06 13:01:29 -07:00
Mouse Reeve c0af69045c Adds language customization to preferences 2021-10-06 12:20:05 -07:00
Mouse Reeve ba5ec878fa Adds language preference to database 2021-10-06 12:19:52 -07:00
Mouse Reeve 73a8f89bee
Merge branch 'main' into bookwyrm-groups 2021-10-06 11:37:38 -07:00
Mouse Reeve 15fb20012b
Merge pull request #1508 from bookwyrm-social/privacy_filter
Privacy filter
2021-10-06 11:34:29 -07:00
Mouse Reeve 8d00ef4318 Style cleanup 2021-10-06 11:23:36 -07:00
Mouse Reeve 53e5762563 Status-specific filters in status model 2021-10-06 11:19:13 -07:00
Mouse Reeve 34d6c88861 Move privacy levels filter to clearer location 2021-10-06 11:15:17 -07:00
Mouse Reeve 2307cb2227 Filter followers only in place
It's only used in one spot
2021-10-06 11:12:03 -07:00
Mouse Reeve 68b6b1fbae User override in child class instead of if/else for privacy_filter 2021-10-06 11:08:54 -07:00
Mouse Reeve 97cc129478 Updates calls to privacy_filter 2021-10-06 10:37:09 -07:00
Mouse Reeve b2671e78ef Moves privacy filter to model class 2021-10-06 09:48:11 -07:00
Mouse Reeve 67c83b8d32
Merge pull request #1507 from bookwyrm-social/api-images
Fixes image paths in endpoints
2021-10-06 09:32:51 -07:00
Mouse Reeve 4c539bc7eb Fixes image paths in endpoints 2021-10-06 08:49:07 -07:00
Mouse Reeve 46bfc2b2a2
Merge pull request #1506 from Tak/display-half-stars-when-federating
Display half-stars in generated statuses for federation
2021-10-06 07:01:08 -07:00
Mouse Reeve 15105bda4f Remove follow suggestion on request 2021-10-06 06:48:44 -07:00
Levi Bard 094931d6d1 Display half-stars in generated statuses for federation.
Fixes #1505
2021-10-06 11:37:27 +02:00
Hugh Rundle ec7d0db843 linting fixes 2021-10-05 21:48:59 +11:00
Hugh Rundle f8e0de1ea9 run black for clean code
Godammit Hugh remember to do this before pushing new code.
2021-10-05 21:32:48 +11:00
Hugh Rundle b3dc81dea0 update tests 2021-10-05 21:29:46 +11:00
Hugh Rundle 6fde19e9b1 lint fixes 2021-10-05 21:29:33 +11:00
Hugh Rundle cdf7775e05 add test for Group views 2021-10-05 21:06:09 +11:00
Hugh Rundle fe87e815e6 database migrations for Groups 2021-10-05 20:41:48 +11:00
Hugh Rundle b1bb43d143 lint Group views file 2021-10-05 18:04:47 +11:00
Hugh Rundle cc8db1c353 linting fixes
- remove unused imports
- add class docstrings
2021-10-05 09:05:20 +11:00
Hugh Rundle 484e9ed959 fix user Groups view pagination function 2021-10-05 08:14:52 +11:00
Hugh Rundle 90d92edd75 disable pylint on NotificationType now being "too long" 2021-10-05 08:10:23 +11:00
Hugh Rundle 78f5003407 lint raise_visible_to_user
Don't return True unnecessarily
2021-10-05 08:09:24 +11:00
Mouse Reeve 2a97458878
Merge pull request #1504 from bookwyrm-social/follow-request-recs
Remove follow suggestion on request
2021-10-04 13:14:32 -07:00
Mouse Reeve f99a61b6bd Remove follow suggestion on request 2021-10-04 12:52:51 -07:00
Mouse Reeve ebbc56b3d0
Merge pull request #1503 from bookwyrm-social/dashboard
More! Charts!
2021-10-04 11:59:46 -07:00
Mouse Reeve 636eca97cb Better mobile display 2021-10-04 11:22:14 -07:00
Mouse Reeve 2335945a50 Python formatting 2021-10-04 11:16:02 -07:00
Mouse Reeve 551b49b903 Adds works chart and updates colors 2021-10-04 11:14:50 -07:00
Mouse Reeve 5fdf9c569a
Merge pull request #1502 from bookwyrm-social/boost-bug-again
Boost bug again
2021-10-04 10:58:51 -07:00
Mouse Reeve 37cd7e684c Updates chart markup 2021-10-04 10:53:22 -07:00
Mouse Reeve fa241b08e7 Rename charts snippets and add register chart file 2021-10-04 10:42:02 -07:00
Mouse Reeve 2a88753e17 Chart class 2021-10-04 10:40:39 -07:00
Mouse Reeve ac70a810af Boosts by remote users 2021-10-04 09:58:05 -07:00
Mouse Reeve 321949f2fa Lightly updates tests 2021-10-04 09:47:33 -07:00
Mouse Reeve 443750d6db f strings for activistreams tasks tests 2021-10-04 09:14:04 -07:00
Hugh Rundle da53bad0f5 make Black happy 2021-10-04 22:22:00 +11:00
Hugh Rundle 3a90311129 update indenting for linter 2021-10-04 22:20:02 +11:00
Hugh Rundle 05969c5311 improve group creation hint
- use help class
- hopefully make the linter happy
2021-10-04 22:18:51 +11:00
Hugh Rundle 57b2c83c64 disable pylint suppression
I don't know what this does so I removed it - maybe I'll find out!
2021-10-04 21:34:54 +11:00
Hugh Rundle dafda649f1 run Black on changed code 2021-10-04 21:31:28 +11:00
Hugh Rundle 782512b2ce replace get_group_suggestions
- adds **filters argument to get_suggestions()
- passes local=True arg to get_suggestions() for group member suggestions
- removes get_group_suggestions()

Thanks to Mouse for the suggestion to keep the codebase DRY!
2021-10-04 21:25:38 +11:00
Hugh Rundle 2b96b3365c Merge branch 'main' into bookwyrm-groups 2021-10-04 21:10:15 +11:00
Mouse Reeve 2fe810ce5c
Merge pull request #1501 from oragegu/main
French and German Translation modifications as discussed at issues
2021-10-03 18:44:27 -07:00
oragegu 1aa3d67d64 localisation compiled 2021-10-04 02:44:37 +02:00
OragePika, aka "FANS DON'T CARE 7bf21cfb78
Merge branch 'bookwyrm-social:main' into main 2021-10-03 23:29:56 +02:00
Mouse Reeve af068bdfd7
Merge pull request #1499 from bookwyrm-social/broken-migration
Fixes broken migration
2021-10-03 13:37:31 -07:00
Mouse Reeve ea18252549 Fixes broken migration 2021-10-03 13:26:02 -07:00
OragePika, aka "FANS DON'T CARE 23b021e87d
Update django.po 2021-10-03 21:48:36 +02:00
Mouse Reeve e12ac94e18
Merge pull request #1498 from bookwyrm-social/missing-migration
Adds missing connector migration
2021-10-03 12:27:46 -07:00
Mouse Reeve 5cd8109820 Adds missing connector migration 2021-10-03 12:15:44 -07:00
Mouse Reeve a3f0e23d23
Merge pull request #1496 from bookwyrm-social/fix-add-book
Fixes create book flow for search refactor
2021-10-03 12:12:10 -07:00
Mouse Reeve d72d4eddfd
Merge pull request #1495 from bookwyrm-social/unblock-bug
Unblock bug
2021-10-03 12:02:18 -07:00
Mouse Reeve 889930aa69 Fixes create book flow for search refactor 2021-10-03 11:55:16 -07:00
Mouse Reeve 0798ba028f Fixes unblock signal 2021-10-03 11:51:17 -07:00
Mouse Reeve 668f71f96c Tests block and unblock activitystream signals 2021-10-03 11:45:19 -07:00
Mouse Reeve 15f6d2afc4
Merge pull request #1494 from bookwyrm-social/search-limits
Remove hard limit on search endpoints
2021-10-03 11:45:12 -07:00
Mouse Reeve f4cb5933e4
Merge pull request #1493 from bookwyrm-social/auth-search
Logged out users can't search remote sources
2021-10-03 09:57:25 -07:00
Mouse Reeve 9059b78b57 Fixes testing if endpoint got results 2021-10-03 09:44:27 -07:00
Mouse Reeve 3ed72e60f5
Merge pull request #1492 from hughrun/new-shelf-fix
fix for #1491 new shelf creation not displaying name field
2021-10-03 09:39:14 -07:00
Mouse Reeve 7d8cd99926 Remove hard limit on search endpoints 2021-10-03 09:38:41 -07:00
Mouse Reeve ca7967a3a3 Adds test for remote search for anonymous user 2021-10-03 09:29:24 -07:00
Mouse Reeve 4787d854b8 require auth on resolve book endpoint 2021-10-03 09:19:19 -07:00
Mouse Reeve 9a5003f92a Don't let anonymous users search remote data 2021-10-03 09:18:17 -07:00
Hugh Rundle c59194f808 Merge branch 'main' into new-shelf-fix 2021-10-03 19:47:15 +11:00
Hugh Rundle 9509c5e288 new shelves can be given names always
Previously new shelves created when a default shelf was selected did not provide the option to create a new unique name. Now they do.
fixes #1491
2021-10-03 19:41:38 +11:00
Mouse Reeve cd5541ac30
Merge pull request #1487 from bookwyrm-social/thread
Fixes thread display
2021-10-02 20:15:46 -07:00
Hugh Rundle 0d5c20bcde remove_from_group button updates
- enable blocked users to be removed
- make "remove" button more subtle
2021-10-03 13:57:21 +11:00
Hugh Rundle 9d8e978686 sort group members in UserGroups view 2021-10-03 13:45:41 +11:00
Hugh Rundle c04659984f fix raise_not_editable for group lists 2021-10-03 13:45:19 +11:00
Mouse Reeve 3c82230eed Load subclasses 2021-10-02 19:24:23 -07:00
Mouse Reeve da075a92a1
Merge pull request #1489 from bookwyrm-social/migration-fix
Less costly migration
2021-10-02 19:23:25 -07:00
Mouse Reeve c821aaa18e Load status ancestors 2021-10-02 19:22:11 -07:00
Mouse Reeve e1271dd079 Less costly migration 2021-10-02 19:04:01 -07:00
Hugh Rundle 603a9dc25c fix group members not being able to delete items on group lists 2021-10-03 12:22:03 +11:00
Hugh Rundle 7db2af89dd use group.local_path instead of harcoded url 2021-10-03 12:03:37 +11:00
Hugh Rundle 1ad8d87434 use raise_visible_to_user in group model
instead of if visible_to_user
2021-10-03 12:02:57 +11:00
Hugh Rundle f13223b8ca add notifications for groups
Moved into new structure after merge.
2021-10-03 11:46:51 +11:00
Hugh Rundle 77ac8e0c04 add group membership to raise_not_deletable for lists 2021-10-03 11:45:53 +11:00
Mouse Reeve 14ac8bb1b5 Python formatting 2021-10-02 16:56:23 -07:00
Mouse Reeve 43f0440505 Improved privacy query 2021-10-02 16:55:15 -07:00
Mouse Reeve cd57161489 Privacy filter for thread 2021-10-02 16:55:05 -07:00
Hugh Rundle 602664b8d7 Merge branch 'main' into groups-merge-test
Big merge of a couple of weeks' work from the main project back into this branch. :ohno:
2021-10-03 10:49:38 +11:00
Hugh Rundle f39887cf7f groups should appear before lists on user pages 2021-10-03 10:07:47 +11:00
Mouse Reeve 7caaddbb22 Get thread children with depth first recusive search 2021-10-02 15:50:09 -07:00
Hugh Rundle 1c5789f283 remove group-curated lists when user leaves group 2021-10-03 09:16:19 +11:00
Hugh Rundle a179de33bc fix incorrect wording on group selection
select a group, not a list!
2021-10-03 09:07:42 +11:00
Hugh Rundle 4ea99d1763 don't assign a group when creating non-group curated lists
same as updating a list but for if a user changes their mind about curation when initially creating a list.
2021-10-03 09:06:06 +11:00
Mouse Reeve a36bbaf809
Merge pull request #1486 from bookwyrm-social/author-display
Improves display on author page
2021-10-02 11:55:17 -07:00
Mouse Reeve 55a556863c Improves display on author page
Fixes #1482
2021-10-02 11:44:25 -07:00
Mouse Reeve eaa77906b2
Merge pull request #1485 from bookwyrm-social/notifications
Refactors notifications templates
2021-10-02 11:41:18 -07:00
Mouse Reeve 446d286b12
Merge pull request #1483 from bookwyrm-social/threads
Threads
2021-10-02 11:41:10 -07:00
Mouse Reeve db74538345 Update for js linter 2021-10-02 11:28:16 -07:00
Mouse Reeve b9632039f9 Link notification block to its main path 2021-10-02 11:26:22 -07:00
Mouse Reeve 2a9f8f8122 Updates curated list notification link generation 2021-10-02 10:52:35 -07:00
Mouse Reeve 5adbf2d087 Move notification items into dir 2021-10-02 10:46:09 -07:00
Mouse Reeve 0320898f4e Expands notifications views test 2021-10-02 10:42:38 -07:00
Mouse Reeve 1d79bb58e1 Better mobile display for notifications 2021-10-02 10:28:49 -07:00
Mouse Reeve 085d3270a3 Load related objects in query
Reduces query load in template
2021-10-02 10:11:27 -07:00
Mouse Reeve 5f193f35bf
Merge pull request #1484 from bayocr/add-some-spanish-translations
Add some missing Spanish translations
2021-10-02 09:53:39 -07:00
Mouse Reeve 8f56ad9e99 Adds report templates 2021-10-02 09:50:48 -07:00
bayocr 16651728a8 Fix word from %(name) to %(name)s 2021-10-02 11:54:43 -04:00
Mouse Reeve df8f67895c Adds mention notification template 2021-10-02 08:09:57 -07:00
Mouse Reeve 29157d03fc Create snippet for notification items 2021-10-02 07:34:59 -07:00
Mouse Reeve 9d765751e8 Creates notification template directory 2021-10-02 07:32:00 -07:00
Hugh Rundle 680e547c8b add button for non-owner members to leave group 2021-10-02 21:24:26 +10:00
Hugh Rundle eed9d44cfd fix visible_to_user for groups user is a member of 2021-10-02 20:52:19 +10:00
Hugh Rundle 72e00f75c9 send notification when other group members add books to group lists 2021-10-02 20:14:53 +10:00
Hugh Rundle 3a954ca6ae improve responsive layout for groups 2021-10-02 20:05:19 +10:00
Hugh Rundle 29f18ee123 only suggest local users as potential group members 2021-10-02 19:35:57 +10:00
Hugh Rundle 2c399fe1aa fix suggested members all appearing in a column 2021-10-02 19:35:08 +10:00
Hugh Rundle 8708d71f4b group members can see lists
- fix visible_to_user for group objects (like lists)
- temporarily disable privacy_filter on group lists
2021-10-02 18:31:56 +10:00
Hugh Rundle 8496f24032 fix filters for group members to see and edit group lists 2021-10-02 18:09:15 +10:00
Hugh Rundle 832a9b9890 fix group local_path
as per Lists, we need to override get_remote_id to remove the user from the URL
2021-10-02 16:54:44 +10:00
Hugh Rundle 52a083a907 revert name change for Group, GroupMember
these were named as BookwyrmGroup and BookwyrmGroupMember due to a misunderstanding about related_name and a dodgy development environment. This naming makes more sense.
2021-10-02 16:52:34 +10:00
Hugh Rundle 21e6ed7388 complete group notifications
- notify group members when a new member accepts an invitation
- notify all group members when a member leaves or is removed
- notify ex-member when they are removed
2021-10-02 15:48:55 +10:00
Hugh Rundle f82af6382f make message about group members more generic 2021-10-02 15:48:34 +10:00
Hugh Rundle 70e0128052 non-owners can't add users to groups
- hide add-user pages from non-owners
- hide user searchbox from non-owners
- fix find-user searchbox being in wrong place where no results
2021-10-02 14:41:23 +10:00
Hugh Rundle 5237e88aba remove user button for groups 2021-10-02 13:48:53 +10:00
Hugh Rundle 0984972b05 group membership invitations
- fix display of group information on user and group pages
- send, receive, accept and reject invitations
2021-10-02 12:30:48 +10:00
Hugh Rundle 89dea44614 accepting membership fixes
- don't delete the invitation twice
- send membership information properly to notification
2021-10-02 12:29:01 +10:00
bayocr a7c9e60bb2 Fix fuzzy translated in Spanish locale 2021-10-01 22:22:21 -04:00
Hugh Rundle 9290655116 fix urls for group invitations 2021-10-02 12:13:34 +10:00
Hugh Rundle 80fb37b55c add has_groups tag for use on user page 2021-10-02 12:12:59 +10:00
bayocr 445ed7f7da Add some missing Spanish translations 2021-10-01 21:13:54 -04:00
Mouse Reeve bd463ea6fe Lint fixes 2021-10-01 18:09:11 -07:00
Mouse Reeve 29ee99c03e Styles for the thread page 2021-10-01 18:05:48 -07:00
Hugh Rundle 0f3be40957 fix group references in templates
Let's do this the sensible way huh, by using backwards references to memberships etc

Also adds filters for is_member and is_invited so we don't have to do weird things in group Views
2021-10-02 10:47:42 +10:00
Hugh Rundle 2f42161dda disambiguate groups and prep for group invitations
- rename Group to BookwyrmGroup
- create group memberships and invitations
- adjust all model name references accordingly
2021-10-02 10:10:37 +10:00
Mouse Reeve f901806574 Test to ensure incoming statuses have thread ids 2021-10-01 14:56:38 -07:00
Mouse Reeve ca4b262e72 Link to status anchor 2021-10-01 14:50:42 -07:00
Mouse Reeve 0cd55147ee Set thread id on parent status 2021-10-01 14:41:30 -07:00
Mouse Reeve 7ff040470f Use more f strings in status models test file 2021-10-01 14:26:01 -07:00
Mouse Reeve 8461fe5ec3 Adds anchor id to status 2021-10-01 14:12:49 -07:00
Mouse Reeve 565c9dfa72 Removes block div from thread markup 2021-10-01 14:12:34 -07:00
Mouse Reeve b8fd909fe3 Adds thread id to status model 2021-10-01 14:12:03 -07:00
Mouse Reeve a24fe558fc
Merge pull request #1480 from bookwyrm-social/comment-formatting
Post-processes statuses composed in modals
2021-10-01 12:00:56 -07:00
Mouse Reeve 70bf7c522f Adds tests 2021-10-01 11:23:35 -07:00
Mouse Reeve d2f80c2446 Adds test for reading status with comment 2021-10-01 10:57:56 -07:00
Mouse Reeve 7d03bfd2f6
Merge pull request #1477 from bookwyrm-social/add-edit-book
Updates for adding and editing books
2021-10-01 10:36:09 -07:00
Mouse Reeve 74d2cf646a Moves meta tags out of p tags
I guess that's not kosher
2021-10-01 10:25:23 -07:00
Mouse Reeve 428d87a351 Don't render empty html about books 2021-10-01 10:08:56 -07:00
Mouse Reeve 0928fd03a6 Update mocks in editions tests 2021-10-01 10:08:31 -07:00
Mouse Reeve 58fa3d9ad6 Fixes dl syntax 2021-10-01 09:24:26 -07:00
Mouse Reeve a7614d8c35 Moves editions page tests into separate file 2021-10-01 09:24:10 -07:00
Mouse Reeve 7c52feeab4 Skip modal layout in curlylint 2021-09-30 22:27:30 -07:00
Mouse Reeve 34948d494c Python formatting 2021-09-30 22:23:29 -07:00
Mouse Reeve 6902ffc4c3 Adds missing view file 2021-09-30 22:22:32 -07:00
Mouse Reeve bdb1d1998a Helper function for html validation 2021-09-30 22:22:20 -07:00
Mouse Reeve 9c78a9d95c test fixes 2021-09-30 22:02:07 -07:00
Mouse Reeve 6178925053 Unique form identifier for delete status button 2021-09-30 22:01:55 -07:00
Mouse Reeve ccc52287c5 More error filtering 2021-09-30 20:01:57 -07:00
Mouse Reeve 9a421afafd
Merge pull request #1413 from bookwyrm-social/search-refactor
Search refactor
2021-09-30 13:12:41 -07:00
Mouse Reeve 3f44389c6b Adds new test file for search 2021-09-30 13:03:36 -07:00
Mouse Reeve 92f9319fe1 Updates tests that reference self_connector 2021-09-30 11:46:17 -07:00
Mouse Reeve 1033d3d045 Updates connector tests 2021-09-30 11:33:04 -07:00
Mouse Reeve 232e4bed79 Updates migrations 2021-09-30 11:06:12 -07:00
Mouse Reeve 38f82fe660 Remove/re-add connector in migration 2021-09-30 10:55:18 -07:00
Mouse Reeve e6e44decf9 Updates migration 2021-09-30 10:47:53 -07:00
Mouse Reeve 5dd2aac600 Merge branch 'main' into search-refactor 2021-09-30 10:41:30 -07:00
Mouse Reeve 75e69eb269 Post-processes statuses composed in modals 2021-09-30 10:00:05 -07:00
Mouse Reeve 9a96df1712 Unique id for privacy fields 2021-09-29 15:58:37 -07:00
Mouse Reeve 305dcc504b Unique names for fallback forms 2021-09-29 15:52:08 -07:00
Mouse Reeve 0dc6a18201 Skip unescaped chars warning in html validator
jankily
2021-09-29 15:47:30 -07:00
Mouse Reeve 5cdfd29f9e Unqiue id for progress fields 2021-09-29 15:46:54 -07:00
Mouse Reeve 6d17b83c8c Id uniqueness fixes 2021-09-29 15:35:08 -07:00
Mouse Reeve 69195e6cd0 Fixes form close placement on reading modals 2021-09-29 15:02:50 -07:00
Mouse Reeve a8ed957e20 Fixes uuid reference in toggle button snippet 2021-09-29 15:01:56 -07:00
Mouse Reeve 47b08e7591 Moves tests into dirs and updates render checks 2021-09-29 14:21:57 -07:00
Mouse Reeve 33b3b518e8 Move views into subdirectory 2021-09-29 13:42:27 -07:00
Mouse Reeve 899e6b55a8 Updates references to book templates 2021-09-29 13:27:07 -07:00
Mouse Reeve 1e5a8dc3db Create subdirectories for book view templates 2021-09-29 13:21:11 -07:00
Mouse Reeve f0e31f730a Moves form into snippet and adds boxes around sections 2021-09-29 13:18:27 -07:00
Mouse Reeve 2d13fd0a1c Merge branch 'main' into add-edit-book 2021-09-29 12:53:46 -07:00
Mouse Reeve 009a1fe4fd
Merge pull request #1113 from bookwyrm-social/book-format-choices
Adds book format field with choices
2021-09-29 12:52:55 -07:00
Mouse Reeve d36ef2bcf1 Pylint change 2021-09-29 12:42:28 -07:00
Mouse Reeve 32391dd64d Python formatting 2021-09-29 12:38:31 -07:00
Mouse Reeve 0aef011258 Don't use the format detail if it maps directly 2021-09-29 12:29:17 -07:00
Mouse Reeve 123b23728f Infer format in openlibrary import 2021-09-29 12:21:19 -07:00
Mouse Reeve 47706b5353 Use detail field on book paeg and meta 2021-09-29 11:59:09 -07:00
Mouse Reeve 54a8815f49 Updates migrations 2021-09-29 11:49:57 -07:00
Mouse Reeve 4747bb2156 Hide cover preview column if cover is unset 2021-09-29 11:36:35 -07:00
Mouse Reeve 2f93e6d723 Merge branch 'main' into book-format-choices 2021-09-29 11:33:06 -07:00
Mouse Reeve e308ca2511
Merge pull request #1476 from bookwyrm-social/progress-modal
Progress modal
2021-09-29 11:23:29 -07:00
Mouse Reeve cd54770aad Tick javascript cache buster 2021-09-29 11:12:26 -07:00
Mouse Reeve 52c6a90498 Don't redirect on http request to readthrough 2021-09-29 11:02:04 -07:00
Mouse Reeve d78c278665 Progress update flow for modal 2021-09-29 10:59:36 -07:00
Mouse Reeve cd2dcbc758
Merge pull request #1471 from bookwyrm-social/goal-cleanup
Improves html consistency for goal page
2021-09-29 10:25:34 -07:00
Mouse Reeve 4dbb09be87 Merge branch 'main' into progress-modal 2021-09-29 09:53:02 -07:00
Mouse Reeve a1eaae1d5e Fixes markup syntax errors 2021-09-29 09:48:17 -07:00
Mouse Reeve 6e05fb6dd0 Use inline form component for goal form on goal page 2021-09-29 09:39:23 -07:00
Mouse Reeve 5f3df11e56 Moves goal card to feed dir 2021-09-29 09:24:51 -07:00
Mouse Reeve 46168a292b Moves info text to goal form snippet 2021-09-29 09:23:52 -07:00
Mouse Reeve 49b095c163 Merge branch 'Tak-add-cover-from-url-while-adding-book' 2021-09-29 09:01:33 -07:00
Mouse Reeve 002a9c4267
Merge pull request #1456 from Tak/add-cover-from-url-while-adding-book
Add cover from url while adding book
2021-09-29 08:56:05 -07:00
Mouse Reeve 7202d136f4 Merge branch 'add-cover-from-url-while-adding-book' of https://github.com/Tak/bookwyrm into Tak-add-cover-from-url-while-adding-book 2021-09-29 08:39:12 -07:00
Mouse Reeve 701bf4828b Improves html consistency for goal page 2021-09-28 18:34:12 -07:00
Mouse Reeve 6dbd402345
Merge pull request #1469 from bookwyrm-social/user-shelf
Reorganize user/shelf/goal views code
2021-09-28 17:51:58 -07:00
Mouse Reeve a1aa34a4a4 Limits additional user for test 2021-09-28 17:40:55 -07:00
Mouse Reeve 4dc504c058 Fixes id clashes in shelf forms 2021-09-28 17:36:50 -07:00
Mouse Reeve 746d4bdba4 Validate html in user view tests 2021-09-28 17:31:13 -07:00
Mouse Reeve b5d49d3499 Updates follows null state text 2021-09-28 17:30:58 -07:00
Mouse Reeve a2d64a2a9a
Merge pull request #1468 from bookwyrm-social/directory-view
Changes directory default sort
2021-09-28 17:24:55 -07:00
Mouse Reeve 6ae8215f41 Adds comment 2021-09-28 17:21:35 -07:00
Mouse Reeve 242ffe5456 Show shelf description 2021-09-28 17:20:15 -07:00
Mouse Reeve 5ea40e23b7 Moves shelf delete button 2021-09-28 17:17:01 -07:00
Mouse Reeve 6d9bf349d1 Fixes delete shelf logic and adds tests 2021-09-28 17:02:18 -07:00
Mouse Reeve 24553e0e35 Updates edit/create shelf forms 2021-09-28 16:37:24 -07:00
Mouse Reeve dba0aaff2c Adds description field to shelf 2021-09-28 16:36:47 -07:00
Mouse Reeve 183e76eb2a Adds test for shelf 2021-09-28 16:18:32 -07:00
Mouse Reeve cc1ae270cc Label shelf privacy in edit shelf form 2021-09-28 16:12:34 -07:00
Mouse Reeve d9945ac5e3 Updates references to templates 2021-09-28 16:04:08 -07:00
Mouse Reeve 9a4b71d585 Shuffles around user profile, shelf, and goal templates 2021-09-28 16:00:45 -07:00
Mouse Reeve 4402fc6c14 HTML validation in tests 2021-09-28 15:55:35 -07:00
Mouse Reeve 21fee19b42 Use recently active as the default sort order 2021-09-28 15:51:49 -07:00
Mouse Reeve 128a5c5754
Merge pull request #1467 from bookwyrm-social/admin-views
Organizes admin views
2021-09-28 15:28:45 -07:00
Mouse Reeve 5b3ff8469d Html validation fix for user admin view 2021-09-28 15:20:10 -07:00
Mouse Reeve ada3e1d4d6 Adds options to html validator and fixes dl/dts 2021-09-28 15:02:24 -07:00
Mouse Reeve 2befef7deb Brings federation page html in line with html validator 2021-09-28 14:39:23 -07:00
Mouse Reeve 65d7f50811 Updates federation tests 2021-09-28 14:15:06 -07:00
Mouse Reeve 29ef6df714 Fixes dashboard page for html validator complaints 2021-09-28 13:54:41 -07:00
Mouse Reeve afcd296513 Test rendered html 2021-09-28 13:44:49 -07:00
Mouse Reeve 0fa0c1e2d9 Adds IP blocklist render test 2021-09-28 13:36:41 -07:00
Mouse Reeve 4a5efab2f8 Consistent syntax for back to list 2021-09-28 13:34:14 -07:00
Mouse Reeve 538ae015cd Fixes report template paths 2021-09-28 13:32:23 -07:00
Mouse Reeve 27e6cff0f3 Change field display order on edit instance page 2021-09-28 13:27:03 -07:00
Mouse Reeve 8e3f6657fc Fixes edit instance template name 2021-09-28 13:24:25 -07:00
Mouse Reeve fa0e3cc112 Creates admin views test directory 2021-09-28 13:21:51 -07:00
Mouse Reeve 67a4b2713a Use in-table style for null states 2021-09-28 13:18:27 -07:00
Mouse Reeve c5746bbce0 Adds federation null state 2021-09-28 13:11:22 -07:00
Mouse Reeve 5b97135155 Fixes reference to filters template 2021-09-28 13:07:57 -07:00
Mouse Reeve de5daf8057 Adds email blocklist null state 2021-09-28 13:05:45 -07:00
Mouse Reeve 57044d1c20 Adds null state for ip blocklist 2021-09-28 13:04:36 -07:00
Mouse Reeve b3fdd1ad51 Puts sections into boxes on site page 2021-09-28 13:02:09 -07:00
Mouse Reeve 6c73c94fce Move site settings sub-tabs to the site.html template 2021-09-28 12:53:17 -07:00
Mouse Reeve 3421e4109b
Merge pull request #1464 from bookwyrm-social/html-error
Cleans up edit user views
2021-09-28 12:47:56 -07:00
Mouse Reeve 9b091eaf75 Moves user admin templates into settings directory 2021-09-28 12:46:38 -07:00
Mouse Reeve a1a1fd90a1 Moves reports into settings directory 2021-09-28 12:43:21 -07:00
Mouse Reeve 9c9adfc6f0 Updates references to templates 2021-09-28 12:39:52 -07:00
Mouse Reeve 1c262a1a64 Updates internal references 2021-09-28 12:26:55 -07:00
Mouse Reeve 7b985f3a41 Sorts admin templates into even more directories 2021-09-28 12:22:41 -07:00
Mouse Reeve 057f870997 Avatar display on mobile 2021-09-28 12:09:13 -07:00
Mouse Reeve 6266b58650 Updates static paths in tests 2021-09-28 12:02:09 -07:00
Mouse Reeve c5d7c7dbff Updates block view path reference in test 2021-09-28 11:49:53 -07:00
Mouse Reeve a9eb544bac Moves blocks views and tests into preferences dir 2021-09-28 11:44:53 -07:00
Mouse Reeve 461f834973 Move preferences test into their own directory 2021-09-28 11:41:40 -07:00
Mouse Reeve f669b686bd Updates locales 2021-09-28 11:31:33 -07:00
Mouse Reeve 4511bb2ccd Italics for null state text 2021-09-28 11:29:42 -07:00
Mouse Reeve 85f6b615bd Python formatting 2021-09-28 11:27:16 -07:00
Mouse Reeve 1b0a5232bc Move preferences views into directory 2021-09-28 11:23:47 -07:00
Mouse Reeve e971638f14 Render test for change password view 2021-09-28 11:09:24 -07:00
Mouse Reeve f281d9014a Creates sections in edit profile view 2021-09-28 11:00:16 -07:00
Mouse Reeve 585c71e72a Adds html linting to test 2021-09-28 10:59:51 -07:00
Mouse Reeve 9a06b7d493 Fixes incorrect label in edit user panel 2021-09-28 09:24:09 -07:00
Mouse Reeve 72cbc1cb1b Adds label 2021-09-28 09:23:50 -07:00
Mouse Reeve 273198d634 Merge branch 'main' into progress-modal 2021-09-28 08:00:45 -07:00
Hugh Rundle 66494e7788 fix reverse reference to user bookwyrm_groups 2021-09-28 18:53:11 +10:00
Levi Bard 9db75cc5b7 Add test for creating a book with a cover url 2021-09-28 10:01:31 +02:00
Mouse Reeve 0a37556941
Merge pull request #1401 from bookwyrm-social/opensearch
Adds opensearch xml file
2021-09-27 19:48:53 -07:00
Mouse Reeve 95cdaae4d4 Python formatting 2021-09-27 19:38:54 -07:00
Mouse Reeve 46a7030dbc
Merge pull request #1463 from bookwyrm-social/list-item-perms
Updates how permissions are verified in views
2021-09-27 19:36:35 -07:00
Mouse Reeve c32f975a67 Working in firefox 2021-09-27 19:28:50 -07:00
Mouse Reeve 99ef81be9b Linter fixes 2021-09-27 19:05:13 -07:00
Mouse Reeve 15fc31bf77 Merge branch 'main' into opensearch 2021-09-27 18:58:28 -07:00
Mouse Reeve 767d378170 Update status tests 2021-09-27 18:52:45 -07:00
Mouse Reeve e0aa8a7fdf Fixes shelf view boolean logic 2021-09-27 17:58:21 -07:00
Mouse Reeve f13f3d460c Fixing checking list perms 2021-09-27 17:52:27 -07:00
Mouse Reeve 99c1a670f4 Fixes checking goal perms 2021-09-27 17:52:20 -07:00
Mouse Reeve 56bf8d923f Updates goal and list tests 2021-09-27 17:52:10 -07:00
Mouse Reeve 6c0b1da83b Fixes feed tests 2021-09-27 17:32:54 -07:00
Mouse Reeve c874a762dd Updates inbox view 2021-09-27 17:27:17 -07:00
Mouse Reeve 62ff9d6199 Python formatting 2021-09-27 16:08:52 -07:00
Mouse Reeve af2f78095e Fixes assert syntax 2021-09-27 16:06:01 -07:00
Mouse Reeve dfa8bafe18 Uses new visible/editable/deleteable functions 2021-09-27 16:04:40 -07:00
Mouse Reeve e6ae500569 Fixes syntax problem on http raises 2021-09-27 16:00:50 -07:00
Mouse Reeve 84443c7f81 Custom perms function for shelf view 2021-09-27 15:55:55 -07:00
Mouse Reeve 3f10ae248a Changes visiblity function to raise 2021-09-27 15:54:58 -07:00
Mouse Reeve 3657f9e0df Check perms in status views 2021-09-27 14:03:17 -07:00
Mouse Reeve 556ae0726b Check perms in list views 2021-09-27 14:03:06 -07:00
Mouse Reeve ab31798931 Adds model function to check perms 2021-09-27 14:02:34 -07:00
Mouse Reeve 0f57a43bfb Separate access controls for delete and re-order 2021-09-27 13:31:35 -07:00
Mouse Reeve 10098a402d Don't show list item controls to contributing viewers 2021-09-27 13:25:53 -07:00
Mouse Reeve ab5521480d
Merge pull request #1462 from bookwyrm-social/fewer-active-shelf-queries
Fewer active shelf queries
2021-09-27 13:16:50 -07:00
Mouse Reeve 1efe62a70e Check for readthrough annotation 2021-09-27 13:08:11 -07:00
Mouse Reeve d7a54b0b10 Removes stray print 2021-09-27 12:56:40 -07:00
Mouse Reeve 6d2403bbc7
Merge pull request #1459 from bookwyrm-social/password-reset
Prevent password reset for inactive users
2021-09-27 12:55:05 -07:00
Mouse Reeve 8b0a8e2611 Another user mock on request 2021-09-27 12:38:49 -07:00
Mouse Reeve dd3850a3ba Updates books test 2021-09-27 12:26:56 -07:00
Mouse Reeve 36c00c49ab User viewer aware objects for feed suggested books 2021-09-27 11:37:50 -07:00
Mouse Reeve ba4df5b38b Safely return if there are no current shelves 2021-09-27 11:29:53 -07:00
Mouse Reeve 8e8f46ee51 Only call .all once in shelf view 2021-09-27 11:27:46 -07:00
Mouse Reeve cb089ed817 One query to get book for book view 2021-09-27 11:23:55 -07:00
Mouse Reeve 35131262ff CHeck for current shelves attr before querying for it 2021-09-27 11:17:53 -07:00
Mouse Reeve 995e2c47db User viewer aware objects for book page
Plus other refactors for that view
2021-09-27 11:17:42 -07:00
Mouse Reeve 6d06edc2c7 User viewer aware books for all books shelf view 2021-09-27 10:58:34 -07:00
Mouse Reeve eb34bb2d93
Merge pull request #1461 from bookwyrm-social/views-init
Adds init file to admin views dir
2021-09-27 10:37:23 -07:00
Mouse Reeve e75a49f799
Merge pull request #1455 from bookwyrm-social/refactor-readthroughs
Refactor read-throughs
2021-09-27 10:29:46 -07:00
Mouse Reeve bc87856c2e Merge branch 'main' into book-format-choices 2021-09-27 10:29:12 -07:00
Mouse Reeve 1cb1b29f57 Adds request user to mock 2021-09-27 10:26:25 -07:00
Mouse Reeve 69b010a8d3 f string updates 2021-09-27 10:21:46 -07:00
Mouse Reeve 28d40e9914 Use url names in redirects 2021-09-27 10:17:16 -07:00
Mouse Reeve 92de48afd4 Adds init file to admin views dir
Is this why they're not pylinting?
2021-09-27 10:06:46 -07:00
Mouse Reeve c399d6edfb Prevent password reset for inactive users 2021-09-27 09:31:51 -07:00
Hugh Rundle fb823189a0 don't allow non-local users to join groups (yet)
Groups are not compatible with ActivityPub because I don't know what I'm doing.

NOTE: this is super hacky, fix ASAP
2021-09-27 21:48:40 +10:00
Hugh Rundle e15eef16c5 improve new group member adding
The add-members page now looks almost identical to the group
page and is clearer.
2021-09-27 21:21:00 +10:00
Levi Bard 0e6895633c Allow adding a cover by url when adding a new book (#1443) 2021-09-27 13:00:16 +02:00
Hugh Rundle 1a02af1450 allow members to see groups and their lists
- add additional logic to visible_to_user, for groups and their objects
- cleans up some queries in Group view

NOTE: I can't work out how to make group lists only visible
to users who should be able to see them, on user group listings.
They still can't access the actual group, but can see it on
user pages. This is potentialy problematic.
2021-09-27 20:24:25 +10:00
Hugh Rundle df5a5f94a1 fix local_path for groups 2021-09-27 19:27:39 +10:00
Hugh Rundle c87712c995 allow group members to add items to group lists directly
NOTE: this will be the case regardless of privacy settings of the list
2021-09-27 18:41:29 +10:00
Hugh Rundle 81e5ff5b76 show groups on member pages if allowed
- display groups on user pages when not the logged in user
- restrict visibility of groups on user pages and group pages themselves according to privacy settings
2021-09-27 17:51:18 +10:00
Hugh Rundle 277c033fda show star if this user is the creator/manager of the group 2021-09-27 17:50:38 +10:00
Hugh Rundle e5ca377cd3 clean up stray code mess 2021-09-27 16:50:51 +10:00
Hugh Rundle e38d7b63f3 make groups actually editable 2021-09-27 16:49:56 +10:00
Hugh Rundle 493ed14f34 better group creation form logic and placement 2021-09-27 16:39:12 +10:00
Hugh Rundle 0ccd54b05a better urls and views for group creation and editing 2021-09-27 15:38:05 +10:00
Hugh Rundle f3181690a2 change group owner from 'manager' to 'user'
This will allow privacy management to use existing code.
Some template updates also are for rationalising how
groups are created and edited.
2021-09-27 15:36:41 +10:00
Hugh Rundle 2874e52309 rationalise group creation and prep for group privacy 2021-09-27 15:34:14 +10:00
Hugh Rundle 762202c4b0 fix UI for group curated list editing
When creating or editing a list, the group selection dropdown will only appear if the user selects "group" as the curation option (or it is already selected).

- fix typo in bookwyrm.js comments
- add data-hides trigger for hiding elements after they have been unhidden, where simple toggles are not the right approach
2021-09-27 11:03:41 +10:00
Hugh Rundle 0e2095bc5e refer to group in group lists created_text 2021-09-26 20:52:44 +10:00
Hugh Rundle 5fccb991a7 remove list from group when changing curation
Allows 'group' to be blank when saving a list.
Removes the 'group' field when saving a list with curation other than 'group' - this stops the list "sticking" to a group after it is changed from group curation to something else.
2021-09-26 18:28:16 +10:00
Hugh Rundle 8bfc71db6e create group curated lists 2021-09-26 15:56:52 +10:00
Hugh Rundle f3a3ba5f01 pass group value to list views and vice-versa 2021-09-26 15:56:02 +10:00
Hugh Rundle b921d666cf add group field to ListForm 2021-09-26 15:55:16 +10:00
Hugh Rundle 686198472d update group and list models
- remove GroupList model
- add a group foreign key value  to List model
- remove reference to lists in Group model
2021-09-26 15:50:15 +10:00
Hugh Rundle ec0720514e don't allow non-manager to add and remove group members 2021-09-25 20:25:30 +10:00
Hugh Rundle 035fc5209d better logic for identifying group manager 2021-09-25 20:23:59 +10:00
Hugh Rundle 62a5ed7a9e identify group manager 2021-09-25 19:53:06 +10:00
Hugh Rundle b645d75303 add and remove users from groups 2021-09-25 17:34:44 +10:00
Hugh Rundle e800106be4 smaller cards for group members
- this will also enable members to be removed easily by managers in a future commit.
2021-09-25 11:37:08 +10:00
Hugh Rundle 8d17f888ea improve naming of templates and urls for groups 2021-09-25 11:36:35 +10:00
Hugh Rundle 7c0deabcb2 update urls and group view for searching users to add to group 2021-09-25 11:14:04 +10:00
Hugh Rundle cbe172df3d find users for groups
- search for users to add to a group
- display suggested users on search results screen

TODO: actaully enable users to be added!
TODO: groups/suggested_users probably could be replaced with some logic in snippets/suggested_users.html
2021-09-25 11:11:58 +10:00
Hugh Rundle 8c326ec52f user groups listing template
- creates groups/user_groups template for listing a user's groups on their user page
2021-09-25 11:10:06 +10:00
Hugh Rundle 273ad9a466 add create_group to __init__.py
you probably want this otherwise nothing previously added for group creation will work :-)
2021-09-25 10:55:32 +10:00
Hugh Rundle d4fcf88cf5 add list cards to groups page
- add list cards to groups page based on lists page
- add sort to members on group page
2021-09-24 21:57:01 +10:00
Hugh Rundle 86a60d58e5 add user cards to group pages 2021-09-24 21:24:06 +10:00
Hugh Rundle 264d9b2f3c add group page template 2021-09-24 20:35:51 +10:00
Hugh Rundle 9b6d2a9d88 add group page 2021-09-24 20:34:11 +10:00
Hugh Rundle f32a2cc4d0 group creation form can now be submitted!
Whoops
2021-09-24 15:04:52 +10:00
Hugh Rundle 4e93b09067 create group form
adds a group creation form to user dashboard
2021-09-24 14:12:36 +10:00
Hugh Rundle e07a25e288 add groups urls 2021-09-24 07:52:40 +10:00
Hugh Rundle 99b533510a add group templates 2021-09-24 07:51:51 +10:00
Hugh Rundle 71b1c6117c update templates for groups 2021-09-24 07:50:57 +10:00
Hugh Rundle b74cd37096 add models for groups 2021-09-24 07:49:54 +10:00
Hugh Rundle 3e3c90ec03 add views for groups 2021-09-24 07:49:25 +10:00
Mouse Reeve c465c70c22 Handles statuses with no readthrough updates 2021-09-22 17:06:06 -07:00
Mouse Reeve d510d72b8d Fixes syntax in reading view 2021-09-22 16:41:43 -07:00
Mouse Reeve a96d027cf3 Easier to read first-item-or-none list logic 2021-09-22 16:16:53 -07:00
Mouse Reeve c54609d7fd Refactors how readthroughs get updated 2021-09-22 16:08:25 -07:00
Mouse Reeve 8648bdc879 Merge branch 'main' into refactor-readthroughs 2021-09-22 15:08:58 -07:00
Mouse Reeve 2160a5c729 Newly created readthroughs are active by default 2021-09-22 13:00:38 -07:00
Mouse Reeve cfca806af8
Merge pull request #1454 from bookwyrm-social/readthroughs
Fixes updating read-throughs
2021-09-22 12:57:58 -07:00
Mouse Reeve f55803b409 Fixes updating readthroughs 2021-09-22 12:47:50 -07:00
Mouse Reeve 6bb0f3bc8f
Merge pull request #1453 from bookwyrm-social/status-whitespace
Preserve whitespace in statuses
2021-09-22 12:32:53 -07:00
Mouse Reeve 3e60098185
Merge pull request #1452 from bookwyrm-social/goal_path
Fixes goal url
2021-09-22 12:32:42 -07:00
Mouse Reeve 4a3bf1d92d Updates active readthrough templatetag 2021-09-22 12:27:57 -07:00
Mouse Reeve 3eb49f3f74 Preserve whitespace in statuses 2021-09-22 12:18:12 -07:00
Mouse Reeve fa6e5605d1 Fixes goal url 2021-09-22 12:16:51 -07:00
Mouse Reeve dbfc1a28bb
Merge pull request #1451 from bookwyrm-social/dependabot/npm_and_yarn/ansi-regex-5.0.1
Bump ansi-regex from 5.0.0 to 5.0.1
2021-09-22 11:24:44 -07:00
Mouse Reeve a05ef1a222 Adds active field to readthrough model 2021-09-22 11:23:56 -07:00
Mouse Reeve d5dba9e66d
Merge pull request #1449 from bookwyrm-social/model-cleanup
Model cleanup
2021-09-22 11:20:39 -07:00
dependabot[bot] 183ca51554
Bump ansi-regex from 5.0.0 to 5.0.1
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-22 18:14:03 +00:00
Mouse Reeve d090ac797d
Merge pull request #1450 from bookwyrm-social/dependabot/pip/django-3.2.5
Bump django from 3.2.4 to 3.2.5
2021-09-22 11:12:23 -07:00
Mouse Reeve 50ca3eef31 Encompass all status models in notification signal 2021-09-22 11:10:37 -07:00
Mouse Reeve b7c2fb600a String formatting for status view tests 2021-09-22 10:55:51 -07:00
dependabot[bot] 1b34833e77
Bump django from 3.2.4 to 3.2.5
Bumps [django](https://github.com/django/django) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.4...3.2.5)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-22 17:52:28 +00:00
Mouse Reeve b1ff46a562 Remove unused import 2021-09-22 10:42:42 -07:00
Mouse Reeve a4ac25bfae Move notifications to signals 2021-09-22 09:24:39 -07:00
Mouse Reeve 2419942770 Create model function to update user last active date 2021-09-22 08:35:20 -07:00
Mouse Reeve 4360a3fb4a
Merge pull request #1448 from bookwyrm-social/postgres-port
Correctly use custom postgres ports
2021-09-22 08:27:22 -07:00
Mouse Reeve 41d34c6d4b Correctly use custom postgres ports 2021-09-22 08:13:31 -07:00
Mouse Reeve 5ad315faac
Merge pull request #1421 from bookwyrm-social/pylint-update
Pylint update
2021-09-20 18:16:43 -07:00
Mouse Reeve 673f49bf21 Tests fixes 2021-09-20 18:01:12 -07:00
Mouse Reeve 70f66f4cd4
Merge pull request #1439 from bookwyrm-social/search-placeholder
Updates search box placeholder for logged out users
2021-09-20 17:42:05 -07:00
Mouse Reeve 90c74f00c9 Fixes missing f format in preview image string
plus a unit test for it
2021-09-20 17:40:59 -07:00
Mouse Reeve 1be33c97a2 Fixes string formatting in site model 2021-09-20 17:19:26 -07:00
Mouse Reeve a74141ece4 Adds site models tests 2021-09-20 17:19:20 -07:00
Mouse Reeve ea303fb285 Updating string format synatx part 3 2021-09-20 16:45:26 -07:00
Mouse Reeve cf3157a3b5 Merge branch 'main' into pylint-update 2021-09-20 16:31:27 -07:00
Mouse Reeve 467c6ff266
Merge pull request #1441 from bookwyrm-social/query-efficiency
Query efficiency
2021-09-20 16:25:00 -07:00
Mouse Reeve 89fad59793 Query efficiency in user view 2021-09-20 15:25:29 -07:00
Mouse Reeve 15818ad65d
Merge pull request #1440 from bookwyrm-social/create-list-button
Don't show delete button in create list form
2021-09-20 14:52:17 -07:00
Mouse Reeve aa0ffd86c0 Fetch related items when loading list page 2021-09-20 14:49:07 -07:00
Mouse Reeve 22ead6ba46 More efficient followers query 2021-09-20 14:29:01 -07:00
Mouse Reeve a304333acf Don't show delete button in create list form 2021-09-20 14:25:11 -07:00
Mouse Reeve 4fed347b10 Update locales 2021-09-20 12:45:04 -07:00
Mouse Reeve 1ed3d4dde1 Updates search box placeholder for logged out users 2021-09-20 12:28:08 -07:00
Mouse Reeve 0a32fefd93
Merge pull request #1431 from bookwyrm-social/discover-clipping
Discover clipping and content warning display
2021-09-19 09:40:33 -07:00
Mouse Reeve 7c23d687b1 Use icon for content warning
This creates consistency between the compose box and the status display
2021-09-19 09:30:06 -07:00
Mouse Reeve f772210d05 Clips tiles on discover view 2021-09-19 09:21:13 -07:00
Mouse Reeve bc693216c6
Merge pull request #1428 from bookwyrm-social/cw-style
Visually differentiates content warnings from statuses
2021-09-19 08:55:12 -07:00
Mouse Reeve a2bab204d2
Merge pull request #1429 from bookwyrm-social/title-char
Use dash instead of vertical line to separate page name and site name
2021-09-18 17:56:39 -07:00
Mouse Reeve a119c69592 Use dash instead of vertical line to separate page name and site name 2021-09-18 17:09:18 -07:00
Mouse Reeve e6c2ea1fbf Visually differentiates content warnings from statuses 2021-09-18 17:00:01 -07:00
Mouse Reeve b1984aeaf7
Merge pull request #1427 from bookwyrm-social/reply-cws
Reply cws
2021-09-18 16:40:38 -07:00
Mouse Reeve c8aa0e9330 Send dms through http post 2021-09-18 16:28:38 -07:00
Mouse Reeve cdab2cbf2c Fixes content warnings on replies 2021-09-18 16:27:13 -07:00
Mouse Reeve c664c0e9b5
Merge pull request #1426 from bookwyrm-social/register-view
Improvements to register view
2021-09-18 16:13:53 -07:00
Mouse Reeve 40040b39da Fixes incorrect close tag 2021-09-18 16:04:11 -07:00
Mouse Reeve 6f0b1d10bb Fixes line length 2021-09-18 16:00:21 -07:00
Mouse Reeve c4741a3aea Updates locales 2021-09-18 15:58:09 -07:00
Mouse Reeve d80feb7470 Renames landing layout template 2021-09-18 15:56:29 -07:00
Mouse Reeve 38c66b208c Adds customizable invite request copy 2021-09-18 15:45:04 -07:00
Mouse Reeve 1be4f31a9e Cleans up display of login page 2021-09-18 15:15:48 -07:00
Mouse Reeve 246ab992ae Consistent layout for invite registration page 2021-09-18 15:10:25 -07:00
Mouse Reeve 385da1ea43 Handle get request to /register path 2021-09-18 15:08:02 -07:00
Mouse Reeve 7901da3b74
Merge pull request #1425 from bookwyrm-social/delete-and-redraft
Fixes form submission from compose view
2021-09-18 15:07:09 -07:00
Mouse Reeve 7a6a4cd7c1
Merge pull request #1424 from bookwyrm-social/checkall
Fixes select all checkbox
2021-09-18 15:02:55 -07:00
Mouse Reeve 01ffb8d77b Fixes form submission from compose view 2021-09-18 14:56:20 -07:00
Mouse Reeve dda36f22c2 Fixes select all checkbox 2021-09-18 14:48:03 -07:00
Mouse Reeve 7bb9bea0c4
Merge pull request #1423 from bookwyrm-social/modal-cws
Fixes content warning fields in modals
2021-09-18 14:44:00 -07:00
Mouse Reeve 293962326c Tick javascript hash 2021-09-18 14:32:30 -07:00
Mouse Reeve 19e36eb181 Fixes content warning fields in modals 2021-09-18 14:05:17 -07:00
Mouse Reeve e39136c34d
Merge pull request #1422 from bookwyrm-social/cw-label
Show label for content warning field
2021-09-18 12:13:07 -07:00
Mouse Reeve 0fe5cb1000 Show label for content warning field 2021-09-18 11:56:32 -07:00
Mouse Reeve 08f6a97653 Python formatting 2021-09-18 11:33:43 -07:00
Mouse Reeve acfb1bb376 Updating string format synatx part 2 2021-09-18 11:32:00 -07:00
Mouse Reeve be86fbcf4d Merge branch 'main' into pylint-update 2021-09-18 07:46:12 -07:00
Mouse Reeve d366257909
Merge pull request #1416 from bookwyrm-social/ip-blocklist
Block IP addresses
2021-09-17 21:39:44 -07:00
Mouse Reeve 377a4e1ef1 Updating string format syntax part 1 2021-09-17 21:39:18 -07:00
Mouse Reeve 00892eaaaf Temporary fix for pylint 2021-09-17 20:58:09 -07:00
Mouse Reeve 6022e7b232 Adds IP blocklist views 2021-09-17 13:04:10 -07:00
Mouse Reeve 8a5004d947 Adds migration 2021-09-17 12:00:00 -07:00
Mouse Reeve 2a2dddf5f4 Adds IP blocklist model 2021-09-17 11:58:59 -07:00
Mouse Reeve 16854a52bc Adds ip block middleware 2021-09-17 11:47:46 -07:00
Mouse Reeve 252fff8bfe Create middleware directory 2021-09-17 11:31:19 -07:00
Mouse Reeve 967e26ce48 Updates connector manager tests 2021-09-17 11:29:10 -07:00
Mouse Reeve 1465385452 Python formatting 2021-09-16 15:29:06 -07:00
Mouse Reeve d9284ede9b updates search tests 2021-09-16 15:27:06 -07:00
Mouse Reeve 8c4cafed79 Fixes formatting isbn endpoint results 2021-09-16 12:53:27 -07:00
Mouse Reeve 22af7ece71 Fixes SearchResult imports in tests 2021-09-16 12:41:30 -07:00
Mouse Reeve 4cdf895d77 Removes references to local field in connector tests 2021-09-16 12:29:02 -07:00
Mouse Reeve beb482f1db Linter fixes
Temporarily disables C0209 because it's out of scope to fix here
2021-09-16 11:47:44 -07:00
Mouse Reeve 18591c7b56 Fixes circular import 2021-09-16 11:30:04 -07:00
Mouse Reeve fbe05623ff Updates first_search_result functionality 2021-09-16 11:07:36 -07:00
Mouse Reeve 76ab5a763c Remove outdated test 2021-09-16 10:56:28 -07:00
Mouse Reeve 0d5e05a3c2 Updates other calls to the search endpoint 2021-09-16 10:55:23 -07:00
Mouse Reeve 98325818b2 Display search results in api mode and regular 2021-09-16 10:44:33 -07:00
Mouse Reeve 5196db8cf5
Merge pull request #1412 from reesporte/spanish
more spanish translations
2021-09-15 11:16:05 -07:00
reesporte e23dc14850 more spanish translations 2021-09-15 12:22:51 -05:00
Mouse Reeve 1f06d1a1d8 Removes local connector 2021-09-14 15:26:36 -07:00
Mouse Reeve 357e111411
Merge pull request #1410 from bookwyrm-social/safari-support
Supports Safari in form submission event
2021-09-12 11:58:33 -07:00
Mouse Reeve ccdfaa3187 Linter fixes 2021-09-12 11:48:25 -07:00
Mouse Reeve a13d3317c6 Bust javascript cache 2021-09-12 11:46:51 -07:00
Mouse Reeve 7cfb0a4271 Supports Safari in form submission event 2021-09-12 11:45:18 -07:00
Mouse Reeve bee1b2a2eb
Merge pull request #1409 from bookwyrm-social/file-input-css
Adds css for file input buttons
2021-09-12 10:52:32 -07:00
Mouse Reeve a011a9eab5 Linting fixes 2021-09-12 10:41:16 -07:00
Mouse Reeve b5cc75e078 Adds css for file input buttons 2021-09-12 10:36:06 -07:00
Mouse Reeve 09de7fe647
Merge pull request #1408 from bookwyrm-social/admin-tweaks
Admin tweaks
2021-09-12 10:33:38 -07:00
Mouse Reeve 8b64e53cd0 Update locales 2021-09-12 10:20:18 -07:00
Mouse Reeve e24f2ea8c1 Null state text for announcements view 2021-09-12 10:14:56 -07:00
Mouse Reeve 0f31586ab6 Email domain isn't a sortable column 2021-09-12 10:10:21 -07:00
Mouse Reeve be7fae2053 Show recent servers first 2021-09-12 10:02:15 -07:00
Mouse Reeve 22f01508d2 Show user count in federated server table 2021-09-12 09:59:35 -07:00
Mouse Reeve c01fea9dba
Merge pull request #1406 from bookwyrm-social/admin-tests
Improved admin views for federation
2021-09-11 17:56:37 -07:00
Mouse Reeve bd1e31d981 Merge migration 2021-09-11 17:44:56 -07:00
Mouse Reeve 717dc91d49 Merge branch 'main' into admin-tests 2021-09-11 17:43:45 -07:00
Mouse Reeve 741df38f55
Merge pull request #1278 from bookwyrm-social/csv-import-failures
Store best-guess csv import matches
2021-09-11 15:04:54 -07:00
Mouse Reeve d31683e21f Adds merge migration 2021-09-11 14:45:56 -07:00
Mouse Reeve d972ad2541 Merge branch 'main' into csv-import-failures 2021-09-11 14:42:59 -07:00
Mouse Reeve 0f3e71978e Federated and blocked tabs 2021-09-11 14:41:52 -07:00
Mouse Reeve 6f531beb1c Don't just write "none" when the info is absent 2021-09-11 14:32:10 -07:00
Mouse Reeve 03a5ac9c3f Use elided page range for federated peer list 2021-09-11 14:27:42 -07:00
Mouse Reeve 992e478e95 Use readable/translatable strings for db choices 2021-09-11 14:23:47 -07:00
Mouse Reeve 9d5bfc494f Adds dashbaord view test 2021-09-11 13:35:23 -07:00
Mouse Reeve 09e49c70ed Fixes peers endpoint 2021-09-11 13:30:27 -07:00
Mouse Reeve 9d886254d8
Merge pull request #1405 from bookwyrm-social/direct-messages
Adds missing dm form
2021-09-11 12:17:36 -07:00
Mouse Reeve c247527139 Adds missing dm form 2021-09-11 12:07:09 -07:00
Mouse Reeve 596a352e26
Merge pull request #1404 from bookwyrm-social/import-unread-count
Don't increment unread counts on csv import statuses
2021-09-11 11:46:01 -07:00
Mouse Reeve c20f6c21ae Fixes date formats 2021-09-11 11:37:10 -07:00
Mouse Reeve cd9fe70dbc Don't increment unread counts on csv import statuses 2021-09-11 10:26:33 -07:00
Mouse Reeve 26c6cd9189
Merge pull request #1403 from bookwyrm-social/admin-stats
Admin stats
2021-09-11 09:44:11 -07:00
Mouse Reeve c0eded0003 Merge branch 'main' into csv-import-failures 2021-09-11 09:34:38 -07:00
Mouse Reeve e801c7d991 Cleaner chart intervals 2021-09-11 09:32:29 -07:00
Mouse Reeve 3e7847e645 Set deactivation date 2021-09-11 09:00:52 -07:00
Mouse Reeve 430554444f Adds deactivation date to user model
Also fixes django admin around saved lists
2021-09-11 08:57:38 -07:00
Mouse Reeve 84b90db4bb Adds filtering to admin panel 2021-09-11 08:47:16 -07:00
Mouse Reeve 1f53ce33a8 Fixes user stats reporting 2021-09-11 07:52:56 -07:00
Mouse Reeve 8f0ea4cc7a
Merge pull request #1402 from bookwyrm-social/admin
Adds admin dashboard
2021-09-11 07:40:39 -07:00
Mouse Reeve c2ccef20a6 Fixes references to federation views 2021-09-11 07:27:45 -07:00
Mouse Reeve 255e59503b Updates migration 2021-09-11 07:23:22 -07:00
Mouse Reeve b26e486888 Python formatting 2021-09-11 07:20:40 -07:00
Mouse Reeve b36f7d7b69 Merge branch 'main' into csv-import-failures 2021-09-11 07:19:40 -07:00
Mouse Reeve fc69729f93 Link to dashboard from menu 2021-09-11 07:17:14 -07:00
Mouse Reeve bc179ab90f Remove unused library 2021-09-11 07:15:30 -07:00
Mouse Reeve 19cdda372c Tidies up charts 2021-09-11 07:14:14 -07:00
Mouse Reeve a79fb14686 Basic dashboard page 2021-09-10 21:12:08 -07:00
Mouse Reeve e515912dbc Move admin views into their own directory 2021-09-10 18:50:31 -07:00
Mouse Reeve 7c3cf095f3 Adds opensearch xml file 2021-09-10 16:47:59 -07:00
Mouse Reeve c1b50001e9
Merge pull request #1400 from bookwyrm-social/locale-de
Updates German locale
2021-09-10 16:03:00 -07:00
Mouse Reeve eec82db601 Updates German locale
Co-authored-by: tofuwabohu <66644064+tofuwabohu@users.noreply.github.com>
2021-09-10 15:50:51 -07:00
Mouse Reeve ec2dadc87e
Merge pull request #1399 from bookwyrm-social/half-stars
Support half star ratings
2021-09-10 15:11:33 -07:00
Mouse Reeve 926eb7646f Removes duplicate selector 2021-09-10 15:03:01 -07:00
Mouse Reeve 3fdbd3035a how to disable linter complaint?? 2021-09-10 14:58:08 -07:00
Mouse Reeve da5003c45e Fixes hover states 2021-09-10 14:56:45 -07:00
Mouse Reeve 8840e09eac Fixes labels 2021-09-10 14:41:55 -07:00
Mouse Reeve daf42a30da Adds javascript for half star ratings 2021-09-10 14:27:08 -07:00
Mouse Reeve 0be53f9133 Adds half star markup 2021-09-10 14:20:55 -07:00
Mouse Reeve 2665e3640e CSS for half stars 2021-09-10 14:19:57 -07:00
Mouse Reeve d3dc0fa121
Merge pull request #1398 from bookwyrm-social/site-settings-form
Adds short description to edit site form
2021-09-10 12:25:25 -07:00
Mouse Reeve fd353ecb87 Fixes label 2021-09-10 12:15:51 -07:00
Mouse Reeve def4d89bf8 Adds short description to edit site form 2021-09-10 12:13:24 -07:00
Mouse Reeve e375b3fd6a
Merge pull request #1397 from bookwyrm-social/instance-info
Updates instance info endpoint
2021-09-10 11:56:29 -07:00
Mouse Reeve 6d02f5ec0a
Merge pull request #1396 from bookwyrm-social/locales
Updates locales
2021-09-10 11:46:32 -07:00
Mouse Reeve 9413dacaf2 Updates instance info endpoint 2021-09-10 11:44:51 -07:00
Mouse Reeve 06c97a32b8 Updates locales 2021-09-10 11:25:00 -07:00
Mouse Reeve 9de6407e5f
Merge pull request #1395 from bookwyrm-social/delete-user-clarification
Adds copy to clarify how to delete a user as a moderator
2021-09-10 11:22:35 -07:00
Mouse Reeve 7dc1ef390e
Merge pull request #1394 from bookwyrm-social/cache-busting
Adds javascript cache value to templates
2021-09-10 11:07:09 -07:00
Mouse Reeve 110273d277 Adds copy to clarify how to delete a user as a moderator 2021-09-10 11:03:45 -07:00
Mouse Reeve a4e6f610cd Adds javascript cache value to templates 2021-09-10 10:57:16 -07:00
Mouse Reeve a15ba14226
Merge pull request #1388 from bookwyrm-social/draft-caching
Save status drafts in localstorage
2021-09-10 10:36:41 -07:00
Mouse Reeve 5c329c35f0 Warn http error 2021-09-10 10:22:28 -07:00
Mouse Reeve 5e9b8eb571 Removes unused variable 2021-09-10 10:20:40 -07:00
Mouse Reeve 3a35d33042
Merge pull request #1392 from bookwyrm-social/javascript-error-handling
Re-adds error handling code written a while back
2021-09-10 10:13:47 -07:00
Mouse Reeve 08d2bff7ca General function for displaying messages 2021-09-10 10:12:37 -07:00
Mouse Reeve e3ab5afcbd Catch error responses from API 2021-09-10 08:59:49 -07:00
Mouse Reeve 3a7717e22f Fixes status code variable in http response 2021-09-10 08:59:18 -07:00
Mouse Reeve 718744a92d Adds css animation for pending create status
Co-authored-by: Fabien Basmaison <contact@arkhi.org>
2021-09-10 08:30:28 -07:00
Mouse Reeve 136cc1a6e9 Adds spinner icon 2021-09-10 08:07:46 -07:00
Mouse Reeve 3c38a64a81 Return http responses for ajax requests 2021-09-10 08:03:22 -07:00
Mouse Reeve 909293bbb0 Re-adds error handling code written a while back
Co-authored-by: Fabien Basmaison <contact@arkhi.org>
2021-09-09 19:56:42 -07:00
Mouse Reeve e562326f02
Merge pull request #1391 from bookwyrm-social/reprioritize-status-task
Prioritize adding statuses to streams
2021-09-09 17:38:08 -07:00
Mouse Reeve 85cc46184e Prioritize adding statuses to strems
having to wait to see statuses feels very weird and janky
2021-09-09 17:24:50 -07:00
Mouse Reeve ad9be9f3d1 Updates test 2021-09-09 17:22:42 -07:00
Mouse Reeve f9b9a66224 Linter appeasement 2021-09-09 17:07:48 -07:00
Mouse Reeve 9ba066ad6d Cleanup after submitting modal 2021-09-09 17:04:16 -07:00
Mouse Reeve 06b0325c1b Update dropdown options on shelve action 2021-09-09 16:43:47 -07:00
Mouse Reeve 79602f69d7 Separate out shelve button options lists 2021-09-09 16:32:21 -07:00
Mouse Reeve 9ee1a110a9 Update visible shelve buttons on read action 2021-09-09 15:36:58 -07:00
Mouse Reeve 5f584c1403 Lints for the Linter god 2021-09-09 08:24:36 -07:00
Mouse Reeve 055cced75b Close reply panel 2021-09-09 08:20:55 -07:00
Mouse Reeve 49f1226f3a Close modals after submit 2021-09-09 08:06:36 -07:00
Mouse Reeve 053e2cea0d Clear localstorage items 2021-09-09 07:39:38 -07:00
Mouse Reeve dfaf085843 Move status code into the new file 2021-09-09 06:54:34 -07:00
Mouse Reeve b0e7a5e468 Post statuses asynchronously 2021-09-08 19:30:45 -07:00
Mouse Reeve 71b2f91a73 Ties draft functionality to more status fields 2021-09-08 19:30:24 -07:00
Mouse Reeve 59ec45496c Merge branch 'main' into draft-caching 2021-09-08 18:55:47 -07:00
Mouse Reeve c007f44030 Linter's have demands 2021-09-08 17:54:50 -07:00
Mouse Reeve 9a53808eeb
Merge pull request #1389 from bookwyrm-social/email-blocking
Email blocking
2021-09-08 17:54:39 -07:00
Mouse Reeve 7ef179a4f3 Merge migration 2021-09-08 17:44:17 -07:00
Mouse Reeve de3c79ce21 Merge branch 'main' into email-blocking 2021-09-08 17:43:08 -07:00
Mouse Reeve 4e6670adab
Merge pull request #1390 from bookwyrm-social/better-suspension
Better suspension options for admins
2021-09-08 17:42:54 -07:00
Mouse Reeve bcb78653e9 Fixes remove email domain test 2021-09-08 17:39:22 -07:00
Mouse Reeve fadcbbcec7 Adds deletion form 2021-09-08 17:34:01 -07:00
Mouse Reeve f5de1c903e Adds deletion test 2021-09-08 17:33:43 -07:00
Mouse Reeve 15344b6a8e Let moderators delete users 2021-09-08 17:21:45 -07:00
Mouse Reeve 916be2552d View for moderators deleting users 2021-09-08 16:58:16 -07:00
Mouse Reeve 31e6e59047 Updates test 2021-09-08 16:48:23 -07:00
Mouse Reeve 658e12eb86 Allow admins to suspend pending users 2021-09-08 16:47:12 -07:00
Mouse Reeve 21527803de Fixes delete test 2021-09-08 16:35:36 -07:00
Mouse Reeve b891f32707 Adds deletion test 2021-09-08 16:31:15 -07:00
Mouse Reeve d28db51a14 Adds delete functionality 2021-09-08 16:24:13 -07:00
Mouse Reeve 7638f99c1b Adds tests 2021-09-08 16:14:13 -07:00
Mouse Reeve 97f0d82b05 Missing close td tag 2021-09-08 15:49:52 -07:00
Mouse Reeve 5441b5b7f3 Prevent users from registering with blocked emails 2021-09-08 15:49:18 -07:00
Mouse Reeve cc61d44cef Removes stray tag 2021-09-08 15:38:34 -07:00
Mouse Reeve 59096ae9ec Adds email filtering to user admin view 2021-09-08 15:37:52 -07:00
Mouse Reeve 605af3bf88 Not going to implement that today 2021-09-08 15:33:53 -07:00
Mouse Reeve c4a43d5029 Updates migration 2021-09-08 15:31:07 -07:00
Mouse Reeve 8717d8a675 Create new email domain block entries 2021-09-08 15:31:01 -07:00
Mouse Reeve c705178c3b Adds create block form 2021-09-08 15:08:22 -07:00
Mouse Reeve 21de8e66be Formats url 2021-09-08 14:39:43 -07:00
Mouse Reeve 7a684a2f96 Adds model 2021-09-08 14:39:38 -07:00
Mouse Reeve fd0cf49b40 Adds html and view for email blocklist 2021-09-08 14:32:11 -07:00
Mouse Reeve 84fcc358fa Renames layout file 2021-09-08 14:06:43 -07:00
Mouse Reeve 03b608565d Save status drafts in localstorage 2021-09-08 13:58:10 -07:00
Mouse Reeve d9090e723d
Merge pull request #1384 from bookwyrm-social/generate-image-transaction
Generate image task failing when transaction hasn't completed
2021-09-08 12:17:58 -07:00
Mouse Reeve 9a885456e9
Merge pull request #1386 from bookwyrm-social/suggest-users
Make sure unsuitable users don't show up in suggestions
2021-09-08 12:16:13 -07:00
Mouse Reeve 4db5677509 Fixes filters 2021-09-08 12:06:23 -07:00
Mouse Reeve 88a65b0b88 Only re-rank on bookwyrm instances 2021-09-08 11:47:36 -07:00
Mouse Reeve d3b3dd6d99 Update suggestions on domain block 2021-09-08 11:38:22 -07:00
Mouse Reeve 2e2ee72333 Fixes inactive or mastodon users showing up in suggestions
They shouldn't be there, but just to be safe
2021-09-08 11:26:41 -07:00
Mouse Reeve e06e507c8d Cleans up suggested users logic 2021-09-08 11:14:41 -07:00
Mouse Reeve aabacc2124
Merge pull request #1383 from bookwyrm-social/hide-suggestions
Option to hide suggestions
2021-09-08 10:38:06 -07:00
Mouse Reeve b826d29b0d Generate image task failing when transaction hasn't completed 2021-09-08 10:20:44 -07:00
Mouse Reeve 90800c190f Show suggested users toggle in user prefs page 2021-09-08 10:06:26 -07:00
Mouse Reeve 527c0542af View to hide suggestions 2021-09-08 10:03:23 -07:00
Mouse Reeve bb29f33ca8 Fixes goal prompt not appearing in feed 2021-09-08 09:38:36 -07:00
Mouse Reeve a5ef8aa6e9 Adds flag on user model to hide suggested users 2021-09-08 09:30:13 -07:00
Mouse Reeve 6b1cd04aac
Merge pull request #1382 from bookwyrm-social/boosts-fix
Fixes boosts task
2021-09-08 09:22:34 -07:00
Mouse Reeve c9f9c0de58 Fixes boosts task 2021-09-08 09:21:15 -07:00
Mouse Reeve 8b2c8b4f99
Merge pull request #1381 from bookwyrm-social/import-tooltip
Import tooltip
2021-09-08 09:08:28 -07:00
Mouse Reeve 6136a683c9 Updates locales 2021-09-08 08:58:04 -07:00
Mouse Reeve 4570d042a9 Tooltip icon 2021-09-08 08:56:13 -07:00
Mouse Reeve 1bf09459b5 Changes tooltip paradigm 2021-09-08 08:19:54 -07:00
Mouse Reeve 95bdf7b787 Adds goodreads data tooltip 2021-09-08 07:35:49 -07:00
Mouse Reeve e13e13d3f3 Move import templates into directory 2021-09-08 07:28:42 -07:00
Mouse Reeve d63e7243f5 Adds tooltip component 2021-09-08 07:26:51 -07:00
Mouse Reeve eb93abceb2
Merge pull request #1377 from bookwyrm-social/fix-imported-read-dates
Fix imported read dates
2021-09-07 18:33:43 -07:00
Mouse Reeve 2a93a8ea66 Adds class to status page 2021-09-07 18:16:26 -07:00
Mouse Reeve e0f5f13a5a Fixes guessing read dates from goodreads csv 2021-09-07 18:09:43 -07:00
Mouse Reeve 88f28ed5da
Merge pull request #1376 from bookwyrm-social/celery-queues
Celery queues
2021-09-07 17:57:48 -07:00
Mouse Reeve e608d8b8ad python formatting 2021-09-07 17:11:32 -07:00
Mouse Reeve aa91361fe4 Fixes celery kwarg for queue 2021-09-07 17:09:44 -07:00
Mouse Reeve 26adf2d974 Fixes queue for import task 2021-09-07 17:04:10 -07:00
Mouse Reeve de3f18655c Set priorities on tasks 2021-09-07 16:33:43 -07:00
Mouse Reeve 7b2e4eebd2 Remove unused code from celery 2021-09-07 16:33:18 -07:00
Mouse Reeve c0b662cbd7 Adds priority queues to celery 2021-09-07 16:06:54 -07:00
Mouse Reeve b41293e2ce
Merge pull request #1375 from bookwyrm-social/celery-settings
Simplify celery settings
2021-09-07 15:23:05 -07:00
Mouse Reeve e3b1d83fef
Merge pull request #1374 from bookwyrm-social/login-views
Login views
2021-09-07 15:22:54 -07:00
Mouse Reeve d76f2ab95c Remove stray file 2021-09-07 15:13:10 -07:00
Mouse Reeve 47ba2478b6 Split out test files 2021-09-07 15:06:44 -07:00
Mouse Reeve 37dcae4558 Simply celery settings 2021-09-07 14:02:03 -07:00
Mouse Reeve ec501dfee9 Make sure passwords aren't exposed in error reporting 2021-09-07 13:21:40 -07:00
Mouse Reeve 75cc2ee164 Split authentication views into login and register 2021-09-07 13:11:44 -07:00
Mouse Reeve 6db0bf4b6a Adds AP field 2021-09-07 12:51:07 -07:00
Mouse Reeve 8420d0a173 Adds format translations 2021-09-07 12:50:24 -07:00
Mouse Reeve 8a748fa675 Adds format fields to edit book view 2021-09-07 12:49:28 -07:00
Mouse Reeve 53e0e9ae1e
Merge pull request #1373 from bookwyrm-social/streams-tests
Streams tests
2021-09-07 12:17:06 -07:00
Mouse Reeve da3bc1e591 Python formatting 2021-09-07 12:05:34 -07:00
Mouse Reeve 6bc4bf4503 Fixes mock 2021-09-07 12:02:29 -07:00
Mouse Reeve b717c2fcd8 Fixes mock arg on test 2021-09-07 11:57:18 -07:00
Mouse Reeve 82ad1abe9a more activitystreams tests 2021-09-07 11:53:41 -07:00
Mouse Reeve d147c6ac2f Separate tests into more files 2021-09-07 11:13:18 -07:00
Mouse Reeve a4041911c6 Adds tests more activitystreams tasks 2021-09-07 11:01:27 -07:00
Mouse Reeve 6e436b294b
Merge pull request #1372 from bookwyrm-social/user-registration
Use atomic when creating new users
2021-09-07 10:29:12 -07:00
Mouse Reeve f4b43af600 Creates test files for activitystreams 2021-09-07 10:24:09 -07:00
Mouse Reeve 5a224b5aa4 Use atomic when creating new users 2021-09-07 10:09:28 -07:00
Mouse Reeve 7bad2a34c4
Merge pull request #1371 from bookwyrm-social/streams-fix
Fixes error breaking registration
2021-09-07 09:55:13 -07:00
Mouse Reeve f25835feeb Fixes error breaking registration 2021-09-07 09:39:42 -07:00
Mouse Reeve f80503d947 Merge migration 2021-09-06 22:15:13 -07:00
Mouse Reeve 22caf34d86 Merge branch 'main' into book-format-choices 2021-09-06 22:13:24 -07:00
Mouse Reeve 93d9e7b1a1
Merge pull request #1254 from bookwyrm-social/activitystreams-celery
Move activitystreams updates to tasks
2021-09-06 21:33:01 -07:00
Mouse Reeve 0a9d515d45 two more mocks 2021-09-06 20:37:09 -07:00
Mouse Reeve 9988a3e82b More test fixes 2021-09-06 18:58:45 -07:00
Mouse Reeve c56a9021b6 A few more failing tests 2021-09-06 18:55:48 -07:00
Mouse Reeve 2653458e56 another round of mocks 2021-09-06 18:40:12 -07:00
Mouse Reeve 59400511c9 mocks mocks more mocks 2021-09-06 17:55:44 -07:00
Mouse Reeve db34918347 Updates user view test 2021-09-06 16:33:21 -07:00
Mouse Reeve 4ea9637a2d Updates activitystreams tests 2021-09-06 16:16:45 -07:00
Mouse Reeve e35c805960 Fixes typo in function call 2021-09-06 15:48:02 -07:00
Mouse Reeve 4db2557581 Fixes handling boosts 2021-09-06 15:39:32 -07:00
Mouse Reeve 38dc640dd5 Mock for goodreads import test` 2021-09-06 15:10:52 -07:00
Mouse Reeve 227b72eaf9 Fixes mocks syntax 2021-09-06 15:09:04 -07:00
Mouse Reeve 72d5238590 More mocks 2021-09-06 14:50:33 -07:00
Mouse Reeve bb94995389 Where you need one mock, you probably need the other 2021-09-06 14:48:45 -07:00
Mouse Reeve a6b0ba1826 Updates activistreams add_status mock 2021-09-06 13:53:49 -07:00
Mouse Reeve aa856b0155
Merge pull request #1369 from bookwyrm-social/delete-lists
Delete lists
2021-09-06 13:16:56 -07:00
Mouse Reeve a8973336d9 Adds mock to list items creation 2021-09-06 12:58:18 -07:00
Mouse Reeve 8382d1a684 Updates tests 2021-09-06 12:31:13 -07:00
Mouse Reeve cb21099e0b Fixes serialization of delete activity 2021-09-06 12:00:10 -07:00
Mouse Reeve ae81d6cf71 More tests 2021-09-06 11:55:04 -07:00
Mouse Reeve d212cbfd3c Adds new template 2021-09-06 11:54:53 -07:00
Mouse Reeve 5640ae4f7e Handle deletions of ordered collections 2021-09-06 11:24:08 -07:00
Mouse Reeve c4f2d67048 Adds view tests 2021-09-06 11:17:36 -07:00
Mouse Reeve 2e8f96a7f2
Merge pull request #1367 from bookwyrm-social/nginx-max-content
Increase max upload size in nginx
2021-09-06 10:54:42 -07:00
Mouse Reeve c8f148acb8
Merge pull request #1366 from bookwyrm-social/user-admin
User admin view improvements
2021-09-06 10:54:31 -07:00
Mouse Reeve c630ec3572 Adds delete list view 2021-09-06 10:41:55 -07:00
Mouse Reeve 1e037d20a4 Adds delete button to list 2021-09-06 10:03:00 -07:00
Mouse Reeve eb67c4730f Renames list layout file 2021-09-06 09:48:57 -07:00
Mouse Reeve 34a5eccba7 Increase max upload size in nginx 2021-09-06 09:43:41 -07:00
Mouse Reeve 2d090935f0
Merge pull request #1365 from bookwyrm-social/discover-quotes
Show quotes without content as large discover cards
2021-09-06 09:37:03 -07:00
Mouse Reeve 2886c15e1d Adds more info to user admin page 2021-09-06 09:35:25 -07:00
Mouse Reeve a68196d9bb Improves user admin filter behavior 2021-09-06 08:54:57 -07:00
Mouse Reeve 0f32471b2a Show quotes without content as large discover cards 2021-09-06 08:47:59 -07:00
Mouse Reeve 07ba880ff7
Merge pull request #1363 from bookwyrm-social/quote-page
Create and view quotation page numbers
2021-09-05 16:43:43 -07:00
Mouse Reeve 2118ba71ea Updates locales 2021-09-05 16:12:09 -07:00
Mouse Reeve 1681b2563d Merge branch 'main' into quote-page 2021-09-05 16:08:54 -07:00
Mouse Reeve b80de929fd Create and view quotation page numbers 2021-09-05 16:00:40 -07:00
Mouse Reeve fb0989e902
Merge pull request #1362 from bookwyrm-social/fallback-modal
Fallback modal
2021-09-05 15:53:35 -07:00
Mouse Reeve 99904618ac Fixes close buttons on modals 2021-09-05 15:24:09 -07:00
Mouse Reeve a2811b6c1b Fixes redirects in fallback post modal 2021-09-05 15:24:03 -07:00
Mouse Reeve 11b23e9bc7
Merge pull request #1361 from bookwyrm-social/shelf-counts
Shelf counts
2021-09-05 15:17:50 -07:00
Mouse Reeve 2ecec1a165 Updates locales 2021-09-05 14:46:17 -07:00
Mouse Reeve 4fea674d56
Merge pull request #1360 from bookwyrm-social/nginx-www-redirect
Use non-www domain canonically
2021-09-05 14:43:25 -07:00
Mouse Reeve d046deaf11 Adds totals and page counts to shelf headers 2021-09-05 14:42:11 -07:00
Mouse Reeve 7ac9616c29
Merge pull request #1358 from bookwyrm-social/review-content-field
Remove required attribute on content field in create review form
2021-09-05 14:21:01 -07:00
Mouse Reeve 8e2acb733c Use non-www domain canonically 2021-09-05 14:13:54 -07:00
Mouse Reeve 94f4a01665 Remove requried attribute on content field in create review form 2021-09-05 13:25:57 -07:00
Mouse Reeve 55b674258d
Merge pull request #1353 from bookwyrm-social/logo-path
Fixes logo path on about page
2021-09-05 10:59:04 -07:00
Mouse Reeve 4009e80bab Fixes logo path on about page 2021-09-05 10:33:40 -07:00
Mouse Reeve c92db85209
Merge pull request #1346 from bookwyrm-social/display-fixes
Display fixes
2021-09-02 14:23:29 -07:00
Mouse Reeve ccc41deb36 Retain whitespace in split for detecting urls 2021-09-02 13:36:01 -07:00
Mouse Reeve 5bfa09e411 Fixes whitespace when formatting links 2021-09-02 09:13:02 -07:00
Mouse Reeve a236163e67 Small cleanup 2021-09-02 09:12:56 -07:00
Mouse Reeve 3d394f96bf Fixes testing if authors are present 2021-09-02 08:49:50 -07:00
Mouse Reeve d7557926f7 Create task for shelve updates 2021-08-30 14:08:53 -07:00
Mouse Reeve 32f044445f Fix merge weirdness around shelve/unshelve 2021-08-30 14:00:38 -07:00
Mouse Reeve 54f1b0aee2 Merge branch 'main' into activitystreams-celery 2021-08-30 13:48:34 -07:00
Mouse Reeve c3ff7fcf9b Resolves merge weirdness 2021-08-30 13:44:19 -07:00
Mouse Reeve 8d23f1d356
Merge pull request #1343 from reesporte/fix-link-formatter
fix link formatter
2021-08-30 13:37:04 -07:00
reesporte 4f321e5f33 fix link formatting issue, for real this time 2021-08-30 14:23:04 -05:00
reesporte c6d08050e2 bruh 2021-08-30 11:51:42 -05:00
reesporte 0f481714c0 fix pylint errors 2021-08-30 11:47:19 -05:00
reesporte 6e628fed38 formatting 2021-08-30 11:38:00 -05:00
reesporte ac6438147d remove unused import 2021-08-30 11:20:56 -05:00
reesporte aa946e3ab7 add more test cases for link formatting 2021-08-30 11:12:27 -05:00
reesporte 5291308677 fix link formatting issues 2021-08-30 11:12:05 -05:00
Mouse Reeve 11e752185d
Merge pull request #1342 from reesporte/spanish-translation
more spanish translations
2021-08-29 11:50:18 -07:00
Mouse Reeve a9716f2fd8
Merge pull request #1286 from bookwyrm-social/readthrough-dates
Adds database constraint for read-through dates
2021-08-29 11:50:07 -07:00
Mouse Reeve e98ee64e2b Merge migration 2021-08-29 11:20:30 -07:00
Mouse Reeve 57ef1522b5 Merge branch 'main' into readthrough-dates 2021-08-29 11:18:35 -07:00
Mouse Reeve 66f8e9b4fc Fixes model name 2021-08-29 11:12:57 -07:00
reesporte b598093e91 more spanish translations 2021-08-29 13:11:35 -05:00
Mouse Reeve fc40c45591
Merge pull request #1339 from bookwyrm-social/privacy
Fixes parsing privacy fields from federated posts
2021-08-29 10:52:36 -07:00
Mouse Reeve 082c2708a7 Fixes attribution field logic 2021-08-29 08:50:46 -07:00
Mouse Reeve 616ad518be
Merge pull request #1341 from bookwyrm-social/admin-perms
Fixes admin permissions
2021-08-29 08:39:54 -07:00
Mouse Reeve 8c8b1168d4 Support attribution field on boosts 2021-08-29 08:22:14 -07:00
Mouse Reeve 76ba56f656 Fixes admin permissions 2021-08-29 08:14:53 -07:00
Mouse Reeve 0569bce610 Cleaner string formatting in user model 2021-08-29 07:37:21 -07:00
Mouse Reeve 9eea60b35c Fixes call to followers url in serialization 2021-08-29 07:36:59 -07:00
Mouse Reeve 05e5db177d
Merge pull request #1338 from bookwyrm-social/default-ap-value
Use None instead of empty string for activitypub null value
2021-08-28 13:53:04 -07:00
Mouse Reeve 8629c4450c Adds test for user followers field from AP 2021-08-28 12:20:43 -07:00
Mouse Reeve a5dcc0e5e4 Support multiple possible fields that indicate user ownership 2021-08-28 12:11:15 -07:00
Mouse Reeve 9c4fd1e602 Set user default values 2021-08-28 12:06:03 -07:00
Mouse Reeve 1e675384bc Updates user model test 2021-08-28 11:58:41 -07:00
Mouse Reeve e4b5890992 Updates field tests 2021-08-28 11:41:33 -07:00
Mouse Reeve 2c26b04119 Uses correct object to determine author 2021-08-28 11:30:54 -07:00
Mouse Reeve 2dbd845c55
Merge pull request #1334 from bookwyrm-social/locales
Update locale files
2021-08-28 11:29:51 -07:00
Mouse Reeve 41ed5f3103
Merge pull request #1337 from bookwyrm-social/feed-logic
Feed logic
2021-08-28 11:29:37 -07:00
Mouse Reeve 4f94d99c88 Use None instead of empty string for activitypub null value 2021-08-28 11:16:39 -07:00
Mouse Reeve dc72df7339 Generate likely followers url for existing users 2021-08-28 11:15:17 -07:00
Mouse Reeve 53d9ff87d9 Look up followers url to determine post privacy 2021-08-28 10:40:52 -07:00
Mouse Reeve e9d951e4cd Add user model field for followers url 2021-08-28 10:33:57 -07:00
Mouse Reeve f308b7793d Adds test for followers only privacy level 2021-08-28 10:08:41 -07:00
Mouse Reeve e1af13d038 Adds test 2021-08-28 09:55:06 -07:00
Mouse Reeve 4fb834f10f Simpler feed verification logic 2021-08-28 09:42:03 -07:00
Mouse Reeve 3a8eeb35a7 Uses modal template for progress modal 2021-08-28 09:41:36 -07:00
Mouse Reeve 7544647b5b
Merge pull request #1335 from DeeUnderscore/webfinger-ignore-case
Make webfinger match usernames in case insensitive manner
2021-08-27 16:25:06 -07:00
D Anzorge 92b96afc2d Make webfinger match usernames in case insensitive manner 2021-08-27 21:27:54 +02:00
Mouse Reeve ae840002de Only show update option when there's an active readthrough 2021-08-27 12:21:16 -07:00
Mouse Reeve 337f1ac7d2 Update locale files 2021-08-27 12:12:33 -07:00
Mouse Reeve 497b54c014 Updates test 2021-08-27 11:38:34 -07:00
Mouse Reeve e129b9c1f1 Adds more readthrough model tests 2021-08-27 11:16:51 -07:00
Mouse Reeve 2c78eddbeb Normalize readthrough dates in advance of migration 2021-08-27 10:47:56 -07:00
Mouse Reeve 3f2f8f0e50 Updates migrations 2021-08-27 10:32:51 -07:00
Mouse Reeve 01d82cfa3a Merge branch 'main' into readthrough-dates 2021-08-27 10:25:41 -07:00
Mouse Reeve 691f9c01c4
Merge pull request #1331 from bookwyrm-social/list-fix
Fixes error for logged out user viewing lists
2021-08-24 15:51:55 -06:00
Mouse Reeve 2ec01803e0 Fixes error for logged out user viewing lists 2021-08-24 14:16:22 -07:00
Mouse Reeve fe75049177
Merge pull request #1329 from bookwyrm-social/list-flag
Indicate if a list is saved on the lists tile view
2021-08-23 17:26:17 -06:00
Mouse Reeve 6115ead363
Merge pull request #1330 from bookwyrm-social/resolve-book-errors
Safely handle work with no editions error
2021-08-23 17:26:08 -06:00
Mouse Reeve ac3a989e37
Merge pull request #1328 from bookwyrm-social/unread-count
Increment unread count less wildly
2021-08-23 17:22:59 -06:00
Mouse Reeve 332a712d84 Safely handle work with no editions error 2021-08-23 15:59:58 -07:00
Mouse Reeve 016930fd0c
Merge pull request #1327 from bookwyrm-social/lists
Bookmark lists
2021-08-23 16:54:36 -06:00
Mouse Reeve d59ac297bb Indicate if a list is saved on the lists tile view 2021-08-23 15:54:20 -07:00
Mouse Reeve 26e932aa7b Increment unread count less wildly
Works on #1293
2021-08-23 15:47:14 -07:00
Mouse Reeve 473ad5ffba Fixes tests 2021-08-23 15:35:51 -07:00
Mouse Reeve c727d351ba Fixes variable name 2021-08-23 15:33:49 -07:00
Mouse Reeve f267e53b56 let's call it save not bookmark 2021-08-23 15:07:38 -07:00
Mouse Reeve b7fb55e6ad Fixes test for login redirected view 2021-08-23 14:53:48 -07:00
Mouse Reeve 79063507e5
Merge pull request #1326 from bookwyrm-social/boost-fix
Fixes boosts removing statuses from feeds
2021-08-23 15:47:29 -06:00
Mouse Reeve 47dbcc3af0 Adds views test 2021-08-23 14:15:19 -07:00
Mouse Reeve fcd41aaf06 Add specific vendor file 2021-08-23 13:59:23 -07:00
Mouse Reeve d3cfceafca Mocks creation of boost 2021-08-23 13:58:19 -07:00
Mouse Reeve f187d7ec2d ignore vendor files in editorconfig 2021-08-23 13:53:45 -07:00
Mouse Reeve a30094c822 View bookmarked lists 2021-08-23 13:40:07 -07:00
Mouse Reeve 42abc145c8 Adds action views 2021-08-23 13:15:35 -07:00
Mouse Reeve 135fcbd269 Adds button to template 2021-08-23 13:02:27 -07:00
Mouse Reeve 457415f874 Adds bookmark icon 2021-08-23 11:36:22 -07:00
Mouse Reeve eca0ff371c Adds saved lists many to many field 2021-08-23 11:19:15 -07:00
Mouse Reeve 16235d1d90 Actually use provided stoers list 2021-08-23 10:48:23 -07:00
Mouse Reeve 9c21f4d8e6 Adds tests for boosts in activitystreams 2021-08-23 10:44:38 -07:00
Mouse Reeve f284eebece Fixes boosts removing statuses from feeds 2021-08-23 07:04:59 -07:00
Mouse Reeve 7345705b08 Small efficiency improvement in list view 2021-08-21 20:21:39 -07:00
Mouse Reeve e76163ffae
Merge pull request #1322 from bookwyrm-social/want-to-read-header
Fixes want to read status header
2021-08-21 13:09:34 -06:00
Mouse Reeve 3a9b9623e9
Merge pull request #1321 from bookwyrm-social/html-validation
Html validation fixes
2021-08-21 13:07:34 -06:00
Mouse Reeve accfbbfd90
Merge pull request #1320 from bookwyrm-social/books-warning
Resolves warning in books view
2021-08-21 12:50:40 -06:00
Mouse Reeve 3f8eefd694 Fixes want to read status header
jankily, mind you
2021-08-21 11:49:57 -07:00
Mouse Reeve a70b0e8712 Spacing for curly lint action 2021-08-21 11:45:36 -07:00
Mouse Reeve 0a8a4f0ee4 Adds curlylint workflow 2021-08-21 11:39:21 -07:00
Mouse Reeve 6f8ca302e5 Clearer form logic in edit book page 2021-08-21 11:38:57 -07:00
Mouse Reeve e31783ef6e Cleans up html on import status page 2021-08-21 11:15:56 -07:00
Mouse Reeve 270571668d adds space between attributes on book page 2021-08-21 11:05:38 -07:00
Mouse Reeve a235811524 Fixes quote style on author page 2021-08-21 11:04:26 -07:00
Mouse Reeve 81d51d0634 Removes nonfunctional test linter 2021-08-21 10:53:18 -07:00
Mouse Reeve 821d0f49e2 Wraps entire div block in spaceless tag 2021-08-21 10:51:07 -07:00
Mouse Reeve f48cea3ed9 Fixes endquote outside of if statement 2021-08-21 10:50:49 -07:00
Mouse Reeve e7ee4a45fa adds missing button close tag in shelve button options 2021-08-21 10:50:27 -07:00
Mouse Reeve 24d1513320 Removes stray close tag in announcements 2021-08-21 10:49:50 -07:00
Mouse Reeve ec10ebbe68 Fixes quote type 2021-08-21 10:49:35 -07:00
Mouse Reeve 85a4c331eb Use search results template for isbn view 2021-08-21 10:48:26 -07:00
Mouse Reeve 053579c2a4 Clarifies logic in file upload widget 2021-08-21 10:33:50 -07:00
Mouse Reeve d1e9a164ff Correct close tag in user null state view 2021-08-21 10:33:19 -07:00
Mouse Reeve af2abcbe3d Missing close link tag in manage invites view 2021-08-21 10:32:55 -07:00
Mouse Reeve 5bd92a8e34 Fixes "view directory" link html and adds it to l10n 2021-08-21 10:32:32 -07:00
Mouse Reeve 1aab9e7da9 Fixes endif placement on null state for feed 2021-08-21 10:30:44 -07:00
Mouse Reeve be94c0a76b Remove stray </dl> tag 2021-08-21 10:30:15 -07:00
Mouse Reeve 8055fa8d8f Test out accessibility linter github action 2021-08-21 09:03:15 -07:00
Mouse Reeve 596b6ca084 Resolves warning in books view 2021-08-21 07:25:18 -07:00
Mouse Reeve 73121eb4f6
Merge pull request #1316 from joachimesque/patch-1
Thumbnails: fix default size definition in template utility
2021-08-20 15:15:02 -06:00
Joachim bf6ee9f53c
Thumbnails: fix default size definition in template utility 2021-08-20 18:06:09 +02:00
Mouse Reeve 7a390af07e
Merge pull request #1314 from bookwyrm-social/modal-overflow
Adds max height to modals so they don't disappear on small screens
2021-08-19 18:11:11 -06:00
Mouse Reeve 50c563b370
Merge pull request #1315 from bookwyrm-social/discover-view-sizes
Larger cover sizes for discover and landing views
2021-08-19 18:11:05 -06:00
Mouse Reeve 451cb38c6c Linter fix 2021-08-19 15:33:23 -07:00
Mouse Reeve 9a7429b268 Larger cover sizes for discover and landing views 2021-08-19 15:30:58 -07:00
Mouse Reeve 8ba695c21d Adds max height to modals so they don't disappear on small screens 2021-08-19 15:19:10 -07:00
Mouse Reeve 0829696add
Merge pull request #1138 from joachimesque/images-django-imagekit
Generate thumnails for books
2021-08-18 19:53:12 -06:00
Joachim 489f97030e apply suggested changes 2021-08-18 10:27:17 +02:00
Mouse Reeve c2592fe7c5
Merge pull request #1309 from bookwyrm-social/gettext_fix
Use gettext_lazy not gettext
2021-08-17 16:08:30 -06:00
Mouse Reeve 075715ca22 Use gettext_lazy not gettext 2021-08-17 14:35:28 -07:00
Mouse Reeve 0c6948dc44
Merge pull request #1307 from bookwyrm-social/missing-migration
Adds missing migration
2021-08-17 13:35:18 -06:00
Mouse Reeve fc9613b975
Merge pull request #1305 from bookwyrm-social/search-editions
Search editions
2021-08-17 13:26:20 -06:00
Mouse Reeve 0b4a267745 Adds missing migration 2021-08-17 12:17:35 -07:00
Mouse Reeve 32d4ae1f4e Python formatting 2021-08-17 12:04:14 -07:00
Mouse Reeve b178ba6326 Removes unneeded list comprehension 2021-08-17 11:57:19 -07:00
Mouse Reeve cb4c6100aa Adds tests 2021-08-17 11:49:29 -07:00
Mouse Reeve a49ec8b94e
Merge pull request #1306 from bookwyrm-social/shelf-layout
Remove unneeded layout file
2021-08-17 12:31:17 -06:00
Mouse Reeve c2763f0c18
Merge pull request #1304 from bookwyrm-social/prevent-import-overwrite
Prevent overwriting data on import form outside data source
2021-08-17 12:13:12 -06:00
Mouse Reeve e5a3d98769 Remove unneeded layout file 2021-08-17 10:57:32 -07:00
Mouse Reeve ea749e1a3d
Merge pull request #1195 from shilpeePrasad/bookfixbranch
Fixed issue #1099 (Remove bio from Your Books)
2021-08-17 11:52:23 -06:00
Mouse Reeve bbe5ad7ce1 Suppresses pylint warning 2021-08-17 10:49:11 -07:00
Mouse Reeve 6db3391f8b Search editions in view 2021-08-17 10:45:30 -07:00
Mouse Reeve 3b54852536 Adds search filter to UI 2021-08-17 10:44:18 -07:00
Mouse Reeve 19464a8715
Merge pull request #1301 from bookwyrm-social/refactor-modals
Prompt user to add commentary on reading status updates
2021-08-17 11:27:52 -06:00
Mouse Reeve 4b788f5df1 Move editions into their own view file 2021-08-17 10:26:56 -07:00
Mouse Reeve ad0fff7030 Prevent overwriting data on import form outside data source 2021-08-17 10:08:07 -07:00
Mouse Reeve 0f0dde6c6d
Merge pull request #1298 from bookwyrm-social/comment-header-link
Fixes link in status header for comments
2021-08-17 10:43:08 -06:00
Mouse Reeve ddaf949c94
Merge branch 'main' into activitystreams-celery 2021-08-17 10:42:09 -06:00
Mouse Reeve 8b5ac6b012 Javascript linter 2021-08-17 09:28:39 -07:00
Mouse Reeve 3026a86b11 Refines preventDefault logic 2021-08-17 09:21:57 -07:00
Mouse Reeve 2f93017eaa Fixes event propogation 2021-08-17 08:45:10 -07:00
Mouse Reeve b991510c03 Fixes want to read status slug 2021-08-16 15:00:35 -07:00
Mouse Reeve 899f91a811 Adds locales 2021-08-16 14:27:43 -07:00
Mouse Reeve 5cdd71b9bf
Merge pull request #1303 from bookwyrm-social/author-page
Fixes author page
2021-08-16 15:09:41 -06:00
Mouse Reeve d7a168e0a9 Python formatting 2021-08-16 14:00:11 -07:00
Mouse Reeve bb49d0dc9b Adds test 2021-08-16 13:59:15 -07:00
Mouse Reeve f93587c0e1 Fixes author page 2021-08-16 13:44:54 -07:00
Mouse Reeve 5fcea99029 Indicate reading status changes with comments 2021-08-16 13:39:56 -07:00
Mouse Reeve 48c6a3923a Save reading status update 2021-08-16 13:32:20 -07:00
Mouse Reeve 2d20fa4146 Adds reading status field to book statuses 2021-08-16 13:32:12 -07:00
Mouse Reeve 1e1bf83201 Create abstract parent class for book statuses 2021-08-16 13:14:29 -07:00
Mouse Reeve 6280671d92 Create comments when commentary is provided 2021-08-16 13:08:45 -07:00
Mouse Reeve f12c5df288 Show "optional" helper on comment field 2021-08-16 12:58:22 -07:00
Mouse Reeve 0549dbaa6d Make comment optional 2021-08-16 12:48:52 -07:00
Mouse Reeve 011175a6e3 Appeases js linter 2021-08-16 12:44:36 -07:00
Mouse Reeve e6b785d731 No-update mode for "want to read" 2021-08-16 12:28:04 -07:00
Mouse Reeve 257c9854c2 Move reading modal templates to their own dir 2021-08-16 11:30:11 -07:00
Mouse Reeve 7e1b606e1f Fixes link in status header for comments 2021-08-16 11:08:13 -07:00
Mouse Reeve c1afd3f852
Merge pull request #1272 from bookwyrm-social/rss
Updates rss feed view
2021-08-16 11:59:24 -06:00
Mouse Reeve 5de3c75de3 Remove render from tests 2021-08-16 10:30:11 -07:00
Mouse Reeve b8082ad233 Merge branch 'main' into rss 2021-08-16 10:25:33 -07:00
Mouse Reeve 7345b85ebd Granular RSS tests 2021-08-16 10:25:21 -07:00
Mouse Reeve dfed212b12
Merge pull request #1297 from bookwyrm-social/admin-filter
Adds local only filter to user admin view
2021-08-16 10:56:24 -06:00
Mouse Reeve 71404fae06 Adds local only filter to user admin view 2021-08-16 08:51:23 -07:00
Mouse Reeve 343e5772d2
Merge pull request #1294 from GuDzpoz/main
Updated Simplified Chinese translation
2021-08-15 09:39:08 -06:00
GuDzpoz dd54473a30 Updated Simplified Chinese translation;
fixed a few typos and unified several punctuation styles.
2021-08-15 22:58:36 +08:00
Mouse Reeve 938872d2a5
Merge pull request #1292 from bookwyrm-social/missing-space
Missing space
2021-08-12 22:18:01 -06:00
Mouse Reeve a2710059c9 Updates locales 2021-08-12 19:29:10 -07:00
Mouse Reeve 9af435bbeb Space getting removes in reply header 2021-08-12 19:18:37 -07:00
Mouse Reeve 4ef71dfbf3
Merge pull request #1291 from bookwyrm-social/dependabot/npm_and_yarn/path-parse-1.0.7
Bump path-parse from 1.0.6 to 1.0.7
2021-08-12 19:27:36 -06:00
dependabot[bot] 80e70fcf0b
Bump path-parse from 1.0.6 to 1.0.7
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 00:55:08 +00:00
Mouse Reeve a9e767f65b
Merge pull request #1289 from bookwyrm-social/pulldown-menu
Fixes main nav menu
2021-08-12 16:52:49 -06:00
Mouse Reeve 26b7f2ec70 Fixes main nav menu 2021-08-12 14:43:42 -07:00
Mouse Reeve 0bcb9143bb
Merge pull request #1287 from bookwyrm-social/quote-fix
Fixes quote display
2021-08-12 08:18:57 -06:00
Mouse Reeve 6880657deb Fixes quote display 2021-08-12 06:42:21 -07:00
Mouse Reeve 45e82abda4
Merge branch 'main' into images-django-imagekit 2021-08-11 12:47:25 -06:00
Mouse Reeve 1be125fc1d Adds database constraint for readthrough dates 2021-08-11 11:19:06 -07:00
Mouse Reeve 19ddcedf14
Merge pull request #1283 from bookwyrm-social/fixes-poll
Fixes polling variable name
2021-08-11 11:42:37 -06:00
Mouse Reeve adc8f36bb9
Merge pull request #1282 from bookwyrm-social/quote-content-field
Fixes required attr on content fields for composing quotes
2021-08-11 10:27:38 -06:00
Mouse Reeve 26ff55ebee Fixes polling variable name 2021-08-11 09:19:25 -07:00
Mouse Reeve c6e328706b Fixes required attr on content fields for composing quotes 2021-08-11 09:03:38 -07:00
Mouse Reeve 86f2231f38
Merge pull request #1281 from bookwyrm-social/fallbackpage-templates
Fixes template links in reading progress fallback paths
2021-08-10 20:56:21 -06:00
Mouse Reeve e668f42801
Merge pull request #1277 from reesporte/spanish-translation
spanish translations
2021-08-10 19:29:37 -06:00
Mouse Reeve 6a84309fac Fixes template links in reading progress fallback paths 2021-08-10 18:28:14 -07:00
Mouse Reeve 533c9563eb
Merge pull request #1279 from bookwyrm-social/import-fix
Fixing bug preventing csv imports to match via title/author
2021-08-10 15:43:12 -06:00
Mouse Reeve 1b4db49035 Fixing bug preventing csv imports to match via title/author 2021-08-10 14:30:28 -07:00
Mouse Reeve ef1896da18 Return confidence rating 2021-08-10 14:02:22 -07:00
Mouse Reeve fa396d4bc8 Save best-guess search results on import 2021-08-10 13:54:52 -07:00
Mouse Reeve ebabbf475a Translate error messages 2021-08-10 13:48:09 -07:00
Mouse Reeve 6301656a0e Fixes setting book results from title/author search 2021-08-10 13:46:20 -07:00
reese 1d4a507ea9 spanish translations 2021-08-09 22:19:54 -05:00
Mouse Reeve eabe886347
Merge pull request #1271 from bookwyrm-social/template-refactor
Always use underscores in html ids
2021-08-09 09:04:47 -06:00
Mouse Reeve fd56379518 Updates rss feed view 2021-08-09 07:38:43 -07:00
Mouse Reeve 820eeeb69a Lowercase "rate" 2021-08-09 07:29:08 -07:00
Mouse Reeve 21a954c7df Always use underscores in html ids
Plus some other shifting around
2021-08-08 19:44:12 -07:00
Mouse Reeve 187e2e0d08
Merge pull request #1270 from bookwyrm-social/request-exception
Uses more general requests exception
2021-08-08 19:42:32 -06:00
Mouse Reeve 02fac7a46b
Merge pull request #1269 from justinabrahms/close-span
Close the span tag for an author.
2021-08-08 19:26:02 -06:00
Mouse Reeve 65e982e35b Uses more general requests exception 2021-08-08 18:13:02 -07:00
Mouse Reeve 710f834e53
Merge pull request #1268 from bookwyrm-social/inventaire-works
Fixes loading editions from inventaire
2021-08-08 17:24:34 -06:00
Mouse Reeve 55d84d50ee Fixes loading editions from inventaire 2021-08-08 15:55:49 -07:00
Mouse Reeve 0462a3b0fc
Merge pull request #1266 from bookwyrm-social/discover-local
Adds local discover view
2021-08-08 16:09:15 -06:00
Mouse Reeve c8e7e95c17 fixes logged out view test 2021-08-08 14:43:17 -07:00
Mouse Reeve b7b780e45c Discover not directory wth??? 2021-08-08 14:17:02 -07:00
Mouse Reeve e2f3c4602d test the correct view 2021-08-08 08:37:07 -07:00
Mouse Reeve 65fa2813c6 Show link to discover view 2021-08-08 08:07:20 -07:00
Mouse Reeve 2222c28305 Adds discover view tests 2021-08-08 08:03:04 -07:00
Mouse Reeve 3ce59d13d3 Mocks populate streams task 2021-08-08 07:32:23 -07:00
Mouse Reeve c14bcf19cc Use activitystreams to populate discovery view 2021-08-07 18:56:05 -07:00
Mouse Reeve 590338138c Populate streams tasks 2021-08-07 17:44:40 -07:00
Mouse Reeve 48a8b014ba Populate local stream for discover view 2021-08-07 17:18:20 -07:00
Mouse Reeve c28d077cb4 Simplifies query for landing page books 2021-08-07 17:12:38 -07:00
Mouse Reeve b116df723f prevent large text from janking up view 2021-08-07 16:48:53 -07:00
Mouse Reeve 4d8bd3ad93 Cleans up landing page, since we're here 2021-08-07 16:37:51 -07:00
Mouse Reeve 33c8849552 Trim sooner 2021-08-07 16:18:15 -07:00
Mouse Reeve 650a6037a2 Trims status text 2021-08-07 15:51:53 -07:00
Justin Abrahms 1006096cd0 Close the span tag for an author. 2021-08-07 15:40:50 -07:00
Mouse Reeve da849e9f1f
Merge pull request #1263 from reesporte/spanish-translations
update spanish translations
2021-08-07 16:18:30 -06:00
Mouse Reeve c685fb0296
Merge pull request #1265 from bookwyrm-social/generated-notes-activitystream
Fixes generated notes not appearing in books stream
2021-08-07 16:11:28 -06:00
Mouse Reeve 760bd5a63f Fixes reference to landing page books 2021-08-07 15:10:53 -07:00
Mouse Reeve 2eb37663b6 Adds mock to inbox test 2021-08-07 14:46:33 -07:00
Mouse Reeve e3cbf30684 Local discovery view 2021-08-07 14:43:05 -07:00
Mouse Reeve 7b86537f1a
Merge pull request #1264 from arkhi/i18n
[french] Translate strings about email confirmation.
2021-08-07 14:23:44 -06:00
Fabien Basmaison 06c5ae06a6 [french] Compile French locale. 2021-08-07 21:47:30 +02:00
Mouse Reeve b5153f3df1 WIP 2021-08-07 12:33:45 -07:00
Mouse Reeve 040758c833 Renames "discover" 2021-08-07 11:25:09 -07:00
Mouse Reeve cce7d9a648 Don't skip updates statuses when adding to streams
Generated note books are added post-initial save
2021-08-07 10:59:55 -07:00
Fabien Basmaison a0d2f38970 [french] Translate strings about email confirmation. 2021-08-07 19:35:43 +02:00
reese 468f1f135c update spanish translations 2021-08-07 11:35:07 -05:00
Mouse Reeve 1dea2b307b
Merge pull request #1260 from bookwyrm-social/email-confirmation
Email confirmation
2021-08-07 09:32:25 -06:00
Mouse Reeve 026c6ac025 Mocks emailer in registration test 2021-08-07 08:01:14 -07:00
Mouse Reeve 38f614a526 Include generated notes in books stream 2021-08-07 07:56:30 -07:00
Mouse Reeve 68e4462486 Make email a required html field in register form 2021-08-07 07:43:30 -07:00
Mouse Reeve 226c325099 Adds plaintext code to emails 2021-08-07 07:37:18 -07:00
Mouse Reeve 0fa9fd7331 Registration with confirm email tests 2021-08-07 07:28:24 -07:00
Mouse Reeve d7a79573c4
Merge pull request #1261 from bookwyrm-social/list-display
Improves cross-edition display for lists
2021-08-07 07:54:42 -06:00
Mouse Reeve aad5de3b61 Improves cross-edition display for lists 2021-08-06 19:03:15 -07:00
Mouse Reeve e198e663d1 Fixes names of site settings field in tests 2021-08-06 18:48:16 -07:00
Mouse Reeve a3d5a03477 Updates locales 2021-08-06 18:47:25 -07:00
Mouse Reeve 98a98f8e69 Updates test env 2021-08-06 18:13:51 -07:00
Mouse Reeve 5373663acf Merge branch 'main' into email-confirmation 2021-08-06 18:09:01 -07:00
Mouse Reeve 4d4a7bc20b
Merge pull request #1259 from bookwyrm-social/test-coverage
Test coverage
2021-08-06 19:07:48 -06:00
Mouse Reeve cec6943069 Adds missing mock 2021-08-06 17:43:50 -07:00
Mouse Reeve 9077516fa1 Resend links 2021-08-06 17:39:22 -07:00
Mouse Reeve 1ad057d89d Confirmation templates 2021-08-06 17:23:44 -07:00
Mouse Reeve 5926224d7e Confirm email views 2021-08-06 16:26:46 -07:00
Mouse Reeve 247a7f7489 Email confirmation email 2021-08-06 15:38:37 -07:00
Mouse Reeve 3e2f1806e9 Adds email confirmation code field 2021-08-06 14:42:18 -07:00
Mouse Reeve 3082c4ce5c Tests invite create view 2021-08-06 11:55:20 -07:00
Mouse Reeve 568e30230a Adds start import view test 2021-08-06 11:43:55 -07:00
Mouse Reeve 0d2622e4ff Tests login view 2021-08-06 11:23:38 -07:00
Mouse Reeve 3abceb8563 Templatetag test 2021-08-06 10:33:14 -07:00
Mouse Reeve 9804d4cf51 Adds more book view tests 2021-08-06 10:19:38 -07:00
Joachim 6a365eafb4
Merge branch 'main' into images-django-imagekit 2021-08-06 19:16:01 +02:00
Mouse Reeve 1126f47224
Merge pull request #1258 from bookwyrm-social/suggested-users-memory
Disable comically inefficient book count comparisons
2021-08-06 11:03:28 -06:00
Mouse Reeve 134db20c57 Fixes directory view 2021-08-06 09:40:01 -07:00
Mouse Reeve 9030f0d08b Bookwyrm user was already set 2021-08-06 09:14:07 -07:00
Mouse Reeve d126d7ba91 Disable comically inefficient book count comparisons
Oops! Hopefully I can restore these in a way that doesn't break at even
a moderate scale
2021-08-06 08:43:05 -07:00
Mouse Reeve 5f10e7535b
Merge pull request #1257 from bookwyrm-social/user-active-date
Fixes over-reporting user last active date
2021-08-05 22:26:14 -06:00
Mouse Reeve 6fa430efec
Merge pull request #1256 from bookwyrm-social/test-coverage
Adds misc tests to improve coverage
2021-08-05 20:52:35 -06:00
Mouse Reeve 2e7dd9d4ef Fixes over-reporting user last active date 2021-08-05 19:52:15 -07:00
Mouse Reeve b3fa8de65a fixes book mock in user view tests 2021-08-05 19:28:23 -07:00
Mouse Reeve 6b7e3f2061 Adds books stream mock 2021-08-05 19:28:23 -07:00
Mouse Reeve 061deaefda Removes invalid argument 2021-08-05 19:28:23 -07:00
Mouse Reeve 120938bee9 Update books feed on shelve 2021-08-05 19:28:05 -07:00
Mouse Reeve 48175023bc Mocks broadcast 2021-08-05 18:58:32 -07:00
Mouse Reeve 342a126c92
Merge pull request #1255 from bookwyrm-social/books-feed-shelve
Update books feed on shelve
2021-08-05 19:30:23 -06:00
Mouse Reeve 41742d6698 Adds inventaire get connector test 2021-08-05 18:16:23 -07:00
Mouse Reeve d0114d2e83 Adds test for book add description view 2021-08-05 18:07:36 -07:00
Mouse Reeve d390b395e6 fixes book mock in user view tests 2021-08-05 17:47:49 -07:00
Mouse Reeve 70a535adb7 Adds books stream mock 2021-08-05 17:19:39 -07:00
Mouse Reeve 70f4ecf870 Removes invalid argument 2021-08-05 17:13:47 -07:00
Mouse Reeve 30288c6ebb Update books feed on shelve 2021-08-05 16:43:22 -07:00
Mouse Reeve d7307463d5
Merge branch 'main' into activitystreams-celery 2021-08-05 16:11:15 -06:00
Mouse Reeve ac52142146
Merge pull request #1253 from bookwyrm-social/new-feeds
Use Home and Books feeds instead of Home/Local/Federated feeds
2021-08-05 15:53:31 -06:00
Mouse Reeve f3a757951c Tests for books stream 2021-08-05 14:28:17 -07:00
Mouse Reeve 142d0da3b7 Removes outdated tests 2021-08-04 20:01:44 -07:00
Mouse Reeve 6841a66e76 Python formatting 2021-08-04 19:57:39 -07:00
Mouse Reeve 1fbca70820 Move activitystreams updates to tasks 2021-08-04 19:54:47 -07:00
Mouse Reeve c8250ac94c Python formatting 2021-08-04 19:25:44 -07:00
Mouse Reeve 1c0472efc2 Fixes references to public streams 2021-08-04 19:19:24 -07:00
Mouse Reeve 75f586c109 Removes unused stream code 2021-08-04 19:09:00 -07:00
Mouse Reeve 3b46ce8501 Locale updates 2021-08-04 18:58:53 -07:00
Mouse Reeve 9d19092205 Updates tests 2021-08-04 18:22:06 -07:00
Mouse Reeve 9d75bc3982 Display books timeline 2021-08-04 17:53:44 -07:00
Mouse Reeve 5a9dbc50da Adds books stream 2021-08-04 17:25:31 -07:00
Mouse Reeve a8d6dbd8a6 Adds books stream audience 2021-08-04 16:56:08 -07:00
Mouse Reeve 2c08be79f8 Merge migration 2021-08-04 14:19:17 -07:00
Mouse Reeve fd0f9324d3 Merge branch 'main' into book-format-choices 2021-08-04 14:13:55 -07:00
Mouse Reeve 48fcdcbe93 Python formatting 2021-08-04 14:12:37 -07:00
Mouse Reeve 699d9307e3
Merge pull request #1251 from bookwyrm-social/prospective-follow-display
Prospective follow display
2021-08-04 14:58:52 -06:00
Mouse Reeve aabac4e7b7 Updates translations 2021-08-04 13:43:38 -07:00
Mouse Reeve f5c129dce7 Also in suggestion area 2021-08-04 13:38:06 -07:00
Mouse Reeve 708a813905
Merge pull request #1249 from bookwyrm-social/goal-page
Handle goal pages for unset years
2021-08-04 14:16:45 -06:00
Mouse Reeve 54f6da2382 Use current year in goal tests 2021-08-04 12:59:06 -07:00
Mouse Reeve cf53291d1f
Merge pull request #1250 from bookwyrm-social/author-list
Limit authors displayed in status
2021-08-04 13:51:50 -06:00
Mouse Reeve 12fb969821 Python formatting 2021-08-04 12:40:15 -07:00
Mouse Reeve a679a46bca Limit authors displayed in status 2021-08-04 12:36:54 -07:00
Mouse Reeve 535ff5e6d8 Handle goal pages for unset years 2021-08-04 12:05:24 -07:00
Mouse Reeve a13db6adc3
Merge pull request #1248 from bookwyrm-social/default-post-privacy
Default post privacy
2021-08-04 12:45:13 -06:00
Mouse Reeve 392eb83bb3 Fixes edit user view tests 2021-08-04 11:30:23 -07:00
Mouse Reeve 9bbdde1597 Python formatting 2021-08-04 10:58:23 -07:00
Mouse Reeve bd7bf4ee96 Resolve conflict between inherited privacy and default privacy 2021-08-04 10:55:03 -07:00
Mouse Reeve e486bcf2c8 Cleans up edit user post privacy select 2021-08-04 10:49:14 -07:00
Mouse Reeve 2b1d647c85 Adds merge migration 2021-08-04 10:46:56 -07:00
Mouse Reeve 63c8301eb9 Merge branch '253-user-post-privacy-v2' of https://github.com/ibrand/bookwyrm into ibrand-253-user-post-privacy-v2 2021-08-04 10:44:30 -07:00
Mouse Reeve 97b643ac72
Merge pull request #1243 from bookwyrm-social/fixes-set-remote-server
Fixes remote server not getting set
2021-08-04 11:35:49 -06:00
Joachim c1673ef717 Update fields.py 2021-08-04 19:25:19 +02:00
Mouse Reeve 0a9fe4631c
Merge pull request #880 from bookwyrm-social/suggestions-redis
Uses redis for storing suggested users
2021-08-04 11:23:33 -06:00
Joachim 0db3512eb3 Revert previous commit 2021-08-04 19:21:56 +02:00
Joachim ee39e8c036 Fix R0201: Method could be a function (no-self-use) 2021-08-04 19:16:24 +02:00
Joachim c6f8236b07 Fix tests 2021-08-04 19:11:57 +02:00
Mouse Reeve 6db6aa6cb1 Fixes removing user from recs on follow 2021-08-04 09:49:05 -07:00
Joachim bc7710a4a7 Update Status Model Test 2021-08-04 18:18:18 +02:00
Mouse Reeve 89acfa4f3e Patches stray redis calls 2021-08-04 08:50:50 -07:00
Joachim 60e805ac2b Fix tests 2021-08-04 17:39:46 +02:00
Joachim 7a716db48a lint 2021-08-04 16:56:07 +02:00
Joachim b8b491bbf2 Add get_absolute_url to ImageField 2021-08-04 16:55:12 +02:00
Joachim cd1a1b2e67 Fix R1725: Consider using Python 3 style super() without arguments 2021-08-04 11:58:53 +02:00
Joachim bf3175f8d5 lint 2021-08-04 11:51:41 +02:00
Joachim 73fd098068 Better naming of context variable 2021-08-04 11:42:18 +02:00
Joachim 14c606301c Fixes "I/O Operation on Closed File error"
https://github.com/matthewwithanm/django-imagekit/issues/391#issuecomment-766708283
2021-08-04 10:28:59 +02:00
Joachim 843127efa8 Merge remote-tracking branch 'upstream/main' into images-django-imagekit 2021-08-04 10:00:20 +02:00
Mouse Reeve cbf5747308 Mock mocks mocks 2021-08-03 21:59:48 -07:00
Mouse Reeve 630ee3b766 Mocks for user admin 2021-08-03 15:22:51 -07:00
Mouse Reeve 3970df312a Fixes inbox tests 2021-08-03 15:09:38 -07:00
Mouse Reeve eeb8ae19db Python formatting 2021-08-03 14:05:52 -07:00
Mouse Reeve f35855ce69 Moore moocks 2021-08-03 13:50:12 -07:00
Mouse Reeve 5d2324a4a0 Edit user test mocks 2021-08-03 13:03:24 -07:00
Mouse Reeve c23f341980 Move annotated user function tests 2021-08-03 12:48:44 -07:00
Mouse Reeve 777d177c67 Adds more mocks 2021-08-03 12:41:41 -07:00
Mouse Reeve 1f2fea4a8e Use update_fields for password_change 2021-08-03 12:37:28 -07:00
Mouse Reeve ee9c5a2a4b Adds mock to fields 2021-08-03 12:33:42 -07:00
Mouse Reeve ebc0680288 Fixes logic error in detecting changed fields when serializing 2021-08-03 12:21:11 -07:00
Mouse Reeve b059cbdd18 Adds missing import and mock 2021-08-03 12:02:47 -07:00
Mouse Reeve 1aff6322ea Makes test user undiscoverable 2021-08-03 11:59:49 -07:00
Mouse Reeve fc93e08767 Fixes missing mocks in suggested user test 2021-08-03 11:56:33 -07:00
Mouse Reeve 2b6423792c Use update_fields when saving preview images 2021-08-03 11:47:52 -07:00
Mouse Reeve 19acfeeb72 Removes delete redis action 2021-08-03 10:44:48 -07:00
Mouse Reeve be044bce0d Updates mocks 2021-08-03 10:25:53 -07:00
Mouse Reeve 88967e589b Uses better mock pattern in relationships model 2021-08-03 09:46:04 -07:00
Mouse Reeve cfbe1b29cd Pass update fields when ticking last active date 2021-08-03 09:12:22 -07:00
Joachim f3274098b5 Update bw-dev 2021-08-03 18:10:06 +02:00
Joachim 14bf7fca2e Update book_cover.html 2021-08-03 18:03:34 +02:00
Mouse Reeve a84a744e8d Track changed fields in activity to model code 2021-08-03 08:48:15 -07:00
Joachim ce4553b367 Add simple tag to provide fallback if original image doesn't exist 2021-08-03 17:45:52 +02:00
Mouse Reeve ee7bdc956a Streamline saves on user create 2021-08-03 07:43:03 -07:00
Mouse Reeve 851410006a Fixes remote server not getting set
Omg this took so long for me to figure out
2021-08-03 07:00:31 -07:00
Mouse Reeve 62befa9295 Merge branch 'main' into suggestions-redis 2021-08-02 20:40:06 -07:00
Mouse Reeve 6d82bafdc0
Merge pull request #1242 from bookwyrm-social/image-federation
Fixes image federation
2021-08-02 21:30:24 -06:00
Mouse Reeve 9093170660 Correct test structure 2021-08-02 20:16:17 -07:00
Mouse Reeve 39b2f37947 One (hopefully) last fix 2021-08-02 20:07:46 -07:00
Mouse Reeve a334970692 Fixes path for image field in test 2021-08-02 20:00:02 -07:00
Mouse Reeve 815dbc81e3 Remove static tempaletag from image_serializer 2021-08-02 19:50:33 -07:00
Mouse Reeve 68f9b67fd9 Updates test 2021-08-02 19:30:42 -07:00
Mouse Reeve b7563ca221 Adds test 2021-08-02 19:01:23 -07:00
Mouse Reeve 9e6f78c0f5 Fixes linting issue 2021-08-02 19:01:16 -07:00
Mouse Reeve 8ef1d0d3ac Fixes image federation 2021-08-02 18:55:08 -07:00
Mouse Reeve df9787dd7a Removes stale data before doing repopulation
This probably is only an issue when there are very few users, like my
test instance
2021-08-02 18:14:44 -07:00
Mouse Reeve af8851fc2e
Merge pull request #1241 from bookwyrm-social/ambiguous-ordering
Resolves ambiguous ordering in views
2021-08-02 19:02:46 -06:00
Mouse Reeve 01334b6613 Fixes merge wonkiness in bw-dev 2021-08-02 17:55:30 -07:00
Mouse Reeve c00b35dc7c Stray file 2021-08-02 17:55:17 -07:00
Mouse Reeve dd6cce92f8 Merge branch 'main' into suggestions-redis 2021-08-02 17:49:48 -07:00
Mouse Reeve 4dddd67d0c Resolves ambiguous ordering in views 2021-08-02 17:48:29 -07:00
Mouse Reeve 2beaa0f0b7
Merge pull request #1238 from bookwyrm-social/test-mocks
Refactors test mocks
2021-08-02 18:47:52 -06:00
Mouse Reeve 338dfd4909 More test fixes 2021-08-02 17:31:25 -07:00
Mouse Reeve 85be4ecfeb Trying to fix mocks in inbox create tests 2021-08-02 16:58:24 -07:00
Mouse Reeve fc8db58cdb Merge branch 'main' into suggestions-redis 2021-08-02 16:40:57 -07:00
Mouse Reeve dca7057745
Merge pull request #1240 from bookwyrm-social/login-redirect
Stay on page when logging in from top bar
2021-08-02 17:39:16 -06:00
Mouse Reeve 00c8f2a88a Python formatting 2021-08-02 16:35:53 -07:00
Mouse Reeve 4a7da32f96 Fixes mock in inbox create tests 2021-08-02 16:33:23 -07:00
Mouse Reeve 3ec41701e7
Merge pull request #1239 from bookwyrm-social/directory-elided-pages
Uses elided page range for directory view
2021-08-02 17:28:03 -06:00
Mouse Reeve 806638888e Stay on page when logging in from top bar
Was this bugging other people? It bugged me to no end.
2021-08-02 16:24:36 -07:00
Mouse Reeve c56c6aa8e4 Uses elided page range for directory view 2021-08-02 16:15:14 -07:00
Mouse Reeve 9e5536c7d5 Don't double-run black and pylint 2021-08-02 16:08:41 -07:00
Mouse Reeve 0a7afdb1c0 Python formatting 2021-08-02 16:07:39 -07:00
Mouse Reeve 6d8bced0f1 Refactors test mocks 2021-08-02 16:05:40 -07:00
Mouse Reeve 2370f60436
Update bookwyrm/templates/snippets/book_cover.html
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-08-02 14:46:56 -06:00
Joachim 7754b490fa Bring consistency to management commands 2021-08-02 22:40:19 +02:00
Mouse Reeve 7980d74b01
Merge pull request #1235 from bookwyrm-social/test-speed
Tweaks for test CI
2021-08-02 13:59:04 -06:00
Mouse Reeve 9b97fbc0ae
Fixes error in merge 2021-08-02 12:56:11 -07:00
Mouse Reeve af34dc6520
Merge branch 'main' into images-django-imagekit 2021-08-02 13:43:59 -06:00
Mouse Reeve 1791b5b9fa Try running tests in parellel 2021-08-02 12:34:18 -07:00
Mouse Reeve acab222f8f
Merge pull request #1231 from bookwyrm-social/search-remote
Automatically search remote endpoints if a local search is empty
2021-08-02 13:30:12 -06:00
Mouse Reeve b40b8c2d0e
Merge pull request #1163 from joachimesque/storage-s3
Use S3 as static and media storage
2021-08-02 08:29:09 -06:00
Mouse Reeve 8d476804c2 Potential speedups 2021-08-01 07:38:16 -07:00
Joachim d70469d2e0 Better .env vars defaults 2021-08-01 11:47:39 +02:00
Joachim 1a53f5c18a Update renamed layout.html 2021-08-01 11:38:44 +02:00
Joachim 78aa31afd5 Merge remote-tracking branch 'upstream/main' into storage-s3 2021-08-01 11:38:32 +02:00
Mouse Reeve 1333b0b3c3 Simplifies env for django tests 2021-07-31 21:42:37 -07:00
Mouse Reeve d76106ded5
Merge pull request #1234 from EvilDrPurple/main
Recognize profile summary linebreaks + whitespace
2021-07-31 22:37:35 -06:00
Kylie d062f6eb12
Merge pull request #4 from EvilDrPurple/recognize-whitespace
Recognize whitespace
2021-07-31 20:31:46 -04:00
Kylie a6b8d44627 Summary display updates 2021-07-31 20:30:21 -04:00
Kylie 3f01cf8788
Update user_card.html 2021-07-31 19:58:12 -04:00
Kylie 1c7ed30d65
Update sanitize_html.py 2021-07-31 19:54:59 -04:00
Kylie cdbb911b46
Merge pull request #3 from EvilDrPurple/recognize-whitespace
Recognize whitespace
2021-07-31 13:19:49 -04:00
Kylie d75f33cfb2 Apply preserve-whitespace to profile summaries 2021-07-31 13:16:47 -04:00
Kylie f2186d6861 Add preserve-whitespace CSS tag 2021-07-31 13:15:49 -04:00
Kylie 27445950b3
Merge pull request #2 from EvilDrPurple/revert-1-recognize-whitespace
Revert "Recognize profile summary linebreaks + whitespace"
2021-07-31 13:14:00 -04:00
Kylie f996cc7d10
Revert "Recognize profile summary linebreaks + whitespace" 2021-07-31 13:13:43 -04:00
Kylie b3e437fd18
Merge pull request #1 from EvilDrPurple/recognize-whitespace
Recognize profile summary linebreaks + whitespace
2021-07-30 23:54:55 -04:00
Kylie 7af7a7b575 Recognize profile summary linebreaks + whitespace 2021-07-30 23:50:21 -04:00
Mouse Reeve 1e48ca95a6
Merge pull request #1233 from GuDzpoz/main
Updated zh_Hans translation
2021-07-30 07:38:20 -06:00
GuDzpoz 1feb5d9f86 Updated zh_Hans translation; compiled zh_Hant translation. 2021-07-30 18:14:21 +08:00
Mouse Reeve 0ed0f45b32 Fixes logged out state for user search 2021-07-28 16:43:49 -07:00
Mouse Reeve 08a2c352a5
Merge pull request #1230 from bookwyrm-social/feed-layout
Fixes html and css class heirarchy on feed layout
2021-07-28 14:54:42 -06:00
Mouse Reeve d5c36dbc28 Updates search remote value 2021-07-28 13:52:16 -07:00
Mouse Reeve bf99a07153 Automatically search remote endpoints if a local search is empty 2021-07-28 13:29:24 -07:00
Mouse Reeve 7f44693e0c Renames feed layout file to be more consistent with other templates 2021-07-28 13:21:42 -07:00
Mouse Reeve c9602e28ce Use consistant header size 2021-07-28 13:19:56 -07:00
Mouse Reeve 436afb0ebd Fixes heirarchy and classes in feed layout 2021-07-28 13:17:56 -07:00
Mouse Reeve b84ffeda08
Merge pull request #1221 from cincodenada/shelved-date
Add shelved date, populate from Goodreads import
2021-07-19 17:11:22 -06:00
Mouse Reeve d1cefb6900
Merge pull request #1220 from bookwyrm-social/edit-book-link
Fixes link to edit book
2021-07-14 17:51:53 -06:00
Joel Bradshaw f867b1c81d Update tests for shelved_date
Also make dates while we're at it
2021-07-13 22:08:15 -07:00
Joel Bradshaw eadf5cf410 Use shelved date for display
I'm not sure if there's a better way to access this field, accessing via
book.shelfbook__shelved_date in the template didn't seem to work
2021-07-13 21:26:38 -07:00
Joel Bradshaw a16d759766 Add shelved_date field and populate it on import 2021-07-13 21:04:11 -07:00
Mouse Reeve 3f15e4410e Fixes link to edit book 2021-07-12 16:17:20 -07:00
Mouse Reeve 6ffd8a7822
Merge pull request #1217 from bookwyrm-social/activitypub-pagination
Fixes pagination for ordered collections
2021-07-07 12:30:45 -06:00
Mouse Reeve 88c23117ff Fixes outbox pagination 2021-07-07 10:56:19 -07:00
Mouse Reeve 1d90ccdcaa
Merge pull request #1215 from bookwyrm-social/user-status-counts
Hide deleted status counts from book page
2021-07-07 11:55:18 -06:00
Mouse Reeve b41d9440fd Adds tests for ordered collection page generator 2021-07-07 10:53:25 -07:00
Mouse Reeve b1022cf245
Merge pull request #1216 from bookwyrm-social/link-formatting
Fixes detection of links with certain characters
2021-07-07 11:20:15 -06:00
Mouse Reeve 23631c3c4f Fixes failing links 2021-07-07 09:49:22 -07:00
Mouse Reeve b3cd9483d3 Adds test for misinterpreted links 2021-07-07 09:47:07 -07:00
Mouse Reeve fede777e9b Hide deleted status counts from book page 2021-07-07 09:37:21 -07:00
Mouse Reeve 52713ec8d5
Merge pull request #1211 from cincodenada/fix-resetdb
Fix bw-dev resetdb, some tweaks to bw-dev
2021-07-06 16:02:46 -06:00
Joel Bradshaw b4c6587972 Fix bw-dev resetdb, some tweaks to bw-dev
The main fix here is for resetdb, it previously was failing to drop the
db for me, because `web` was up and running and using the database. This
commit spins up db by itself first so it can drop and re-create the
database successfully, then brings up web to run the migrations.

While I was in here, I also updated it so that when running `bw-dev`
without any command it will also print the helptext, rather than just
exiting silently, got rid of the double-echo of the helptext, and added
runweb/rundb commands to run arbitrary commands via bw-dev.
2021-07-05 13:20:14 -07:00
Joachim 3ea1bcb256
Merge branch 'main' into storage-s3 2021-07-05 13:06:19 +02:00
Mouse Reeve 2e9ac1bf27
Merge pull request #1208 from cincodenada/fix-import-page
Add backend parameter to Celery initializer
2021-07-03 06:42:47 -07:00
Joel Bradshaw ecff6dd051 Make it black 2021-07-03 00:22:55 -07:00
Joel Bradshaw 28a76662fe Add backend parameter to Celery initializer
This fixed an error when viewing imports for my setup
2021-07-02 23:53:42 -07:00
Mouse Reeve 95db2ce867
Merge pull request #1206 from gra-ch/translation
Add Tranditional Chinese translation
2021-07-01 17:46:31 -07:00
gra-ch b720740762 Add Tranditional Chinese translation 2021-06-30 13:54:56 +08:00
Mouse Reeve 088c862e90
Merge pull request #1204 from bookwyrm-social/dev-import-bug
Avoids template errors in dev when imports can't connect to redis
2021-06-28 14:26:23 -07:00
Mouse Reeve 9461784a18 Python formtting 2021-06-28 13:54:38 -07:00
Mouse Reeve e13ddb10d0 Avoids template errors in dev when imports can't connect to redis 2021-06-28 13:50:04 -07:00
Mouse Reeve 1ae1712314
Merge pull request #1202 from bookwyrm-social/mouse-reeve-patch-1
Adds prompt to include instance in bug reports
2021-06-27 12:51:33 -07:00
Mouse Reeve a27adf596b
Adds prompt to include instance in bug reports 2021-06-27 12:14:55 -07:00
Mouse Reeve 290192204e Fixes user json views
Fixes #1198
2021-06-27 11:47:49 -07:00
Mouse Reeve 556ffa4194
Merge pull request #1199 from bookwyrm-social/search-index
More efficient search index
2021-06-27 08:03:14 -07:00
Mouse Reeve 55aa67cc00 Fixes pytest syntax 2021-06-27 07:31:01 -07:00
Mouse Reeve fe5f8b3f0e Test is passing locally and failing in CI
Trying out different yaml params
2021-06-27 07:04:37 -07:00
Mouse Reeve 3238be4748 Restores weights to original calculation 2021-06-26 19:07:09 -07:00
Mouse Reeve 62b6bfe1ee Annotation and filtering order 2021-06-26 18:55:09 -07:00
Mouse Reeve 8844e46259 Removes stray print statement 2021-06-26 18:40:53 -07:00
Mouse Reeve a3badc5700 Adds preview mock to postgres tests 2021-06-26 18:36:17 -07:00
Mouse Reeve 36fe64c3ae Fixes patch import in test 2021-06-26 16:48:57 -07:00
Mouse Reeve 6470033ac9 Fixes search query syntax
mad about the lack of django docs on this, jeez
2021-06-26 16:20:18 -07:00
Mouse Reeve 789f823d5d Fixes python formatting 2021-06-26 13:20:23 -07:00
Mouse Reeve 62b5a00102 Adds test mocks from psql tests 2021-06-26 13:13:12 -07:00
Mouse Reeve e168720420 Adds test for stop word null state 2021-06-26 12:42:36 -07:00
Mouse Reeve 68fc5f2b5a Trigger search vector update when author is edited 2021-06-26 12:34:05 -07:00
Mouse Reeve 2fa5fabb7b Fixes default edition ranking test 2021-06-26 09:57:56 -07:00
Mouse Reeve 61785cee66 Set defualt min confidence to 0 2021-06-26 09:12:23 -07:00
Mouse Reeve 3998aa5f2a Fixes edit author form 2021-06-26 09:05:00 -07:00
Mouse Reeve b4b2105527 Fixes edit book form 2021-06-26 08:54:52 -07:00
Mouse Reeve 0634777042
Merge pull request #1200 from GuDzpoz/main
Updated zh_Hans translations
2021-06-26 07:26:53 -07:00
GuDzpoz a006e9b4bc Updated zh_Hans translations 2021-06-26 13:44:47 +08:00
Mouse Reeve deb1b9943a Uses simple dictionary as backup for english dictionary
Creates search vectors with stop words if the english version is empty,
and uses a SearchQuery OR with simple and english on the view side.
2021-06-24 10:56:27 -07:00
Mouse Reeve 04c51a6598 Uses simple dictionary for names 2021-06-24 10:01:07 -07:00
Mouse Reeve adb0253abf Remove default minimum search confidence 2021-06-23 17:41:29 -07:00
Mouse Reeve 6a6de44ebe Attempt at getting tests running by pumbing psql version 2021-06-23 17:10:35 -07:00
Mouse Reeve 7c15fbbb0b More efficient search index
Co-authored-by: asmr-hex <0.0@asmr.software>
2021-06-23 16:54:59 -07:00
root ad3dc16005 Removrd Bio from Your books 2021-06-22 13:18:23 +00:00
Mouse Reeve ae1d0343ba
Merge pull request #1191 from bookwyrm-social/getdata-fix
Catch all exceptions from requests when loading remote data
2021-06-20 12:09:14 -07:00
Mouse Reeve 2f279bbbd4
Merge pull request #1193 from bookwyrm-social/cover-images
Safer cover image naming
2021-06-20 12:08:35 -07:00
Mouse Reeve 4a5e4e8ca2 Safer cover image naming 2021-06-20 09:38:01 -07:00
Mouse Reeve fcc38f8627
Merge pull request #1190 from joachimesque/instance-description-add-image-width
Specify width (250px) for Instance Description image
2021-06-20 09:28:41 -07:00
Mouse Reeve 7a44a9b516 Use catch-all requests exception 2021-06-20 09:23:57 -07:00
Mouse Reeve 95a19a44f8 Don't error out when invalid urls are entered 2021-06-20 09:13:57 -07:00
Joachim 7818a4347f Specify width (250px) on Instance Description image 2021-06-20 15:57:08 +02:00
Joachim 0c83882a11 Fix lint 2021-06-19 19:44:14 +02:00
Joachim e251b687dc Merge remote-tracking branch 'upstream/main' into images-django-imagekit 2021-06-19 19:32:56 +02:00
Joachim 2fbbf522ce Update preview_images.py 2021-06-19 17:46:18 +02:00
Mouse Reeve f82161d648 Fixes migration query 2021-06-19 08:41:37 -07:00
Mouse Reeve cb811c92a6 Adds reverse migration stub 2021-06-19 08:36:12 -07:00
Joachim a1189b40b6 Fix bw-dev multiline output 2021-06-19 17:18:13 +02:00
Mouse Reeve e99e4831f1 Updates migration 2021-06-19 08:17:27 -07:00
Joachim 42b1aecb94 Merge remote-tracking branch 'upstream/main' into storage-s3 2021-06-19 17:12:07 +02:00
Joachim bcb6e1c40a Fix storage media removal 2021-06-19 17:10:25 +02:00
Joachim dee63d8825 Rename MEDIA_PATH to MEDIA_FULL_URL and handle protocol 2021-06-19 17:09:53 +02:00
Mouse Reeve 15555e61d0 Merge branch 'main' into book-format-choices 2021-06-19 07:43:34 -07:00
Mouse Reeve e03b8ef2cd
Merge pull request #1187 from joachimesque/fix-bw-helper
Fix command name in bw-dev error message
2021-06-19 06:45:35 -07:00
Joachim 582c2d4f25 Fix Python formating 2021-06-19 12:04:30 +02:00
Joachim c9c7a673d7 Fix template dependency 2021-06-19 12:02:48 +02:00
Joachim 8af13e5f7d Fix for pylint 2021-06-19 12:01:41 +02:00
Joachim 6607c8b185 Better handling of absolute URLs with domain + scheme 2021-06-19 11:54:19 +02:00
Joachim d862be0564 Merge remote-tracking branch 'upstream/main' into storage-s3 2021-06-19 11:53:05 +02:00
Joachim e309bb104f Fix command name in bw-dev error message 2021-06-19 11:18:03 +02:00
Mouse Reeve beb42b17f1 Removes unused import 2021-06-18 16:56:33 -07:00
Mouse Reeve 98ae586889 Newline in following template 2021-06-18 16:52:12 -07:00
Mouse Reeve 5b6048e4c6 Merge branch 'main' into suggestions-redis 2021-06-18 16:48:04 -07:00
Mouse Reeve 4d9ced6973
Merge pull request #1184 from bookwyrm-social/pylint
Adds pylint workflow
2021-06-18 16:44:33 -07:00
Mouse Reeve 8e7c43baa7 Fixes preview tests 2021-06-18 15:58:21 -07:00
Mouse Reeve 491d68353d Fixes typo in black command 2021-06-18 15:29:34 -07:00
Mouse Reeve 60626eaca1 Catches straggler preview_image signal 2021-06-18 15:28:43 -07:00
Mouse Reeve 59938e2d46 Linter fixes for models 2021-06-18 15:24:10 -07:00
Mouse Reeve d8d6f57373 Linting fixes for preview image code 2021-06-18 15:08:36 -07:00
Mouse Reeve a20c4d583c Merge branch 'main' into pylint 2021-06-18 14:48:31 -07:00
Mouse Reeve ea556bd83b
Merge pull request #1142 from joachimesque/opengraph-image-generation
Generate OpenGraph images for books, users, and site.
2021-06-18 14:47:54 -07:00
Mouse Reeve c7d14cb957 Fixes regex import in urls file 2021-06-18 14:40:28 -07:00
Mouse Reeve 0a44578987 Disables similarity comparison 2021-06-18 14:35:26 -07:00
Mouse Reeve 9e5c7053e9 More pylint fixes 2021-06-18 14:29:24 -07:00
Mouse Reeve 381d160105 Fixes init file 2021-06-18 14:17:05 -07:00
Mouse Reeve 4479864008 Updates code for linter 2021-06-18 14:12:56 -07:00
Mouse Reeve 20f74ba02b More disables 2021-06-18 13:23:06 -07:00
Mouse Reeve 633f5e6dc7 Fixes R/C disable flag 2021-06-18 12:25:11 -07:00
Mouse Reeve 9d81d5a78c
Merge pull request #1186 from bookwyrm-social/fixes-list-link
Fixes list link to user profile
2021-06-18 12:23:49 -07:00
Mouse Reeve 38a19f7063 Disable error that's almost always a false positive 2021-06-18 12:23:16 -07:00
Mouse Reeve 7775d943d4 Fixes list link to user profile 2021-06-18 12:11:07 -07:00
Mouse Reeve 4995b26d8c Adds dependencies to pylint 2021-06-18 12:08:15 -07:00
Mouse Reeve 2bd56c38d2 Tweaks to script 2021-06-18 11:57:11 -07:00
Mouse Reeve 5db506523d Adds pylint workflow 2021-06-18 11:36:45 -07:00
Joachim 7e26a38403 Fix summary image format 2021-06-18 19:15:36 +02:00
Joachim 5d41781e6a Fix scheme 2021-06-18 19:15:24 +02:00
Joachim 6b873e6bcd Fix newline 2021-06-18 18:29:59 +02:00
Joachim e07672fff1 Fix tests 2021-06-18 18:28:24 +02:00
Mouse Reeve 816feb1cc9
Merge pull request #1183 from bookwyrm-social/null-rating
Use null instead of zero for unrated review
2021-06-17 19:17:06 -07:00
Mouse Reeve 22636041ba Use null instead of zero for unrated review 2021-06-17 17:47:46 -07:00
Mouse Reeve 973b23856c
Merge branch 'main' into opengraph-image-generation 2021-06-17 15:17:54 -07:00
Mouse Reeve 321554f17e
Merge pull request #1181 from bookwyrm-social/search-cleanup
Minor simplifications to search queries
2021-06-17 14:57:17 -07:00
Mouse Reeve 4141323783
Merge pull request #1148 from arkhi/frontend/subtitle
Update subtitle behaviour
2021-06-17 14:55:55 -07:00
Mouse Reeve 1f071d3c18
Merge pull request #1180 from bookwyrm-social/search-timeout
Adds timeouts to get requests
2021-06-17 14:51:05 -07:00
Mouse Reeve 59643c02a3 Python formatting 2021-06-17 14:48:19 -07:00
Mouse Reeve 5d3639e47f Minor simplications to search queries 2021-06-17 14:46:58 -07:00
Mouse Reeve c16baea40d
Merge pull request #1175 from bookwyrm-social/dedplicate-boosts
Don't show duplicated statuses after boosts
2021-06-17 13:43:43 -07:00
Mouse Reeve 2a6339cf21 Fixes redis interaction mock 2021-06-17 13:10:01 -07:00
Mouse Reeve 8b657bbcb1 Updates model test 2021-06-17 12:58:37 -07:00
Mouse Reeve cf3869ad32 Adds timeouts to get requests 2021-06-17 12:34:54 -07:00
Fabien Basmaison cc03460e00 Avoid space within parenthesises for series when no number is provided. 2021-06-17 17:18:55 +02:00
Fabien Basmaison 7f01dcf3b9 Merge branch 'main' into frontend/subtitle 2021-06-17 17:12:23 +02:00
Mouse Reeve 75df210193 Python formatting 2021-06-14 17:01:53 -07:00
Mouse Reeve 8946332023 More fixes for more tests 2021-06-14 16:56:47 -07:00
Mouse Reeve 27a3d0ae96
Merge branch 'main' into 253-user-post-privacy-v2 2021-06-14 16:47:57 -07:00
Mouse Reeve 0d16d3c5a4
Merge pull request #1177 from bookwyrm-social/user-page-scroll
Small ui fixes
2021-06-14 16:41:32 -07:00
Mouse Reeve c3a09a6331 More test fixes 2021-06-14 16:39:54 -07:00
Mouse Reeve ef71da7ef0 Fixes interaction tests 2021-06-14 16:23:17 -07:00
Mouse Reeve c4f7f34ad4 Fixes edit readthrough toggle display 2021-06-14 16:04:58 -07:00
Mouse Reeve 3600f6ca3c Handle overflow text in notifications 2021-06-14 16:00:17 -07:00
Mouse Reeve a82bf99bd6 Icon-only link display on mobile for text links 2021-06-14 15:55:26 -07:00
Mouse Reeve 5c65a2c73c
Merge pull request #1176 from bookwyrm-social/cover-naming
Fixes renaming images on save
2021-06-14 15:49:19 -07:00
Mouse Reeve fe2309f0bc Fixes orientation of edition want to read menu 2021-06-14 15:45:39 -07:00
Mouse Reeve f307edf732 Use elided page range for invites 2021-06-14 15:39:54 -07:00
Mouse Reeve 5a236e333f Fixes directory profile link 2021-06-14 15:33:03 -07:00
Mouse Reeve cd014e43ad Python formatting 2021-06-14 15:29:07 -07:00
Mouse Reeve 2a606eec3e scroll horizontally on user page shelf preview 2021-06-14 15:27:37 -07:00
Mouse Reeve 290a99bf17 Fixes renaming images on save 2021-06-14 15:19:54 -07:00
Mouse Reeve 52adfbf5da Don't show duplicated statuses after boosts 2021-06-14 14:47:59 -07:00
Mouse Reeve 6d42f2bb1e
Merge pull request #1172 from bookwyrm-social/import-lookup
Don't try title/author search when isbn search fails
2021-06-14 12:49:54 -07:00
Mouse Reeve f4a6e18759
Merge pull request #1173 from bookwyrm-social/series-space
Fixes trailing space in series text
2021-06-14 12:49:41 -07:00
Mouse Reeve 6e6354bcce Fixes trailing space in series text
Fixes #1145
2021-06-14 12:34:11 -07:00
Mouse Reeve d4e2a06092
Merge pull request #1171 from bookwyrm-social/import-text
Clarifies wording on pending imports
2021-06-14 12:31:38 -07:00
Mouse Reeve 46be7292fd Don't try title/author search when isbn search fails 2021-06-14 12:30:43 -07:00
Mouse Reeve f4776f3827
Merge pull request #1170 from bookwyrm-social/delete-user
Let users delete their accounts
2021-06-14 12:00:32 -07:00
Mouse Reeve 9a67c61487 Clarifies wording on pending imports
Fixes #1118
2021-06-14 11:59:44 -07:00
Mouse Reeve e98138e84f Show users as deleted in admin view 2021-06-14 11:38:54 -07:00
Mouse Reeve 607bfa9160 Python formatting 2021-06-14 11:16:41 -07:00
Mouse Reeve 557aa2005b Adds test for delete view 2021-06-14 11:15:00 -07:00
Mouse Reeve 8cd6712db3 Let users delete their accounts 2021-06-14 10:44:25 -07:00
Mouse Reeve 7ae64c2a68 Splits user view out and adds template 2021-06-14 10:01:21 -07:00
Fabien Basmaison 17635b47db Fix case where there is no subtitle.
Consequentially change back author to being a subtitle.
2021-06-11 09:41:55 +02:00
Fabien Basmaison cf751a8efa Merge branch 'main' into frontend/subtitle 2021-06-11 08:49:46 +02:00
Mouse Reeve e4b815d276
Merge pull request #1169 from bookwyrm-social/dependabot/pip/django-3.2.4
Bump django from 3.2.2 to 3.2.4
2021-06-10 12:59:32 -07:00
dependabot[bot] c415860373
Bump django from 3.2.2 to 3.2.4
Bumps [django](https://github.com/django/django) from 3.2.2 to 3.2.4.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.2...3.2.4)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-10 17:42:49 +00:00
Mouse Reeve fd753d47ce
Merge pull request #1168 from bookwyrm-social/reading-progress-view
Merge reading status views into one view
2021-06-09 11:48:06 -07:00
Mouse Reeve a4afbccb3a Fixes straggling reading view test name 2021-06-09 11:36:17 -07:00
Mouse Reeve ce4a57e5c9 Reading status view name 2021-06-09 11:16:52 -07:00
Mouse Reeve 4107f7ddf1 Updates readthrough tests 2021-06-09 11:07:15 -07:00
Mouse Reeve 3c7c8a1797 Fixes urls in fallback mode 2021-06-09 11:05:05 -07:00
Mouse Reeve 113ced2900 Merge reading status views into one view 2021-06-09 10:53:52 -07:00
Mouse Reeve 166515a755
Merge pull request #1167 from bookwyrm-social/dependabot/pip/django-3.2.2
Bump django from 3.2.1 to 3.2.2
2021-06-09 10:37:46 -07:00
Mouse Reeve c24d95bc5b
Merge pull request #1166 from bookwyrm-social/dependabot/npm_and_yarn/trim-newlines-3.0.1
Bump trim-newlines from 3.0.0 to 3.0.1
2021-06-09 10:37:29 -07:00
dependabot[bot] a8eb21f992
Bump django from 3.2.1 to 3.2.2
Bumps [django](https://github.com/django/django) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.1...3.2.2)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 17:22:46 +00:00
dependabot[bot] eb087e131e
Bump trim-newlines from 3.0.0 to 3.0.1
Bumps [trim-newlines](https://github.com/sindresorhus/trim-newlines) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sindresorhus/trim-newlines/releases)
- [Commits](https://github.com/sindresorhus/trim-newlines/commits)

---
updated-dependencies:
- dependency-name: trim-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 17:22:45 +00:00
Mouse Reeve 8d181a9848
Merge pull request #1165 from bookwyrm-social/nojs-modals
Refactors want to read/start reading/finish reading modals
2021-06-09 10:22:15 -07:00
Fabien Basmaison 6be97a6102 Be consistent between variable name & logic. Equal is already too short. 2021-06-09 19:03:15 +02:00
Fabien Basmaison c4072cbc04 Be nice to Black and follow styleguides. 2021-06-09 18:54:05 +02:00
Fabien Basmaison 0ecea5710b Use gettext to add subtitle to short titles (use variable for length). 2021-06-09 18:51:20 +02:00
Fabien Basmaison b8922bae19 Merge branch 'main' into frontend/subtitle 2021-06-09 17:59:23 +02:00
Mouse Reeve 090281573c
Merge pull request #1162 from joachimesque/locales-french-update
Locales: French update
2021-06-09 06:23:07 -07:00
Fabien Basmaison f58c1d1138 Tweak styles for subtitle:
- Make it bold as the title while preserving consistency with other subtitles.
- Pull the author closer to the subtitle to preserve a descending visual and typographic scales.
2021-06-09 12:20:34 +02:00
Fabien Basmaison 5047b8bf94 Do not break document structure with ratings. 2021-06-09 11:12:38 +02:00
Fabien Basmaison b9562e44e3 Merge branch 'main' into frontend/subtitle 2021-06-09 10:14:34 +02:00
Mouse Reeve 625ab46059 Removes start reading with progress test
There's no way to do this from the ui???? I don't tihnk there ever
was???
2021-06-08 15:03:50 -07:00
Mouse Reeve a00fdc6864 Updates tests for reading views 2021-06-08 14:42:55 -07:00
Mouse Reeve e65bc09e7a Linter fixes 2021-06-08 12:42:45 -07:00
Mouse Reeve eb12506985 No script fallback mode 2021-06-08 12:40:01 -07:00
Mouse Reeve 3356c652ee Adds standalone modal views for reading steps 2021-06-08 11:55:18 -07:00
Mouse Reeve b5d0a9e0b4 Removes deplicate progress code form reading views 2021-06-08 11:43:30 -07:00
Mouse Reeve 1231d40e80 Want to read view 2021-06-08 11:23:53 -07:00
Mouse Reeve 45146b4999 Convert start and finish reading into view classes 2021-06-08 11:10:39 -07:00
Joachim 689fefb096 Merge remote-tracking branch 'upstream/main' into storage-s3 2021-06-08 18:20:57 +02:00
Joachim 280be59c46 Refactor AWS command 2021-06-08 18:19:52 +02:00
Joachim 311042a59b Add S3 CORS command 2021-06-07 23:20:27 +02:00
Mouse Reeve 0e84f4bbac
Merge pull request #1164 from bookwyrm-social/env-cleanup
Cleans up .env and settings files
2021-06-07 13:52:24 -07:00
Mouse Reeve 948a5dea10 Cleans up .env and settings files
Some outdated stuff doesn't need to be in there
2021-06-07 12:53:57 -07:00
Joachim e904c202a9 Add command copy_media_to_s3 2021-06-07 21:40:37 +02:00
Joachim 4359505124 Update book.py 2021-06-07 19:54:16 +02:00
Joachim d105ae9c78 Merge remote-tracking branch 'upstream/main' into images-django-imagekit 2021-06-07 19:53:11 +02:00
Joachim 2731ea9aa9 Add env var to enable/disable thumbnail generation 2021-06-07 19:52:25 +02:00
Joachim f287a19f12 Update settings.py 2021-06-07 18:31:01 +02:00
Joachim 715cb46e1e Lint 2021-06-07 18:15:48 +02:00
Joachim b448d40514 Use the right snippets on Templates 2021-06-07 18:13:24 +02:00
Joachim cba34780d8 Use S3 as static and media storage
TODO

- [ ] Write some documentation for non-AWS, S3-compatible services
- [ ] Make a management command to move existing media to the new S3 bucket
- [ ] See if Nginx can reverse-proxy the S3 bucket in order to keep the files accessible through the domain name
2021-06-07 18:12:48 +02:00
Joachim ac90cf7420 Apply suggestions from feedback 2021-06-07 16:16:07 +02:00
Joachim 37f92140ad Update django.po 2021-06-07 16:10:00 +02:00
Joachim a14b481996 Merge remote-tracking branch 'upstream/main' into locales-french-update 2021-06-07 16:08:30 +02:00
Mouse Reeve 5b40069d99
Merge pull request #1153 from bookwyrm-social/instance-language
Use "instance" consistently
2021-06-06 14:07:49 -07:00
Mouse Reeve 7c2dc81501 Corrects variable name in locales 2021-06-06 13:58:41 -07:00
Joachim 7ed2ed116a lint 2021-06-06 21:13:16 +02:00
Joachim 1f2c296cfd This should now work 2021-06-06 21:12:21 +02:00
Joachim 34ef6d57ce Update django.po 2021-06-06 18:48:15 +02:00
Joachim b7924f2345 Update django.po 2021-06-06 18:42:07 +02:00
Joachim 4accf3953b Update 2021-06-05 22:38:59 +02:00
Joachim 3db8a09169 Locales: French update 2021-06-05 22:29:06 +02:00
Mouse Reeve 4ea672f2a1
Merge pull request #1157 from bcj/bcj/urlencode-redis-password
URL-Encode password in broker_url
2021-06-05 12:51:25 -07:00
Mouse Reeve c8d2df1203
Merge pull request #1155 from joachimesque/front-modal-title-fit
Front: Modal title fit
2021-06-05 12:43:35 -07:00
Mouse Reeve d1e33e14e2
Merge pull request #1154 from joachimesque/front-better-forms
Front-end: Better forms
2021-06-05 12:38:20 -07:00
Mouse Reeve bbbae9fc9d
Merge branch 'main' into images-django-imagekit 2021-06-05 11:46:57 -07:00
Mouse Reeve 61e55628fa
Merge pull request #1131 from joachimesque/author-page-microformats
Author page microformats
2021-06-05 11:27:16 -07:00
Mouse Reeve 574b3acc4b
Merge pull request #1158 from bookwyrm-social/dependabot/pip/django-3.2.1
Bump django from 3.2.0 to 3.2.1
2021-06-04 15:31:02 -07:00
dependabot[bot] 5572d2bc33
Bump django from 3.2.0 to 3.2.1
Bumps [django](https://github.com/django/django) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2...3.2.1)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-04 21:47:19 +00:00
bcj 17f9682aab Testfixes: Remove extra space + hopefully fix env 2021-06-03 09:07:56 -05:00
Mouse Reeve ba3ce62697
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 15:18:10 -07:00
Mouse Reeve 582f163cfd
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 15:18:05 -07:00
Mouse Reeve f9d1acff54
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 15:17:54 -07:00
Mouse Reeve 76457ce1f4
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 15:17:42 -07:00
Mouse Reeve 54e6162935
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 15:17:34 -07:00
Mouse Reeve 97b2a59b70
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 15:17:24 -07:00
Mouse Reeve 88312dcdce
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 15:17:17 -07:00
Mouse Reeve 08b7c48f2b
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 15:17:04 -07:00
Joachim 6f105fcdcc Front: Modal title fit 2021-06-02 18:56:24 +02:00
Joachim 49c057625a Smol fixes 2021-06-02 18:30:36 +02:00
Joachim 7d1e4aebbc Better forms 2021-06-02 18:17:53 +02:00
Mouse Reeve 34b93679f0
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 07:21:32 -07:00
Mouse Reeve 3301de5e54
Update locale/fr_FR/LC_MESSAGES/django.po
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-06-02 07:21:18 -07:00
Mouse Reeve 5d2f01d7ff Updates locales 2021-06-01 14:51:57 -07:00
Mouse Reeve 2816d7cc88 Use "instance" consistently 2021-06-01 14:50:14 -07:00
Mouse Reeve ff45238667
Merge pull request #1123 from eatsleepdeploy/add-max-upload-size-config
Add max upload size config
2021-06-01 14:09:50 -07:00
Joachim 5966520f0d Ok this is stupid. 2021-05-29 16:01:33 +02:00
Joachim cd7c0ccaea Enable env on GitHub Actions 2021-05-29 15:51:56 +02:00
Joachim ba39dad06c Add save_and_cleanup test 2021-05-29 15:32:04 +02:00
Joachim 00b09cd07d Try with logging 2021-05-29 14:43:06 +02:00
Joachim fbb262fe88 Try logging output 2021-05-29 13:44:43 +02:00
Joachim cc0881b11c Try another way 2021-05-29 12:33:04 +02:00
Joachim 022182e114 See if the image is saved in DB in the Github Actions test environment 2021-05-29 11:33:37 +02:00
Joachim b4e2d8c6e3 Better refresh object in test 2021-05-29 11:17:59 +02:00
Joachim 0f80456a08 Save as JPG 2021-05-28 23:42:04 +02:00
Joachim 872084d61a Update test_preview_images.py 2021-05-28 23:41:41 +02:00
Joachim 9cee119200 test 2021-05-28 23:29:28 +02:00
Joachim 0e28b79089 third time's the charm 2021-05-28 22:10:57 +02:00
Joachim 71bc35224b no, this will work 2021-05-28 22:00:26 +02:00
Joachim 8755b92c2e Fix GitHub FileNotFoundError 2021-05-28 21:40:20 +02:00
Joachim 2bf254bce7 Update test_preview_images.py 2021-05-28 21:26:13 +02:00
Joachim ec159ebcb0 Test generating preview images 2021-05-28 21:24:45 +02:00
Joachim 08cebd7051 Lint 2021-05-28 17:26:43 +02:00
Joachim 61367c3f4f Protect generate_preview_images command
- add `--all` argument
- send computation intensive tasks to Celery
2021-05-28 17:25:20 +02:00
Joachim f206f61e9a Use global switch to enable/disable preview images 2021-05-28 17:00:07 +02:00
Mouse Reeve b29ca22227 A couple test mocks 2021-05-27 17:29:24 -07:00
Joachim 878cc5cb17 Lint 2021-05-27 23:21:47 +02:00
Joachim f8df501239 Fix tests (for realz) 2021-05-27 23:19:17 +02:00
Joachim d9d34d8220 Fix linting 2021-05-27 21:40:23 +02:00
Joachim b7965ce2ae Fix tests 2021-05-27 21:37:27 +02:00
Joachim b8bff8a882 Use field tracker to launch task on field change 2021-05-27 21:09:57 +02:00
Mouse Reeve 9a57abcd3d
Merge pull request #1125 from joachimesque/locale/french-translation-update
French translation update
2021-05-27 06:33:50 -07:00
Joachim 2ea1cd8319 Tests 2021-05-26 23:57:29 +02:00
Joachim f848dcd756 Fix issue with protocol 2021-05-26 18:20:22 +02:00
Joachim e214d8b879 Rationalize paths handling 2021-05-26 17:55:39 +02:00
Joachim e362c82495 Expose static & media paths 2021-05-26 17:54:59 +02:00
Joachim 7ea3153026 Fix site_path tag 2021-05-26 16:57:28 +02:00
Joachim 97d1830952 Apply review suggestions 2021-05-26 16:06:51 +02:00
Joachim 3ea935e7ce Update OFL.txt 2021-05-26 15:49:08 +02:00
Joachim f7b117e4fb Update preview_images.py 2021-05-26 15:46:40 +02:00
Joachim a8ae3c9950 Modify inner image position 2021-05-26 15:37:09 +02:00
Joachim 22c13f639c Update layout.html 2021-05-26 15:18:35 +02:00
Joachim 5943e6d79a Black 2021-05-26 15:18:05 +02:00
Joachim d4fc1b0fdf Fix line endings 2021-05-26 15:17:28 +02:00
Joachim 4db8aa85f0 Fix migration 2021-05-26 14:55:55 +02:00
Joachim eb56cced8d Lint 2021-05-26 14:46:34 +02:00
Joachim e5e549d125 Add opengraph image depending on context 2021-05-26 14:44:15 +02:00
Joachim 65de40a95a Add generate_preview_images command 2021-05-26 13:52:10 +02:00
Fabien Basmaison c894f5ef35 Update subtitle behaviour:
- on Book
	- Remove problematic punctuation (locale and multiple punctuation if the title ends with `?`, `!` or similar).
	- Update view.
	- Use proper semantic to split combined title into `name`, `alternativeHeadline` and series-related microdata.
	- The author is not a subtitle, just data.
- Use parenthesis in the `get_title` filter instead of punctuation.
2021-05-26 13:21:06 +02:00
Joachim b47edc5f0d Add dark mode 2021-05-26 13:07:33 +02:00
Joachim bf503d370c Add user preview task 2021-05-26 12:54:57 +02:00
Joachim 34caa36ab7 Add site preview task 2021-05-26 10:19:39 +02:00
Joachim 101ca0ff81 Refactor some 2021-05-26 09:44:32 +02:00
Joachim fd82567cbf Update 0076_book_preview_image.py 2021-05-26 09:16:15 +02:00
Joachim a83aa47c9a Generate on new rating 2021-05-26 09:10:05 +02:00
Joachim 8c25272462 Fix last night's bugs 2021-05-26 09:09:13 +02:00
Joachim 5b03934ec3 Update preview_images.py 2021-05-25 23:16:33 +02:00
Joachim e305c5d73d Fix color 2021-05-25 23:12:54 +02:00
Joachim dca0888d5d Thank you Black 2021-05-25 23:05:38 +02:00
Joachim fa7334826c Update 2021-05-25 23:04:28 +02:00
Mouse Reeve e4c7eaf0b7
Merge pull request #1143 from reesporte/sp-translation
translated new phrases into spanish
2021-05-24 21:14:03 -07:00
reese da63606c0e translated new translations 2021-05-24 21:00:58 -05:00
Joachim d1737b44bd First functioning commit
TODO

- [ ] Delay task (Celery?)
- [ ] Store the image in a subfolder unique to the edition, to make cleaning up the image easy
- [ ] Clean up the image before replacing it
- [ ] Ensure that the image will be cleaned when the edition is deleted ??
- [ ] Use instance custom colors?
- [ ] Use book cover color base?
2021-05-25 00:41:53 +02:00
Joachim b72580daf6 Update author.html 2021-05-24 17:17:12 +02:00
Joachim 8b4cb4aeed Thanks, ./bw-dev black 2021-05-24 16:40:25 +02:00
Joachim ef4961e4e9 Apply linter suggestions 2021-05-24 16:33:40 +02:00
Mouse Reeve ea0f7ff925
Merge pull request #1137 from bookwyrm-social/title-header
Uses correct filter for book title
2021-05-24 07:21:12 -07:00
Joachim 36f447210a Specify sizes on all templates 2021-05-24 16:18:05 +02:00
Joachim dc49432322 Change img_path to external_path 2021-05-24 16:17:39 +02:00
Joachim c1456ce853 Update .cover-caption name and styles 2021-05-24 16:16:33 +02:00
Joachim 4c55f07f2a Update book_cover.html 2021-05-24 16:16:09 +02:00
Joachim f60e9d76d2 Generate generators 2021-05-24 16:15:08 +02:00
Joachim 77e81c4dbb Add django-imagekit to BookWyrm 2021-05-24 16:14:51 +02:00
Joachim ff95a709a8 Update .gitignore 2021-05-24 16:14:21 +02:00
Mouse Reeve f058aa8f1d Uses correct filter for book title 2021-05-24 06:54:43 -07:00
Joachim 08ab6c09eb Merge remote-tracking branch 'upstream/main' into author-page-microformats 2021-05-24 13:20:14 +02:00
Joachim 25858ed3aa Added LibraryThing and Goodreads links 2021-05-24 12:51:41 +02:00
Joachim 594f7b3708 Style fixes 2021-05-24 12:51:18 +02:00
Joachim 58c07d1677 Apply review suggestions 2021-05-24 12:36:48 +02:00
bcj 31deb36c85 URL-Encode password in broker_url
Needed to prevent connection errors if the password contains non-urlsafe characters.

Dockerfile change because all the services using it are mirroring ./ in /app now anyway.
Flower needs because it needs bookwyrm in order to read the celerywyrm config (because flower only allows overwriting broker_url from the command line and we want to do it in Python so we have access to a urlencode function).
2021-05-23 23:49:12 -05:00
Jason Kelly b362b72c57 Python linting 2021-05-24 09:35:21 +08:00
Mouse Reeve e2d271d041
Merge pull request #1130 from joachimesque/fix-author-display
Fix date of death display
2021-05-23 17:11:52 -07:00
Joachim 55a3a28d49 Add microformats to author page 2021-05-23 21:17:14 +02:00
Joachim 6e9c9e839c Fix date of death display 2021-05-23 20:25:42 +02:00
Mouse Reeve c9b337348e
Merge pull request #1126 from bookwyrm-social/deleted-ratings
Don't show deleted ratings in stars
2021-05-23 09:00:53 -07:00
Mouse Reeve ca8067769c Don't show deleted ratings in stars 2021-05-23 08:48:00 -07:00
Mouse Reeve 4e9c7a7748
Merge pull request #1070 from bookwyrm-social/top-bar
Top bar
2021-05-23 08:42:14 -07:00
Mouse Reeve 94d6e07478
Merge pull request #1016 from joachimesque/list-style-fixes
List style fixes
2021-05-23 08:31:20 -07:00
Joachim 354b511089 Fix flex styles 2021-05-23 17:18:16 +02:00
Joachim 1aa319d6ee Move description text below header 2021-05-23 17:17:46 +02:00
Joachim cf7cbfdf8f Fix title styles 2021-05-23 17:17:30 +02:00
Joachim 9eb719106f Fix display bug 2021-05-23 17:17:02 +02:00
Joachim c7b59f8653 Update shelf translations 2021-05-23 16:01:01 +02:00
Joachim 6024fae766 Update translation 2021-05-23 15:23:35 +02:00
Joachim 251c8bbd08 Merge remote-tracking branch 'upstream/main' into list-style-fixes 2021-05-23 15:14:50 +02:00
Joachim a31bbfd95e Update translations 2021-05-23 15:13:17 +02:00
Joachim 179560a009 French translation update
This PR replaces #935
2021-05-23 14:56:47 +02:00
Joachim 0708d64bf1 Update bookwyrm.css 2021-05-23 12:10:57 +02:00
Jason Kelly 7eb5f3b026 Making magic number more readable 2021-05-23 14:31:22 +08:00
Jason Kelly 318e0bf508 Fixing nginx-config misunderstanding. 2021-05-23 14:27:02 +08:00
Jason Kelly 6e655cb0e0 Added new widget to alert if a file is set at larger than 10 MB.
- Updated default widget to use template that adds a notification box.
- Added JS to add onchange & load events to look at the value in the input and trigger the notification & disable the form submits.
2021-05-23 14:12:00 +08:00
Jason Kelly c9617c4bd3 Added EMAIL_BACKEND to env settings to be able to use console backend in local dev. 2021-05-23 14:09:13 +08:00
Jason Kelly e138a585d1 Setting client_max_body_size to 10m.
- Removed commented-out nginx config for clarity.
2021-05-23 14:08:22 +08:00
Mouse Reeve de5893e7fe
Merge pull request #1122 from bookwyrm-social/feed-page-queries
Improves query efficiency for feed page
2021-05-22 22:11:33 -07:00
Mouse Reeve f987a352c6 Fixes username helper 2021-05-22 21:33:56 -07:00
Mouse Reeve bdf267dea5 Refactors block button for query efficiency 2021-05-22 20:36:30 -07:00
Mouse Reeve 9285f483c2 Query tweaks for book page 2021-05-22 20:14:57 -07:00
Mouse Reeve 2d4cec4422 Improves shelf page query efficiency a little 2021-05-22 19:54:50 -07:00
Mouse Reeve 7a4c4248df Improves status template performance
Reduces queries about about 65
2021-05-22 19:01:40 -07:00
Mouse Reeve e5ff4ac36d Python formatting 2021-05-22 18:02:14 -07:00
Mouse Reeve 3d3ab6433e Improves query efficiency for shelve buttons
About 50 fewer queries (yikes)
2021-05-22 17:58:08 -07:00
Mouse Reeve 368d2cd716 Reduces feed page queries for goals
9 fewer queries
2021-05-22 17:34:16 -07:00
Mouse Reeve 98e537280e Adds management command for populating suggestions 2021-05-22 16:10:11 -07:00
Mouse Reeve 5174260351 Python formatting 2021-05-22 15:57:08 -07:00
Mouse Reeve edfc27a3cd Moves suggestion logic to celery 2021-05-22 15:53:07 -07:00
Mouse Reeve 644e5926db Remove suggested users on block 2021-05-22 14:05:59 -07:00
Mouse Reeve 9250b8b85d Handle follow/unfollow 2021-05-22 13:02:37 -07:00
Mouse Reeve 42699a8d25 Update your own suggestions on shelve 2021-05-22 12:20:23 -07:00
Mouse Reeve f849d785a5 Functional un-discoverable setting 2021-05-22 12:10:14 -07:00
Mouse Reeve 29130d5f44 Detect new users and users with updated discoverability 2021-05-22 11:58:33 -07:00
Mouse Reeve 0044dc6587 Show suggested users when the feed is empty 2021-05-22 11:29:41 -07:00
Mouse Reeve f98576bc25 Only create suggestions stores for local users 2021-05-22 11:01:35 -07:00
Mouse Reeve 2ff79c9953 Fixes python formatting 2021-05-22 09:55:38 -07:00
Mouse Reeve 2e7d84d53c
Merge pull request #1121 from bookwyrm-social/announcement-show-button-mobile
Announcement show button mobile
2021-05-21 10:05:59 -07:00
Mouse Reeve d33b55e025 Hide delete button text on mobile 2021-05-21 09:52:40 -07:00
Mouse Reeve 00eba98e9f Fixes display of announcement show/hide button on mobile 2021-05-21 09:50:23 -07:00
Mouse Reeve ea56d42906
Merge pull request #1116 from bookwyrm-social/import-async-error
Don't error when task for import no longer exists
2021-05-20 21:14:15 -07:00
Mouse Reeve e870943f2e
Merge pull request #1115 from bookwyrm-social/announce-form-fixes
Fixes default values in edit announcement form
2021-05-20 20:48:19 -07:00
Mouse Reeve 8772f26b91 Don't error when task for import no longer exists 2021-05-20 20:35:12 -07:00
Mouse Reeve 07fc4a2efc
Merge branch 'main' into suggestions-redis 2021-05-20 20:25:15 -07:00
Mouse Reeve a70c713c29 Fixes default values in edit announcement form 2021-05-20 20:21:04 -07:00
Mouse Reeve 8b6934d1d0
Merge pull request #1114 from bookwyrm-social/filter-fix
Fixes editions page
2021-05-20 18:48:30 -07:00
Mouse Reeve d39374f13c Fixes editions page 2021-05-20 18:41:36 -07:00
Mouse Reeve 6b3447761f Adds book format field with choices 2021-05-20 18:16:35 -07:00
Mouse Reeve 9933b888f9
Merge pull request #1112 from bookwyrm-social/search-null-state
Fixes search null state view
2021-05-20 16:49:46 -07:00
Mouse Reeve e74bb4e33c
Merge pull request #1111 from bookwyrm-social/rss-templates
Moves rss templates to base level directory
2021-05-20 16:40:41 -07:00
Mouse Reeve 6cadba78fe Python formatting 2021-05-20 16:38:12 -07:00
Mouse Reeve a8a8398cf8 Fixes search null state view 2021-05-20 16:34:32 -07:00
Mouse Reeve ab3fb4d555 Adds test for search with no query 2021-05-20 16:32:44 -07:00
Mouse Reeve b6c17defd7
Merge pull request #1108 from bookwyrm-social/ol-redirects
Handle openlibrary redirects
2021-05-20 16:18:51 -07:00
Mouse Reeve 2a451e83c6
Merge pull request #1109 from bookwyrm-social/invalid-image-url
Handle all kinds of invalid image urls
2021-05-20 16:18:44 -07:00
Mouse Reeve a1f13d65ed
Merge pull request #1110 from bookwyrm-social/invalid-post-status-link
404 instead of error for invalid post link
2021-05-20 16:18:39 -07:00
Mouse Reeve c52b26f404 Moves rss templates to base level directory 2021-05-20 16:12:24 -07:00
Mouse Reeve bd057129f3
Merge branch 'main' into ol-redirects 2021-05-20 16:08:59 -07:00
Mouse Reeve 5401d73909 404 instead of error for invalid post link 2021-05-20 16:06:23 -07:00
Mouse Reeve f1d4f092f2 Handle all kinds of invalid image urls 2021-05-20 16:03:14 -07:00
Mouse Reeve 8609c8eb79
Merge pull request #1107 from bookwyrm-social/no-edition-case
Correctly handles openlibrary works with no editions
2021-05-20 15:56:36 -07:00
Mouse Reeve 1e9211018d Handle openlibrary redirects 2021-05-20 15:55:50 -07:00
Mouse Reeve df50cc7351
Merge pull request #1106 from bookwyrm-social/yarn-version
Bumps up merge and postcss versions
2021-05-20 15:38:04 -07:00
Mouse Reeve f6440aa173 Correctly handles openlibrary works with no editions 2021-05-20 15:37:26 -07:00
Mouse Reeve 4af6667d6a
Merge pull request #1105 from bookwyrm-social/suggested-users-error
Fixes logic error in get started user view
2021-05-20 15:26:39 -07:00
Mouse Reeve 633a4c4135
Merge pull request #1104 from bookwyrm-social/banner-auth
Only show banner to authenticated users
2021-05-20 15:26:29 -07:00
Mouse Reeve 5bc69bc808 Bumps up merge and postcss versions 2021-05-20 15:24:37 -07:00
Mouse Reeve 847a46dde1
Merge pull request #1103 from bookwyrm-social/security-warnings
Security warnings in yarn.lock dependencies
2021-05-20 15:18:07 -07:00
Mouse Reeve 0ba7ee41fe
Merge pull request #1102 from bookwyrm-social/pagination-get
Uses safe method for pagination on follows pages
2021-05-20 15:17:54 -07:00
Mouse Reeve 82f74a4049 Fixes logic error in get started user view 2021-05-20 15:17:05 -07:00
Mouse Reeve 9c13bf34a8 Only show banner to authenticated users 2021-05-20 15:11:47 -07:00
Mouse Reeve 69a1f6a618
Merge pull request #1101 from bookwyrm-social/import-errors
Catch unexpectedly missing columns in csv imports
2021-05-20 14:58:06 -07:00
Mouse Reeve 67c40fe4f8 Updates merge 2021-05-20 14:57:13 -07:00
Mouse Reeve 1df600d1cb Package update for security 2021-05-20 14:53:49 -07:00
Mouse Reeve 3f1d670911 Uses safe method for pagination on follows pages 2021-05-20 14:47:23 -07:00
Mouse Reeve 1a2f6c586d Adds locales for error text 2021-05-20 14:41:00 -07:00
Mouse Reeve 62dc8270b6 Catch unexpectedly missing columns in csv imports
I kept the 500 error here so that things don't silently fail in
unexepcted ways
2021-05-20 14:39:33 -07:00
Mouse Reeve b7ea3e5e6c
Merge pull request #1100 from bookwyrm-social/announcements
Announcements
2021-05-20 14:13:37 -07:00
Mouse Reeve ff3c4b8e73 Fixes announcement view test 2021-05-20 13:42:30 -07:00
Mouse Reeve cefc5994a6 Makes extra content optional 2021-05-20 12:40:03 -07:00
Mouse Reeve 952eceb243 Updates locales 2021-05-20 12:15:10 -07:00
Mouse Reeve fdb315d2ac Adds individual announcement page test 2021-05-20 12:14:57 -07:00
Mouse Reeve 44e8db3f33 Adds view test for announcements admin page 2021-05-20 12:12:11 -07:00
Mouse Reeve 2e193aa3c6 Delete announcements 2021-05-20 12:08:12 -07:00
Mouse Reeve a415991e96 Fixes clashing filter names in templates 2021-05-20 11:56:26 -07:00
Mouse Reeve b8e9b9f57e Cleans up show/hide behavior 2021-05-20 11:46:24 -07:00
Mouse Reeve 49916a7498 Sorting for announcement headers and pagination 2021-05-20 09:43:29 -07:00
Mouse Reeve 3d70a36d86 Editable announcement 2021-05-20 09:28:39 -07:00
Mouse Reeve d64e0c4aa8 Adds admin view for individual announcement 2021-05-20 08:09:35 -07:00
Mouse Reeve c73c063949 Show announcements on all pages 2021-05-19 15:35:14 -07:00
Mouse Reeve 346d718265 Don't need both name and preview 2021-05-19 15:18:43 -07:00
Mouse Reeve 515d5bb237 Create announcements admin view 2021-05-19 14:57:28 -07:00
Mouse Reeve d1f2d9812f Adds model for instance admin announcements 2021-05-19 14:00:46 -07:00
Mouse Reeve 3b295a724e
Merge pull request #1096 from bookwyrm-social/book-fields
Add more book fields to book edit form
2021-05-18 22:36:10 -07:00
Mouse Reeve fbed7b8eab
Merge pull request #1097 from bcj/bcj/non-standard-ports-main
Allow BookWyrm to run on Non-Standard Ports
2021-05-18 22:35:51 -07:00
bcj 1b8e1f8a90 Add POSTGRES_PORT to .env.dev 2021-05-18 23:11:02 -05:00
bcj 76ba116d2f Remove the redis_activity ports listing
It is misleading, it isn't binding to that port
2021-05-18 23:11:02 -05:00
bcj 24152c0129 Read flower port from .env 2021-05-18 18:38:09 -05:00
bcj 213a9508d8 Don't hardcode postres port in bookwyrm.settings
Have bookwyrm.settings check for an alternative postgres port.
2021-05-18 18:35:32 -05:00
Mouse Reeve 8fc0da8dc2 Adds inventaire ID field to edit book form 2021-05-18 16:10:43 -07:00
Mouse Reeve 6fff45d36c Adds language field to edit book form 2021-05-18 15:56:11 -07:00
Mouse Reeve 0c0dcc57d6 Adjusts line length 2021-05-18 12:51:57 -07:00
Mouse Reeve 097659a627
Merge pull request #1075 from bookwyrm-social/disable-connectors
Disable related connector when an instance is blocked
2021-05-18 12:41:09 -07:00
Mouse Reeve 82117a7d28 Tests deactivating connectors 2021-05-18 12:29:01 -07:00
Mouse Reeve 0bddad259b
Merge pull request #1095 from bookwyrm-social/display-fixes
Display fixes
2021-05-18 11:46:28 -07:00
Mouse Reeve 9f789cd5d4
Merge branch 'main' into top-bar 2021-05-18 11:39:36 -07:00
Mouse Reeve 3d7f3f34c1 Fixes book view test 2021-05-18 11:36:50 -07:00
Mouse Reeve 7dab48bc69
Merge pull request #1094 from bookwyrm-social/button-text
Show text with buttons in most places
2021-05-18 11:33:06 -07:00
Mouse Reeve 04c165113f Cleans up login page 2021-05-18 11:22:45 -07:00
Mouse Reeve 58a059c85f Fixes display of user ratings 2021-05-18 11:17:59 -07:00
Mouse Reeve 07d59c8c09 Don't show ratings below user statuses 2021-05-18 11:09:19 -07:00
Mouse Reeve ab69abb8f0 Gap between book search results 2021-05-18 10:57:54 -07:00
Mouse Reeve 8b14f8585e Small fixes for list display 2021-05-18 10:55:05 -07:00
Mouse Reeve 5cd5a6107f Show text with buttons in most places 2021-05-18 10:45:51 -07:00
Mouse Reeve a466128b33
Merge pull request #1093 from bookwyrm-social/readthrough-focus
Adds keyboard focus to add readthrough form
2021-05-18 10:20:04 -07:00
Mouse Reeve 7dccce6b1f Adds keyboard focus to add readthrough form 2021-05-18 09:59:40 -07:00
Mouse Reeve 3c7882b055 Fixes abstract minimal connector test 2021-05-14 16:13:32 -07:00
Mouse Reeve 4adea2114f
Merge pull request #1085 from bookwyrm-social/footer-wording
Updates footer language around github link
2021-05-14 16:11:35 -07:00
Mouse Reeve 2b4ac71d7a Updates footer language around github link 2021-05-14 15:21:26 -07:00
Mouse Reeve e011fe6f88
Merge pull request #1080 from bookwyrm-social/concise-dates
Filter for concise status timestamps
2021-05-12 09:41:38 -07:00
Mouse Reeve 3b9fed1b31 Filter for concise status timestamps 2021-05-11 18:59:31 -07:00
Mouse Reeve 1ea07448c3
Merge pull request #1078 from bookwyrm-social/templatetags
Refactors templatetags
2021-05-11 16:39:53 -07:00
Mouse Reeve 865faf6714 Fixes tests 2021-05-11 15:52:41 -07:00
Mouse Reeve 65f78b45da Merge branch 'main' into templatetags 2021-05-11 15:41:07 -07:00
Mouse Reeve 1a239a0b61
Merge pull request #1079 from bookwyrm-social/revert-1074-broken-cover-width
Revert "Preserve width when cover images fail to load"
2021-05-11 15:39:29 -07:00
Mouse Reeve 87bf863ac6
Revert "Preserve width when cover images fail to load" 2021-05-11 15:29:18 -07:00
Mouse Reeve dbf795be5d Python formatting 2021-05-11 15:16:27 -07:00
Mouse Reeve ac2b63d0cd More templatetag files 2021-05-11 15:14:42 -07:00
Mouse Reeve 58da17d694 Use smaller templatetag modules 2021-05-11 14:41:28 -07:00
Mouse Reeve eba6159f68 Moves status interaction filters into their own module 2021-05-11 14:14:22 -07:00
Mouse Reeve acd26012be Removes more unused filters 2021-05-11 14:12:28 -07:00
Mouse Reeve f5eb5f982a Removes filter for checking for follow requests 2021-05-11 14:05:46 -07:00
Mouse Reeve 3de8ae00ae Removes unused templatetag 2021-05-11 14:00:23 -07:00
Mouse Reeve 04cc2fb3f3 Removes unused dict_key filter 2021-05-11 13:55:46 -07:00
Mouse Reeve 63172ecf00 Fixes ratings on shelf pages 2021-05-11 13:54:38 -07:00
Mouse Reeve 1fbd6537b7 Remove unnecessary tags from import page 2021-05-11 13:28:52 -07:00
Mouse Reeve d7a8dd5e19 Removes outdated field form abstract connector 2021-05-11 13:20:17 -07:00
Mouse Reeve 9b42bba236 Filter out inactive connectors 2021-05-11 11:34:58 -07:00
Mouse Reeve 19f788b9aa Deactivate connectors related to blocked federated servers 2021-05-11 11:31:02 -07:00
Mouse Reeve e7c5b77b4c Removes unused connector fields and adds active boolean 2021-05-11 09:54:04 -07:00
Mouse Reeve 9ea588b855
Merge pull request #1074 from bookwyrm-social/broken-cover-width
Preserve width when cover images fail to load
2021-05-11 08:46:35 -07:00
Mouse Reeve 680f300e7c Preserve width when cover images fail to load 2021-05-11 08:15:02 -07:00
Mouse Reeve db5796764b
Merge pull request #1071 from bookwyrm-social/author-page
Updates author page
2021-05-10 19:26:10 -07:00
Mouse Reeve 3fe0f8661a
Merge pull request #1072 from bookwyrm-social/list-tests
List tests
2021-05-10 18:51:27 -07:00
Mouse Reeve 92e2c70baf Fixes list sorting by rating 2021-05-10 18:28:31 -07:00
Mouse Reeve 6dae4ebd6f Splits list tests into two files and adds user list page tests 2021-05-10 17:44:19 -07:00
Mouse Reeve 4c99fd7f12 Adds metadata to author view 2021-05-10 17:24:10 -07:00
Mouse Reeve 443109bac3 Adds aliases and inventaire id to edit author form
Plus consolidates some wording
2021-05-10 17:06:22 -07:00
Mouse Reeve 9bfe4f4e91 Uses a different snippet for previewing books on author page 2021-05-10 16:43:40 -07:00
Mouse Reeve 867a33de57 Creates author template dir 2021-05-10 16:34:37 -07:00
Mouse Reeve 27fe09a32b
Merge pull request #1062 from alisww/storygraph-import
add storygraph import
2021-05-10 16:23:00 -07:00
Mouse Reeve 202c43f610 Adds import option to books page 2021-05-10 16:13:17 -07:00
Allie Signet d40ff5c751 support both author field names 2021-05-10 20:11:44 -03:00
Mouse Reeve 9e9f94753d
Merge pull request #1069 from bookwyrm-social/inventaire-confidence
Adds confidence ratings to inventaire results
2021-05-10 16:10:30 -07:00
Allie Signet 8c2552f739 storygraph renamed the author field 2021-05-10 20:09:16 -03:00
Mouse Reeve 6abe9274c0 Switches out links in the top bar and dropdown 2021-05-10 15:55:42 -07:00
Mouse Reeve dad0161844
Merge pull request #1068 from bookwyrm-social/revert-datepicker
Revert datepicker
2021-05-10 15:36:17 -07:00
Mouse Reeve 07c84a6e1a Adds confidence ratings to inventaire results
Fixes bad matches in csv imports
2021-05-10 15:35:46 -07:00
Mouse Reeve 5efc7280a1
Merge pull request #1067 from bookwyrm-social/goal-year
Don't show following years' books in a year's goal
2021-05-10 15:02:18 -07:00
Mouse Reeve 3f4807a345 Revert "Adds datepicker script dependencies to templates"
This reverts commit 33ca7b4b76.
2021-05-10 14:56:43 -07:00
Mouse Reeve 485f4b7eba Revert "Replaces date elements with datepicker"
This reverts commit 869cfa6d34.
2021-05-10 14:56:33 -07:00
allie 314a27841b Merge branch 'bookwyrm-social:main' into storygraph-import 2021-05-10 18:52:54 -03:00
Mouse Reeve 07f3737420
Merge pull request #1066 from bookwyrm-social/settings-files
Imports bookwyrm settings into celery settings
2021-05-10 14:43:36 -07:00
Mouse Reeve e34ae18e98 Don't show following years' books in a year's goal 2021-05-10 14:40:41 -07:00
Mouse Reeve b4ae639dab Imports bookwyrm settings into celery settings
It was redundant and super bug-prone!
2021-05-10 14:20:27 -07:00
Mouse Reeve 08346b7f87
Merge pull request #1065 from bookwyrm-social/fixes-search-display
Makes book search results from remote sources easier to use
2021-05-10 14:18:11 -07:00
Allie Signet 85a8210f5e fix rating property on ImportItem 2021-05-10 18:11:28 -03:00
allie 711772046f Merge branch 'bookwyrm-social:main' into storygraph-import 2021-05-10 17:31:12 -03:00
Mouse Reeve df2c1f0723
Merge branch 'main' into fixes-search-display 2021-05-10 13:29:39 -07:00
Mouse Reeve c869129323 Updates locales 2021-05-10 13:26:10 -07:00
Mouse Reeve 1b23cca1dd
Merge pull request #1061 from bookwyrm-social/first-search-result-bug
Uses one set of search logic for all results and first result only functions
2021-05-10 13:25:30 -07:00
Mouse Reeve b0055f398d Makes the show/hide buttons easier to find in book search 2021-05-10 13:24:00 -07:00
Mouse Reeve 1844dd6b20 Only include result blobs with results in search results 2021-05-10 13:01:11 -07:00
Mouse Reeve 13dc5efe71 More comprehensive tests for connector search 2021-05-10 12:53:36 -07:00
allie df99060898 Merge branch 'bookwyrm-social:main' into storygraph-import 2021-05-10 15:58:04 -03:00
Allie Signet 623bb181e4 fix formatting 2021-05-10 15:56:35 -03:00
Mouse Reeve 5cd974b78d Python formatting 2021-05-10 10:03:05 -07:00
Allie Signet 36439506b6 add storygraph import 2021-05-10 14:00:51 -03:00
Mouse Reeve f2d985e583 Uses one set of search logic for all results or just first 2021-05-10 09:57:53 -07:00
Mouse Reeve c005e458fa
Merge pull request #1055 from bookwyrm-social/filter-notifications
Filter notifications
2021-05-10 09:37:00 -07:00
Mouse Reeve 852f8da62e Adds tabs to notifications 2021-05-07 14:00:55 -07:00
Mouse Reeve 1cc63c6d45 Adds filtered view for notifications 2021-05-07 14:00:51 -07:00
Mouse Reeve 78f3e2efc2
Merge pull request #1053 from arkhi/patch-1
Display author biography with style. 😎
2021-05-06 09:59:39 -07:00
Fabien Basmaison a137bd21ff
Display author biography with style. 😎 2021-05-06 17:24:05 +02:00
Mouse Reeve 8d875f73ff
Merge pull request #1051 from bookwyrm-social/inventaire-edition
Sort edition list for better import results from inventaire
2021-05-05 08:40:30 -07:00
Mouse Reeve c15358d715 Python formatting 2021-05-05 07:58:09 -07:00
Mouse Reeve 558c9c4d67 Sort edition list for better import results from inventaire 2021-05-05 07:53:10 -07:00
Joachim 1f747e4f68
Merge branch 'main' into list-style-fixes 2021-05-05 16:06:48 +02:00
Mouse Reeve dcde3ded95
Merge pull request #1049 from bookwyrm-social/datepicker
Datepicker
2021-05-05 07:00:07 -07:00
Mouse Reeve f0cb82dd26
Merge pull request #1050 from bookwyrm-social/urls
Use reverse lookups for urls
2021-05-04 10:45:41 -07:00
Mouse Reeve 5906588c86 Fixes shelf add test 2021-05-04 10:33:16 -07:00
Mouse Reeve b10f0b19c4 Removes outdated test 2021-05-04 09:49:24 -07:00
Mouse Reeve c9ed069121 Use example url in test 2021-05-04 09:47:00 -07:00
Mouse Reeve 906201fa2a Fixes notification import link 2021-05-04 09:45:13 -07:00
Mouse Reeve 7bbef1d193 Removes outdated test 2021-05-04 09:42:00 -07:00
Mouse Reeve 748810cd41 Use reverse lookups for urls 2021-05-04 09:34:16 -07:00
Mouse Reeve 869cfa6d34 Replaces date elements with datepicker 2021-05-04 09:04:21 -07:00
Mouse Reeve 33ca7b4b76 Adds datepicker script dependencies to templates 2021-05-04 08:54:53 -07:00
Mouse Reeve 33ec315fbf
Merge pull request #1048 from bookwyrm-social/shelf-pagination
Adds elided page range to shelf pagination
2021-05-04 08:32:57 -07:00
Mouse Reeve 11b8da168a Merge branch 'main' into shelf-pagination 2021-05-03 15:02:22 -07:00
Mouse Reeve bc80c017aa Python formatting 2021-05-03 14:52:24 -07:00
Mouse Reeve 7dfc991468 Adds elided page range to shelf pagination 2021-05-03 14:47:27 -07:00
Mouse Reeve 9195aa832d
Merge pull request #1046 from bookwyrm-social/manual-book-link
Re-adds "manually add book" link
2021-05-03 13:49:50 -07:00
Mouse Reeve 77faceef80 Why is black unhappy 2021-05-03 11:44:02 -07:00
Mouse Reeve 5d7a3d6075 Updates locales 2021-05-03 11:22:40 -07:00
Mouse Reeve a81901f9fe Re-adds "manually add book" link 2021-05-03 11:20:43 -07:00
Mouse Reeve 7db8e249cc
Merge pull request #1037 from bookwyrm-social/search-bug
Fixes error on empty search results
2021-05-03 10:57:53 -07:00
Mouse Reeve 93959fc600
Merge pull request #1036 from SavinaRoja/pagination-list
pagination list navigation using a range of pages such as provided by get_elided_page_range
2021-05-03 10:57:38 -07:00
Mouse Reeve df1c324d2d Updates test 2021-05-03 10:46:02 -07:00
Joachim 4c021e6357 Add Mobile styles 2021-05-02 21:34:43 +02:00
Mouse Reeve 05db85c721
Merge pull request #1045 from bookwyrm-social/fixes-covers
Removes aria-hidden from covers
2021-05-02 07:10:11 -07:00
Mouse Reeve c47f672238 Removes aria-hidden from covers 2021-05-02 06:59:47 -07:00
Mouse Reeve db6246e359 Fixes error on empty search results 2021-05-01 22:20:23 -07:00
Mouse Reeve ddf5022970
Merge pull request #1033 from bookwyrm-social/search-changes
Search changes
2021-05-01 19:15:40 -07:00
Mouse Reeve 97aeaa9cd7 Uses empty queryset for forced no results mode 2021-05-01 19:05:46 -07:00
Mouse Reeve f94a3ec63b Mocks list create in test 2021-05-01 18:05:21 -07:00
Pablo Barton e71a0dd7e8 pagination list navigation using a range of pages such as provided by get_elided_page_range 2021-05-01 19:30:43 -04:00
Mouse Reeve f8ad1dfac4 Updates locales 2021-05-01 11:02:55 -07:00
Mouse Reeve 037362e49f Adds labels for form elements 2021-05-01 10:55:10 -07:00
Mouse Reeve bb50bd8121 Python formatting 2021-05-01 10:49:34 -07:00
Mouse Reeve c42be7a589 Adds pagination 2021-05-01 10:47:01 -07:00
Mouse Reeve 64b54510d9 Updates unit tests 2021-05-01 10:39:05 -07:00
Mouse Reeve 3ee63fdab4
Merge pull request #1034 from bookwyrm-social/dm-bug
Removes extra "content" field in status editor that broke dms
2021-05-01 07:32:18 -07:00
Mouse Reeve ad8666ebec Removes extra "content" field in status editor that broke dms 2021-05-01 07:20:54 -07:00
Mouse Reeve f9c1ecfabe Fixes bad whitespace 2021-04-30 20:16:34 -07:00
Mouse Reeve 5f7191a976 Safer logged out search 2021-04-30 20:09:43 -07:00
Mouse Reeve 9caad56ffc Don't allow remote search results for logged out users 2021-04-30 20:08:05 -07:00
Mouse Reeve 499c4e3267 Don't search remote sources by default 2021-04-30 19:56:29 -07:00
Mouse Reeve cb6c0035d7 List and user previews 2021-04-30 19:19:10 -07:00
Mouse Reeve 21a5147c3c Controls search type 2021-04-30 18:59:02 -07:00
Mouse Reeve cf80e4edde
Merge pull request #1032 from bookwyrm-social/link-fix
Fixes link on follow pages
2021-04-30 18:35:54 -07:00
Mouse Reeve 5ca9d2a7b0 Adds search templates 2021-04-30 18:35:09 -07:00
Mouse Reeve 4b73c37126 Separate out search types 2021-04-30 18:17:09 -07:00
Mouse Reeve 12b10fbd42
Merge pull request #1031 from bookwyrm-social/search-dedup
Remove deduplication of external search results
2021-04-30 16:45:23 -07:00
Mouse Reeve f55ded092c Fixes link on follow pages 2021-04-30 16:44:14 -07:00
Mouse Reeve f2a6cfb4f3 Remove deduplication of external search results 2021-04-30 16:04:27 -07:00
Mouse Reeve 7c81825527
Merge pull request #1030 from bookwyrm-social/author-data
Fixes getting authors from work data
2021-04-30 15:59:05 -07:00
Mouse Reeve a2621bce12 Fixes getting authors from work data 2021-04-30 15:48:52 -07:00
Mouse Reeve b8711c820f
Merge pull request #1027 from arkhi/frontend-book-cover
Fix lists layout for user
2021-04-30 13:59:05 -07:00
Mouse Reeve 735ef369b9
Merge pull request #1020 from bookwyrm-social/notification-color
Only make notification count red for mentions
2021-04-30 13:49:57 -07:00
Mouse Reeve de017ca7ce
Merge pull request #1021 from bookwyrm-social/following-display
Cleans up user/followers/following pages
2021-04-30 13:49:44 -07:00
Mouse Reeve dcc54e8421
Merge pull request #1022 from bookwyrm-social/footer-bonus
Let instance admins add a column of whatever they want in the footer
2021-04-30 13:49:22 -07:00
Fabien Basmaison 544e29fe76 Fix lists layout for user. 2021-04-30 22:44:53 +02:00
Mouse Reeve a502a0c51d
Merge branch 'main' into following-display 2021-04-30 13:40:01 -07:00
Mouse Reeve c373a0b818 Highlight report notifications 2021-04-30 13:38:03 -07:00
Mouse Reeve 4f02b1ab96
Merge pull request #1026 from bookwyrm-social/list-book-description
Show book descriptions in list items
2021-04-30 13:36:35 -07:00
Mouse Reeve 01f2d80cbd Show book descriptions in list items 2021-04-30 13:21:19 -07:00
Mouse Reeve e3aaf9b356
Merge pull request #1024 from bookwyrm-social/languge-code-fix
Fixes loading inventaire data by language code
2021-04-30 13:09:01 -07:00
Mouse Reeve 9fea070398
Update bookwyrm/management/commands/initdb.py
Co-authored-by: Joachim <joachim.robert@protonmail.com>
2021-04-30 12:53:57 -07:00
Mouse Reeve 122e0cbd6d Python formatting 2021-04-30 12:52:20 -07:00
Mouse Reeve 485d20696b Fixes loading inventaire data by language code 2021-04-30 12:50:35 -07:00
Mouse Reeve 24e70c3600
Merge pull request #1023 from bookwyrm-social/small-fixes
Small fixes
2021-04-30 12:43:15 -07:00
Mouse Reeve b4ef800505 Hide start list item in readthrough if absent 2021-04-30 12:07:59 -07:00
Mouse Reeve 900e7feb1b Moved reviews into center column on books page 2021-04-30 12:06:21 -07:00
Mouse Reeve 57454afa42 Creates visual separation between reading activity and reviews 2021-04-30 12:02:19 -07:00
Mouse Reeve 974de9e4c2 Removes set goal link from user page
It's already in the tabs
2021-04-30 11:47:28 -07:00
Mouse Reeve 0d7ffbc175 Hide user status tabs when there are none 2021-04-30 11:34:59 -07:00
Mouse Reeve 4b53342fd2 Fixes mock in unit test 2021-04-30 11:26:02 -07:00
Mouse Reeve b8fc4f99a3 Don't calculate mutuals for logged out users 2021-04-30 11:11:18 -07:00
Mouse Reeve 00815b3105 Python formatting 2021-04-30 11:09:06 -07:00
Mouse Reeve f747babb43 Changes column spacing 2021-04-30 11:03:36 -07:00
Mouse Reeve e15d6654e3 Free text field for the site footer 2021-04-30 10:42:27 -07:00
Mouse Reeve ca12359bee Fixes unit tests 2021-04-30 10:16:24 -07:00
Mouse Reeve 62884c6111 Show mutual counts instead of totals for other users 2021-04-30 09:50:11 -07:00
Mouse Reeve 4dacf4df3a Refactor get_user_from_username to raise 404 directly 2021-04-30 09:33:36 -07:00
Mouse Reeve d810d1bb8c Remove duplicate check for user blocks 2021-04-30 09:26:02 -07:00
Mouse Reeve b65d0d05c9 Tabs for relationship views 2021-04-30 09:23:59 -07:00
Mouse Reeve 418e656aea Uses layout for followers/following page 2021-04-30 09:17:46 -07:00
Mouse Reeve e4cecf2874 Coherent logic on which tabs show in the user page 2021-04-30 09:02:14 -07:00
Mouse Reeve 862ef83536 Move user templates into more subdirectories 2021-04-30 08:47:04 -07:00
Mouse Reeve d2355fef96 Consistent display on followers/following pages 2021-04-30 08:23:02 -07:00
Mouse Reeve 2867d703cc Fixes python formatting 2021-04-30 07:57:38 -07:00
Mouse Reeve 454dd25681 Only make notification count red for mentions 2021-04-30 07:49:34 -07:00
Mouse Reeve b4c155f134
Merge pull request #1019 from bookwyrm-social/change-password-url
Fixes invalid url breaking change password flow
2021-04-30 06:53:30 -07:00
Mouse Reeve e312d6d098
Merge pull request #994 from arkhi/frontend-book-cover
Refactor code for covers
2021-04-30 06:45:54 -07:00
Mouse Reeve aa3cdee731 Fixes invalid url breaking change password flow 2021-04-30 06:43:43 -07:00
Fabien Basmaison bcafc1bc6a Merge branch 'main' into frontend-book-cover 2021-04-30 09:54:42 +02:00
Mouse Reeve e126c13ff7
Merge pull request #1018 from bookwyrm-social/fix-rating
Test for failing rate federation
2021-04-29 15:29:19 -07:00
Mouse Reeve d61ba2e474 Fixes review rating serialization 2021-04-29 15:16:51 -07:00
Mouse Reeve daf65e230d Test for failing rate federation 2021-04-29 14:43:14 -07:00
Mouse Reeve 30a6c035b8
Merge pull request #1007 from bookwyrm-social/suggested_user_logic
Fixes follower/following logic in suggested user annotations
2021-04-29 14:08:47 -07:00
Mouse Reeve 3feba60665 Fixes test 2021-04-29 13:54:17 -07:00
Mouse Reeve 6983018d5e Merge branch 'main' into suggested_user_logic 2021-04-29 13:42:05 -07:00
Mouse Reeve c30125aaa0
Merge pull request #1017 from bookwyrm-social/search-page
Search page tweaks
2021-04-29 13:35:39 -07:00
Mouse Reeve 533cba3ce0 Updates locales 2021-04-29 13:25:44 -07:00
Mouse Reeve 6f38ab167e Show clarifying text for empty search when logged out 2021-04-29 13:21:35 -07:00
Mouse Reeve f4ebecfe75 Add background to search result boxes 2021-04-29 13:15:05 -07:00
Mouse Reeve 15790abc70 Don't show broken image previews when cover is absent 2021-04-29 13:03:56 -07:00
Mouse Reeve 6d7b3e9ae7 Show/hide individual search results 2021-04-29 12:56:42 -07:00
Joachim bbac0ad7ab Update bookwyrm.css 2021-04-29 21:51:42 +02:00
Joachim d4dffe48a7 Update bookwyrm.css 2021-04-29 21:48:35 +02:00
Joachim fa17386a6e Fix 2021-04-29 21:45:48 +02:00
Joachim 0a71fb094f Move counter in Ordered List 2021-04-29 21:41:43 +02:00
Joachim b59b3e294f Arrange Sort List form fields 2021-04-29 21:41:31 +02:00
Joachim daa7746f47 Stretch List card in list of lists 2021-04-29 21:40:54 +02:00
Mouse Reeve 9d89aaf9fc Don't let logged out viwers search for users 2021-04-29 12:18:55 -07:00
Mouse Reeve 9e2b4f61bb Make subheaders a lil smaller 2021-04-29 12:13:49 -07:00
Mouse Reeve 13c17fae1a
Merge pull request #892 from bookwyrm-social/inventaire
Adds inventaire connector
2021-04-29 11:58:38 -07:00
Mouse Reeve 0dcd7853f7 Updates locales 2021-04-29 11:38:51 -07:00
Mouse Reeve a31d05c694 Don't crash on books with no isbn 2021-04-29 11:31:01 -07:00
Mouse Reeve 095b60bff1 Show search result context for inventaire results 2021-04-29 11:22:09 -07:00
Mouse Reeve d1b788b61f Adds inventaire link to book page 2021-04-29 11:14:20 -07:00
Mouse Reeve d1b5f3b6f0 Fixes ranks and normalizes isbns 2021-04-29 11:06:05 -07:00
Mouse Reeve 7853610a20 Load descriptions correctly 2021-04-29 10:54:36 -07:00
Mouse Reeve b1c38d291c Set preferred language 2021-04-29 10:40:49 -07:00
Mouse Reeve ca86af22ce Get inventaire entity descriptions 2021-04-29 10:30:38 -07:00
Mouse Reeve cfd2c05ae2 Safely handle absent claims field 2021-04-29 10:12:56 -07:00
Mouse Reeve 8d38d1c9d1 Python formatting 2021-04-29 09:56:35 -07:00
Mouse Reeve f4800307b4 Adds isbn search 2021-04-29 09:54:42 -07:00
Mouse Reeve 0a41503572 Adds a couple more tests and test data 2021-04-29 09:06:17 -07:00
Mouse Reeve fc095a087c Adds search result test 2021-04-29 08:36:49 -07:00
Fabien Basmaison da1317760b Merge branch 'main' into frontend-book-cover 2021-04-29 09:20:12 +02:00
Mouse Reeve 5e5392c007 Adds test file 2021-04-28 17:20:14 -07:00
Mouse Reeve 95fce963d1 Images may already be absolute paths 2021-04-28 17:18:14 -07:00
Mouse Reeve 8eec3eca5b Don't spin out infinite load data tasks 2021-04-28 16:42:27 -07:00
Mouse Reeve 6551c59c45 Don't store default edition in the dataase 2021-04-28 16:05:17 -07:00
Mouse Reeve ccf10e8012 Fixes cover load logic 2021-04-28 13:50:47 -07:00
Mouse Reeve 3faacffaca Associated expanded editions with correct work 2021-04-28 13:28:07 -07:00
Fabien Basmaison 91c42b497e cover: Tweak width and height of cover on feeds. 2021-04-28 20:54:35 +02:00
Mouse Reeve e2b43bbd6d Fixes unit test 2021-04-28 09:33:38 -07:00
Mouse Reeve 130c2d014f
Merge pull request #1010 from arkhi/license
Make the license markdown friendly
2021-04-28 07:58:45 -07:00
Fabien Basmaison eb9935039e Rename License with a .md extension. 2021-04-28 16:05:12 +02:00
Fabien Basmaison cbb7b8b6e9 Make the license markdown friendly. 2021-04-28 16:04:40 +02:00
Fabien Basmaison b0f414570b cover: Fix code that was reverted during a merge conflict. 2021-04-28 15:42:22 +02:00
Fabien Basmaison 5c8710c1c4 cover: Add removed link on Editions. 2021-04-28 15:08:58 +02:00
Fabien Basmaison e37cbcd88d cover: Comment CSS rules a bit more and add rules for consistency. 2021-04-28 15:02:47 +02:00
Fabien Basmaison bba60c99e9 cover: Rearrange some CSS rules. 2021-04-28 14:48:25 +02:00
Fabien Basmaison baaaeef4c0 cover: Fix little details. 2021-04-28 10:47:14 +02:00
Fabien Basmaison 7c875b2ac2 cover: Update /post?status_type=TYPE&book=ID 2021-04-27 21:52:28 +02:00
Fabien Basmaison 30b273f193 cover: Update shelf (/user/arkhi/books/to-read, etc.) 2021-04-27 21:35:05 +02:00
Fabien Basmaison 8a1c8cb061 cover: Update goal:
- Remove `.content` from template when not dealing with markdown-generated markup.
- Fix some duplicated CSS selectors.
2021-04-27 21:07:54 +02:00
Fabien Basmaison 182c18fe54 cover: Update /user/USERNAME. 2021-04-27 20:53:30 +02:00
Fabien Basmaison d936417ddb cover: Update /book/ID/edit. 2021-04-27 20:44:06 +02:00
Fabien Basmaison a5359d1f80 cover: Update author. 2021-04-27 20:30:10 +02:00
Fabien Basmaison 8d53b7589f cover: Update /get-started/books:
- Remove `.content` from templates.
- Remove a stray unclosed label.
2021-04-27 17:23:37 +02:00
Fabien Basmaison d8b6676976 cover: Udpate logged out home and discover. 2021-04-27 16:27:39 +02:00
Fabien Basmaison 8ddc292ee6 cover: Change the logic again:
- Work on feeds.
- Add `.is-cover` to modify the behaviours of columns.
- Only apply logic for dimensions on the cover container; too many contextual side effects otherwise.
- Add classes to dimension and align, including auto margins for flex.
- Rename classes in templates accordingly.
2021-04-27 16:24:20 +02:00
Fabien Basmaison 56d821970a Merge branch 'main' into frontend-book-cover 2021-04-27 09:16:10 +02:00
Mouse Reeve 7b65291a59 Python formatting for the new Black standard 2021-04-26 14:43:29 -07:00
Mouse Reeve 85297426e0 Adds merge migration 2021-04-26 14:33:16 -07:00
Mouse Reeve 64c2313a5d Merge branch 'main' into inventaire 2021-04-26 14:22:05 -07:00
Mouse Reeve ce0e90d472
Merge pull request #961 from bookwyrm-social/django-3-2
Update to django 3.2
2021-04-26 14:08:39 -07:00
Mouse Reeve c5dc5e8b36
Merge pull request #1005 from bookwyrm-social/imported-ratings
Import ratings as ratings, not reviews
2021-04-26 14:07:06 -07:00
Mouse Reeve 674c4a99df Adds missing data file 2021-04-26 13:56:09 -07:00
Mouse Reeve 55eb1c4526 Fixes model name 2021-04-26 13:50:43 -07:00
Mouse Reeve 4deb94714c Adds test for import rating 2021-04-26 13:49:19 -07:00
Mouse Reeve d4dbfbe3c0
Merge pull request #1003 from bookwyrm-social/list-fixes
Improve list suggestion experience
2021-04-26 13:48:26 -07:00
Mouse Reeve 7006f30ac8 Uses unique test model name 2021-04-26 11:51:17 -07:00
Mouse Reeve 398ecd545e
Merge pull request #1008 from bookwyrm-social/show-rating
Show rating in statuses
2021-04-26 11:47:55 -07:00
Mouse Reeve 5bb341ba52 Use copy of requests GET params in list redirect 2021-04-26 11:43:13 -07:00
Mouse Reeve ff8601f329 Fixes spacing for new Black release 2021-04-26 11:37:07 -07:00
Mouse Reeve b16ac91b16 Python formatting 2021-04-26 11:34:04 -07:00
Mouse Reeve df31ac9742 Show rating in statuses 2021-04-26 11:33:17 -07:00
Mouse Reeve cd869dde09 Fixes tests of bookwyrm abstract model 2021-04-26 11:28:33 -07:00
Mouse Reeve 141d1a9a17 Adds auto field setting to avoid hella warnings 2021-04-26 11:22:08 -07:00
Mouse Reeve 0889c57b86 Merge branch 'main' into django-3-2 2021-04-26 11:21:36 -07:00
Mouse Reeve 32b3a02a17 Fixes reverse rank calculation 2021-04-26 11:14:26 -07:00
Mouse Reeve 247850e49d
Merge pull request #1006 from bookwyrm-social/queryset-performance
Queryset performance
2021-04-26 10:44:26 -07:00
Mouse Reeve 5b5da46ede Merge branch 'main' into suggestions-redis 2021-04-26 10:43:25 -07:00
Mouse Reeve 5d9cfe0276 Fixes followers/following logic on suggested users 2021-04-26 10:37:10 -07:00
Mouse Reeve 8b154b69fb Fixes follower/following logic in suggested user annotations 2021-04-26 10:35:37 -07:00
Mouse Reeve 786cf4fb97 Paginate followers/following pages 2021-04-26 10:26:49 -07:00
Mouse Reeve 99efe6b290 Limit how many notifications are loaded 2021-04-26 10:11:13 -07:00
Mouse Reeve c2ffdb8f03 Import ratings as ratings, not reviews 2021-04-26 10:04:33 -07:00
Mouse Reeve 7fcf48e84d Adds success notification for adding books to lists 2021-04-26 09:57:01 -07:00
Mouse Reeve 1edd00a0d1 Merge branch 'main' into list-fixes 2021-04-26 09:44:55 -07:00
Mouse Reeve 7449f34a61
Merge pull request #1004 from bookwyrm-social/black-update
New version of black, new whitespace
2021-04-26 09:42:23 -07:00
Mouse Reeve 3ade2d3bb1 New version of black, new whitespace 2021-04-26 09:15:42 -07:00
Mouse Reeve 0f6b5cc6be Filter list search results to hide already added books 2021-04-26 08:02:30 -07:00
Mouse Reeve 0cb80aeb55 Preserve search results after adding a book 2021-04-26 07:24:03 -07:00
Fabien Basmaison b089f6c86a Update Bulma from v0.9.1 to v0.9.2. 2021-04-26 15:20:48 +02:00
Fabien Basmaison 26cacf502c Rationalise behaviours of context, container and cover:
- Set minimum dimensions to avoid having to pass classes all over the place.
- Outline the container to show white on white covers properly.
- Remove extraneous code.
- Better size caption when no cover is available.
- Create Alignments, Positions and Spacings sections and move some existing dimensions.
- Update previous templates.
2021-04-26 13:39:17 +02:00
Fabien Basmaison 30bed6c963 Merge branch 'main' into frontend-book-cover 2021-04-26 11:35:10 +02:00
Mouse Reeve ef83eb33b0
Merge pull request #993 from bookwyrm-social/find-own-book-content
Find own book content
2021-04-25 11:37:00 -07:00
Mouse Reeve 68db3e0e0e
Merge pull request #1001 from joachimesque/directory-homogenous-card-height
Directory: Homogenize cards heights
2021-04-25 11:21:17 -07:00
Joachim e92166c7f7 Directory: Homogenize cards heights
When the content of a profile card stretches it in height, the grid is not homogenous. This PR adds a CSS class that'll display cards as stretchable columns. The card content will be able to grow, which should always place the card footer at the bottom of the card.
2021-04-25 20:05:31 +02:00
Mouse Reeve 2fd8e12b96
Merge pull request #974 from joachimesque/list-table
Add mobile styles for book preview table
2021-04-25 10:42:27 -07:00
Mouse Reeve aa557e4758
Merge pull request #971 from joachimesque/smaller-statuses-dense-cards
Move some status footer elements to the header
2021-04-25 10:39:23 -07:00
Mouse Reeve 266ea57b83
Merge pull request #1000 from reesporte/do-we-need-fr-dev
as far as i can tell, fr-dev is literally exactly the same as bw-dev
2021-04-25 10:09:57 -07:00
Mouse Reeve df0063deb9
Merge pull request #998 from bookwyrm-social/mobile-book-previews
Show book preview in full statuses on mobile
2021-04-25 10:09:41 -07:00
Mouse Reeve 693125529a
Merge pull request #999 from reesporte/main
update lines for spanish translations
2021-04-25 10:09:08 -07:00
Fabien Basmaison a268f339c0 Fix linting issues. 2021-04-25 15:45:49 +02:00
Fabien Basmaison 953dff90bb cover: tweak styles:
- `optimizeQuality` > `smooth` (CSS language evolution)
- Use `auto` instead of a fixed width.
- Add exceptions for heights and apply them to some previously modified templates.
- Remove `is-large` exception.
- Widen the content column on list curation.
2021-04-25 15:37:46 +02:00
Fabien Basmaison 23985e4357 Merge branch 'main' into frontend-book-cover 2021-04-25 11:24:21 +02:00
reese 61f1e07db4 as far as i can tell, fr-dev is literally exactly the same as bw-dev 2021-04-24 23:39:46 -05:00
reese 6a203f9738 update translations 2021-04-24 23:04:32 -05:00
Mouse Reeve bb44ede2e7 Show book preview in full statuses on mobile 2021-04-24 12:56:53 -07:00
Fabien Basmaison cf5a4ebe90 Fix typo:
Addresses https://github.com/bookwyrm-social/bookwyrm/pull/994#discussion_r619688900.
2021-04-24 21:27:05 +02:00
Fabien Basmaison eea8b4e750 cover: Handle covers with specific heights:
- Have an explicit contextual class on `cover-container`.
- Use more flexible, consistent and searchable variable name for passing classes to covers.
- Consistently use `'…'` with django variables.
- Give the option to not hide covers to screen readers.
- consitently give a title to the cover container if `alt_text` exists.
- [lists] Remove `.content` which is applying too extensive default styles.
2021-04-24 21:27:05 +02:00
Mouse Reeve 7be456836d
Merge pull request #997 from GuDzpoz/main
Locale `zh-cn` should be `zh-hans`
2021-04-24 12:18:45 -07:00
Joachim 04e1806482 Update status_header.html 2021-04-24 20:47:39 +02:00
Joachim 59ed49f082 Update status_header.html 2021-04-24 20:39:54 +02:00
Mouse Reeve 4fb85ced5f Updates logic for new and newly discoverable users 2021-04-24 11:16:35 -07:00
Joachim e06154c457
Merge branch 'main' into smaller-statuses-dense-cards 2021-04-24 20:07:13 +02:00
GuDzpoz 72d92343aa zh-cn should be zh-hans 2021-04-24 22:32:04 +08:00
Mouse Reeve deb1257114
Merge pull request #995 from bookwyrm-social/show-subtitles
Show subtitles when titles are very short
2021-04-24 06:58:00 -07:00
Mouse Reeve 8e6642b322
Merge pull request #996 from arkhi/stars-no-wrap
Prevent stars from wrapping on multiple lines
2021-04-24 06:51:42 -07:00
Fabien Basmaison 783cc6edf0 cover: List curation:
- Reduce Padding around covers.
- Remove `content` which is applying too extensive default styles.
- Style headings.
- Replace table with definition list.
- Clip cover container to avoid caption overflowing.
2021-04-24 15:49:30 +02:00
Fabien Basmaison 75a69988e4 cover: List:
- Reduce Padding around covers.
- Remove `content` which is applying too extensive default styles.
2021-04-24 14:24:25 +02:00
Fabien Basmaison 32fb06c9e6 Prevent stars from wrapping on multiple lines. 2021-04-24 13:23:03 +02:00
Fabien Basmaison 9ea91d8e7c cover: Search layout: Reduce padding around covers. 2021-04-24 12:56:38 +02:00
Fabien Basmaison 7f0b3184a1 cover: Use book-cover as component:
- Avoid specifying context-dependent values in CSS for components. Those values can be defined by the context calling the component.
- Use `<figure>` with optional caption.
- Reduce redundant markup.
- Allow more variables to be passed to the book-cover (image path and class for the container).
- Hide the book cover to screen readers.
2021-04-24 12:48:55 +02:00
Mouse Reeve 9880bdc75b Move anntotated users quuery into suggested users module 2021-04-23 18:26:48 -07:00
Mouse Reeve dda21195de Correct calls to annotated user set 2021-04-23 16:34:04 -07:00
Mouse Reeve 179ba24115 Safely handle invalid book 2021-04-23 15:29:55 -07:00
Mouse Reeve a499259163 Fixes python formatting 2021-04-23 15:01:35 -07:00
Mouse Reeve 9ba0aec6d9 Show subtitles when titles are very short 2021-04-23 14:58:48 -07:00
Mouse Reeve 126594ec49 Cleans up queryset declarations 2021-04-23 13:47:13 -07:00
Mouse Reeve 888930f891 User request path for pagination 2021-04-23 13:35:12 -07:00
Mouse Reeve d2b2065db8 Show user's book content 2021-04-23 13:32:58 -07:00
Mouse Reeve cbdf573261
Merge pull request #991 from bookwyrm-social/character-encoding
Fixes character encoding bug
2021-04-23 12:06:04 -07:00
Mouse Reeve d31827e5aa
Merge pull request #975 from reesporte/main
spanish translation updates
2021-04-23 12:03:03 -07:00
Mouse Reeve 013d5f1db3
Merge pull request #987 from bookwyrm-social/duplicate-boosts
Don't broadcast boosts twice
2021-04-23 11:58:01 -07:00
Mouse Reeve 607e98b331 Fixes character encoding error 2021-04-23 11:53:45 -07:00
Mouse Reeve c907b1ff09 Test to replicate character encoding bug 2021-04-23 11:07:19 -07:00
Mouse Reeve 79424f7bfb Python formatting 2021-04-23 10:56:17 -07:00
Mouse Reeve 32e694032b Fixes duplicate boost model verification 2021-04-23 10:49:17 -07:00
Joachim de19c7d7a6 Update status_header.html 2021-04-23 18:38:33 +02:00
Mouse Reeve b457446f2f Don't save duplicate boosts 2021-04-22 19:36:27 -07:00
Mouse Reeve 359061f507
Merge pull request #988 from bookwyrm-social/remove-tags
Remove unused code for tagging books
2021-04-22 19:35:58 -07:00
Mouse Reeve f9c40aadd9 Python formatting 2021-04-22 18:30:58 -07:00
Mouse Reeve 74ccaf27fa Tag removal migration 2021-04-22 18:23:23 -07:00
Mouse Reeve a3f91d991f Remove tag form 2021-04-22 18:19:42 -07:00
Mouse Reeve 563623616c Merge branch 'main' into remove-tags 2021-04-22 18:18:24 -07:00
Mouse Reeve 9148f36719 Fixes duplicate boosts 2021-04-22 18:16:00 -07:00
Mouse Reeve adb8f6f90f
Merge pull request #986 from bookwyrm-social/scroll-behavior
Removes scroll padding
2021-04-22 14:38:46 -07:00
reese 648b990aab realized Read was in the past tense lol 2021-04-22 16:28:57 -05:00
reese e4b432246a replace venv3 with venv, makemessages for es, compilemessages for es 2021-04-22 16:28:57 -05:00
reese 9400510b21 compile messages, fix typos 2021-04-22 16:28:57 -05:00
reese c8de7890c6 finally finished 2021-04-22 16:28:57 -05:00
reese e6bd89e10b more translations 2021-04-22 16:28:57 -05:00
reese ca63bd6947 more translations 2021-04-22 16:28:57 -05:00
reese d526fdc92f more translations 2021-04-22 16:28:57 -05:00
reese 6915b195ce translated some strings 2021-04-22 16:28:57 -05:00
Mouse Reeve e546b1b1ad
Merge pull request #984 from joachimesque/a11y-html-lang
Accessibility: add language to `lang` attr on `html` tag
2021-04-22 13:29:22 -07:00
Mouse Reeve c6e8161a9f Removes scroll padding 2021-04-22 13:08:22 -07:00
Joachim 15c7a1dc82 Update bookwyrm.css 2021-04-22 20:57:24 +02:00
Joachim 6c89eb1b65 Update bookwyrm_tags.py 2021-04-22 20:48:25 +02:00
Joachim 15241e3807 ……… come back another day 2021-04-22 20:48:06 +02:00
Joachim ebf20de10e linter linter go away 2021-04-22 20:45:16 +02:00
Joachim 00e6d0524f Accessibility: add language to lang attr on html tag
I only use the first subtag of the language string given by `get_language()`, because `get_language()` returns an all-lowercase string, and I don't know if it'll be considered valid by browsers.
2021-04-22 20:41:58 +02:00
Joachim 2749e6ad95 Fix CSS for linter 2021-04-21 22:36:07 +02:00
Joachim 7a5ea31ee7 Fix progress display in title 2021-04-21 22:32:26 +02:00
Joachim 0b0a283e64 Fix buttons styles 2021-04-21 22:32:14 +02:00
Joachim b1fea98458 Use one card-footer-item per footer button 2021-04-21 22:31:27 +02:00
Joachim 415a12cf78 Move H3 tag 2021-04-21 22:30:52 +02:00
Joachim 53b47aa264 Revert "Move card footer container inside the card-footer component"
This reverts commit 58aeb72afa.
2021-04-21 21:48:31 +02:00
Joachim 17436b6657 Header fixes 2021-04-21 21:48:19 +02:00
Joachim e4836bd9b3 Fix for lint 2021-04-21 21:29:28 +02:00
Joachim 2ae9085e55 Vertically align cells in desktop view 2021-04-21 21:26:20 +02:00
Joachim 482774f1e1 Add mobile styles for book preview table 2021-04-21 21:25:37 +02:00
Joachim 2cacf5146b
Merge branch 'main' into smaller-statuses-dense-cards 2021-04-21 17:40:20 +02:00
Joachim f7adaee0ed Verbosify buttons 2021-04-21 17:35:55 +02:00
Joachim 13957c2f44 Move footer some items to header
- Header elements are now enclosed in a media layout
- Footer elements are not in a card-footer anymore
2021-04-21 17:32:35 +02:00
Joachim 58aeb72afa Move card footer container inside the card-footer component 2021-04-21 17:23:48 +02:00
Mouse Reeve d1c582493d Update to django 3.2 2021-04-18 09:26:27 -07:00
Mouse Reeve fdf5113143 Removes tag code 2021-04-08 16:02:02 -07:00
Mouse Reeve 922428cab7 Fixes error in reverse path 2021-04-06 18:51:43 -07:00
Mouse Reeve 29e7659b76 Expand inventaire book data 2021-04-06 18:34:55 -07:00
Mouse Reeve fec3d63e46 Python formatting 2021-04-06 18:17:33 -07:00
Mouse Reeve ac27111f05 Adds inventaire to default connector list 2021-04-06 18:13:33 -07:00
Mouse Reeve f21aca1211 Load remote keys 2021-04-06 18:10:42 -07:00
Mouse Reeve 4112862924 Fixes search data and new activitypub fields 2021-04-06 18:00:54 -07:00
Mouse Reeve 82c2f2eeb1 Adds more author identifier fields 2021-04-06 17:46:06 -07:00
Mouse Reeve bfdcf611e7 Adds inventaire identifier to book data fields 2021-04-06 13:54:57 -07:00
Mouse Reeve e594cd0a36 Load simple fields from inventaire 2021-04-06 13:53:58 -07:00
Mouse Reeve 3158701075 Gets editions for works 2021-04-06 13:39:10 -07:00
Mouse Reeve 5149c7e8c2 Expands mappings for inventaire/wikidata properties 2021-04-06 13:03:22 -07:00
Mouse Reeve 22ebe60c0a Use custom data extractor for inventaire connector 2021-04-06 12:29:06 -07:00
Mouse Reeve fba44206ac Adds separate view and load links for book search results 2021-04-06 12:17:58 -07:00
Mouse Reeve d482c66ad4 Adds inventaire connector stub
And changes formatters to accept the key as well as value
2021-04-06 11:58:07 -07:00
Mouse Reeve 295842badd Adds inventaire id to book data model 2021-04-06 10:40:39 -07:00
Mouse Reeve f30d05acfc Update connector model to add new connector 2021-04-06 10:40:13 -07:00
Mouse Reeve 03e5da12dd Call suggestions redis in feed 2021-04-06 08:31:18 -07:00
Mouse Reeve 18ba33e050 Uses redis for storing suggested users 2021-04-05 13:49:21 -07:00
Ilona Brand 73c30e8c9a Add user default privacy setting to the privacy_select and user preferences 2021-02-13 19:42:25 -06:00
1007 changed files with 124884 additions and 28405 deletions

View file

@ -32,7 +32,7 @@ indent_size = 2
max_line_length = off
# Computer generated files
[{package.json,*.lock,*.mo}]
[{icons.css,package.json,*.lock,*.mo}]
indent_size = unset
indent_style = unset
max_line_length = unset

View file

@ -1,50 +0,0 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY="7(2w1sedok=aznpq)ta1mc4i%4h=xx@hxwx*o57ctsuml0x%fr"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG=true
DOMAIN=your.domain.here
#EMAIL=your@email.here
## Leave unset to allow all hosts
# ALLOWED_HOSTS="localhost,127.0.0.1,[::1]"
OL_URL=https://openlibrary.org
## Database backend to use.
## Default is postgres, sqlite is for dev quickstart only (NOT production!!!)
BOOKWYRM_DATABASE_BACKEND=postgres
MEDIA_ROOT=images/
POSTGRES_PASSWORD=fedireads
POSTGRES_USER=fedireads
POSTGRES_DB=fedireads
POSTGRES_HOST=db
# Redis activity stream manager
MAX_STREAM_LENGTH=200
REDIS_ACTIVITY_HOST=redis_activity
REDIS_ACTIVITY_PORT=6379
#REDIS_ACTIVITY_PASSWORD=redispassword345
# Redis as celery broker
#REDIS_BROKER_PORT=6379
#REDIS_BROKER_PASSWORD=redispassword123
CELERY_BROKER=redis://redis_broker:6379/0
CELERY_RESULT_BACKEND=redis://redis_broker:6379/0
FLOWER_PORT=8888
#FLOWER_USER=mouse
#FLOWER_PASSWORD=changeme
EMAIL_HOST="smtp.mailgun.org"
EMAIL_PORT=587
EMAIL_HOST_USER=mail@your.domain.here
EMAIL_HOST_PASSWORD=emailpassword123
EMAIL_USE_TLS=true
EMAIL_USE_SSL=false
# Set this to true when initializing certbot for domain, false when not
CERTBOT_INIT=false

110
.env.example Normal file
View file

@ -0,0 +1,110 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY="7(2w1sedok=aznpq)ta1mc4i%4h=xx@hxwx*o57ctsuml0x%fr"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG=false
USE_HTTPS=true
DOMAIN=your.domain.here
EMAIL=your@email.here
# Instance defualt language (see options at bookwyrm/settings.py "LANGUAGES"
LANGUAGE_CODE="en-us"
# Used for deciding which editions to prefer
DEFAULT_LANGUAGE="English"
## Leave unset to allow all hosts
# ALLOWED_HOSTS="localhost,127.0.0.1,[::1]"
MEDIA_ROOT=images/
# Database configuration
PGPORT=5432
POSTGRES_PASSWORD=securedbypassword123
POSTGRES_USER=fedireads
POSTGRES_DB=fedireads
POSTGRES_HOST=db
# Redis activity stream manager
MAX_STREAM_LENGTH=200
REDIS_ACTIVITY_HOST=redis_activity
REDIS_ACTIVITY_PORT=6379
REDIS_ACTIVITY_PASSWORD=redispassword345
# Optional, use a different redis database (defaults to 0)
# REDIS_ACTIVITY_DB_INDEX=0
# Redis as celery broker
REDIS_BROKER_PORT=6379
REDIS_BROKER_PASSWORD=redispassword123
# Optional, use a different redis database (defaults to 0)
# REDIS_BROKER_DB_INDEX=0
# Monitoring for celery
FLOWER_PORT=8888
FLOWER_USER=admin
FLOWER_PASSWORD=changeme
# Email config
EMAIL_HOST=smtp.mailgun.org
EMAIL_PORT=587
EMAIL_HOST_USER=mail@your.domain.here
EMAIL_HOST_PASSWORD=emailpassword123
EMAIL_USE_TLS=true
EMAIL_USE_SSL=false
EMAIL_SENDER_NAME=admin
# defaults to DOMAIN
EMAIL_SENDER_DOMAIN=
# Query timeouts
SEARCH_TIMEOUT=15
QUERY_TIMEOUT=5
# Thumbnails Generation
ENABLE_THUMBNAIL_GENERATION=false
# S3 configuration
USE_S3=false
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# Commented are example values if you use a non-AWS, S3-compatible service
# AWS S3 should work with only AWS_STORAGE_BUCKET_NAME and AWS_S3_REGION_NAME
# non-AWS S3-compatible services will need AWS_STORAGE_BUCKET_NAME,
# along with both AWS_S3_CUSTOM_DOMAIN and AWS_S3_ENDPOINT_URL
# AWS_STORAGE_BUCKET_NAME= # "example-bucket-name"
# AWS_S3_CUSTOM_DOMAIN=None # "example-bucket-name.s3.fr-par.scw.cloud"
# AWS_S3_REGION_NAME=None # "fr-par"
# AWS_S3_ENDPOINT_URL=None # "https://s3.fr-par.scw.cloud"
# Preview image generation can be computing and storage intensive
# ENABLE_PREVIEW_IMAGES=True
# Specify RGB tuple or RGB hex strings,
# or use_dominant_color_light / use_dominant_color_dark
PREVIEW_BG_COLOR=use_dominant_color_light
# Change to #FFF if you use use_dominant_color_dark
PREVIEW_TEXT_COLOR=#363636
PREVIEW_IMG_WIDTH=1200
PREVIEW_IMG_HEIGHT=630
PREVIEW_DEFAULT_COVER_COLOR=#002549
# Below are example keys if you want to enable automatically
# sending telemetry to an OTLP-compatible service. Many of
# the main monitoring apps have OLTP collectors, including
# NewRelic, DataDog, and Honeycomb.io - consult their
# documentation for setup instructions, and what exactly to
# put below!
#
# Service name is an arbitrary tag that is attached to any
# data sent, used to distinguish different sources. Useful
# for sending prod and dev metrics to the same place and
# keeping them separate, for instance!
# API endpoint for your provider
OTEL_EXPORTER_OTLP_ENDPOINT=
# Any headers required, usually authentication info
OTEL_EXPORTER_OTLP_HEADERS=
# Service name to identify your app
OTEL_SERVICE_NAME=

View file

@ -1,50 +0,0 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY="7(2w1sedok=aznpq)ta1mc4i%4h=xx@hxwx*o57ctsuml0x%fr"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG=false
DOMAIN=your.domain.here
EMAIL=your@email.here
## Leave unset to allow all hosts
# ALLOWED_HOSTS="localhost,127.0.0.1,[::1]"
OL_URL=https://openlibrary.org
## Database backend to use.
## Default is postgres, sqlite is for dev quickstart only (NOT production!!!)
BOOKWYRM_DATABASE_BACKEND=postgres
MEDIA_ROOT=images/
POSTGRES_PASSWORD=securedbpassword123
POSTGRES_USER=fedireads
POSTGRES_DB=fedireads
POSTGRES_HOST=db
# Redis activity stream manager
MAX_STREAM_LENGTH=200
REDIS_ACTIVITY_HOST=redis_activity
REDIS_ACTIVITY_PORT=6379
REDIS_ACTIVITY_PASSWORD=redispassword345
# Redis as celery broker
REDIS_BROKER_PORT=6379
REDIS_BROKER_PASSWORD=redispassword123
CELERY_BROKER=redis://:${REDIS_BROKER_PASSWORD}@redis_broker:${REDIS_BROKER_PORT}/0
CELERY_RESULT_BACKEND=redis://:${REDIS_BROKER_PASSWORD}@redis_broker:${REDIS_BROKER_PORT}/0
FLOWER_PORT=8888
FLOWER_USER=mouse
FLOWER_PASSWORD=changeme
EMAIL_HOST="smtp.mailgun.org"
EMAIL_PORT=587
EMAIL_HOST_USER=mail@your.domain.here
EMAIL_HOST_PASSWORD=emailpassword123
EMAIL_USE_TLS=true
EMAIL_USE_SSL=false
# Set this to true when initializing certbot for domain, false when not
CERTBOT_INIT=false

View file

@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: 'bug'
assignees: ''
---
@ -23,6 +23,14 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Instance**
On which BookWyrm instance did you encounter this problem.
**Additional context**
Add any other context about the problem here.
---
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
@ -33,6 +41,3 @@ If applicable, add screenshots to help explain your problem.
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View file

@ -1,6 +1,10 @@
name: Lint Python
name: Python Formatting (run ./bw-dev black to fix)
on: [push, pull_request]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
@ -8,6 +12,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@stable
with:
args: ". --check -l 80 -S"
- uses: psf/black@21.4b2

28
.github/workflows/curlylint.yaml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Templates validator
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install curlylint
run: pip install curlylint
- name: Run linter
run: >
curlylint --rule 'aria_role: true' \
--rule 'django_forms_rendering: true' \
--rule 'html_has_lang: true' \
--rule 'image_alt: true' \
--rule 'meta_viewport: true' \
--rule 'no_autofocus: true' \
--rule 'tabindex_no_positive: true' \
--exclude '_modal.html|create_status/layout.html|reading_modals/layout.html' \
bookwyrm/templates

View file

@ -9,18 +9,9 @@ jobs:
build:
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
matrix:
db: [postgres]
python-version: [3.9]
include:
- db: postgres
db_port: 5432
services:
postgres:
image: postgres:10
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: hunter2
@ -33,24 +24,20 @@ jobs:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
env:
DB: ${{ matrix.db }}
DB_HOST: 127.0.0.1
DB_PORT: ${{ matrix.db_port }}
DB_PASSWORD: hunter2
SECRET_KEY: beepbeep
DEBUG: true
DEBUG: false
USE_HTTPS: true
DOMAIN: your.domain.here
OL_URL: https://openlibrary.org
BOOKWYRM_DATABASE_BACKEND: postgres
MEDIA_ROOT: images/
POSTGRES_PASSWORD: hunter2
@ -58,11 +45,15 @@ jobs:
POSTGRES_DB: github_actions
POSTGRES_HOST: 127.0.0.1
CELERY_BROKER: ""
CELERY_RESULT_BACKEND: ""
REDIS_BROKER_PORT: 6379
REDIS_BROKER_PASSWORD: beep
USE_DUMMY_CACHE: true
FLOWER_PORT: 8888
EMAIL_HOST: "smtp.mailgun.org"
EMAIL_PORT: 587
EMAIL_HOST_USER: ""
EMAIL_HOST_PASSWORD: ""
EMAIL_USE_TLS: true
ENABLE_PREVIEW_IMAGES: false
run: |
python manage.py test
pytest -n 3

View file

@ -1,5 +1,5 @@
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Lint Frontend
name: Lint Frontend (run `./bw-dev stylelint` to fix css errors)
on:
push:
@ -8,7 +8,7 @@ on:
- '.github/workflows/**'
- 'static/**'
- '.eslintrc'
- '.stylelintrc'
- '.stylelintrc.js'
pull_request:
branches: [ main, ci, frontend ]
@ -22,17 +22,16 @@ jobs:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
run: npm install stylelint stylelint-config-recommended stylelint-config-standard stylelint-order eslint
# See .stylelintignore for files that are not linted.
- name: Run stylelint
run: >
yarn stylelint bookwyrm/static/**/*.css \
--report-needless-disables \
--report-invalid-scope-disables
npx stylelint bookwyrm/static/css/*.scss bookwyrm/static/css/bookwyrm/**/*.scss \
--config dev-tools/.stylelintrc.js
# See .eslintignore for files that are not linted.
- name: Run ESLint
run: >
yarn eslint bookwyrm/static \
npx eslint bookwyrm/static \
--ext .js,.jsx,.ts,.tsx

View file

@ -1,21 +0,0 @@
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Lint project globally
on:
push:
branches: [ main, ci ]
pull_request:
branches: [ main, ci ]
jobs:
lint:
name: Lint with EditorConfig.
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: EditorConfig
uses: greut/eclint-action@v0

23
.github/workflows/prettier.yaml vendored Normal file
View file

@ -0,0 +1,23 @@
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: JavaScript Prettier (run ./bw-dev prettier to fix)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
name: Lint with Prettier
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
- uses: actions/checkout@v2
- name: Install modules
run: npm install prettier
- name: Run Prettier
run: npx prettier --check bookwyrm/static/js/*.js

27
.github/workflows/pylint.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Pylint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
pylint bookwyrm/

11
.gitignore vendored
View file

@ -4,6 +4,7 @@
*.swp
**/__pycache__
.local
/nginx/nginx.conf
# VSCode
/.vscode
@ -15,6 +16,9 @@
# BookWyrm
.env
/images/
bookwyrm/static/css/bookwyrm.css
bookwyrm/static/css/themes/
!bookwyrm/static/css/themes/bookwyrm-*.scss
# Testing
.coverage
@ -23,7 +27,12 @@
.idea
#Node tools
/node_modules/
node_modules/
package-lock.json
yarn.lock
#nginx
nginx/default.conf
#macOS
**/.DS_Store

1
.prettierignore Normal file
View file

@ -0,0 +1 @@
**/vendor/*

6
.pylintrc Normal file
View file

@ -0,0 +1,6 @@
[MAIN]
ignore=migrations
load-plugins=pylint.extensions.no_self_use
[MESSAGES CONTROL]
disable=E1101,E1135,E1136,R0903,R0901,R0902,W0707,W0511,W0406,R0401,R0801,C3001

View file

@ -1,17 +0,0 @@
/* global module */
module.exports = {
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-order"
],
"rules": {
"order/order": [
"custom-properties",
"declarations"
],
"indentation": 4
}
};

View file

@ -6,8 +6,7 @@ RUN mkdir /app /app/static /app/images
WORKDIR /app
RUN apt-get update && apt-get install -y gettext libgettextpo-dev tidy && apt-get clean
COPY requirements.txt /app/
RUN pip install -r requirements.txt --no-cache-dir
RUN apt-get update && apt-get install -y gettext libgettextpo-dev && apt-get clean
COPY ./bookwyrm ./celerywyrm /app/

View file

@ -9,10 +9,11 @@ Permission is hereby granted, free of charge, to any person or organization (the
1. The above copyright notice and this permission notice shall be included in all copies or modified versions of the Software.
2. The User is one of the following:
a. An individual person, laboring for themselves
b. A non-profit organization
c. An educational institution
d. An organization that seeks shared profit for all of its members, and allows non-members to set the cost of their labor
1. An individual person, laboring for themselves
2. A non-profit organization
3. An educational institution
4. An organization that seeks shared profit for all of its members, and allows non-members to set the cost of their labor
3. If the User is an organization with owners, then all owners are workers and all workers are owners with equal equity and/or equal vote.

View file

@ -9,21 +9,18 @@ Social reading and reviewing, decentralized with ActivityPub
- [What it is and isn't](#what-it-is-and-isnt)
- [The role of federation](#the-role-of-federation)
- [Features](#features)
- [Book data](#book-data)
- [Set up Bookwyrm](#set-up-bookwyrm)
- [Set up BookWyrm](#set-up-bookwyrm)
## Joining BookWyrm
BookWyrm is still a young piece of software, and isn't at the level of stability and feature-richness that you'd find in a production-ready application. But it does what it says on the box! If you'd like to join an instance, you can check out the [instances](https://docs.joinbookwyrm.com/instances.html) list.
You can request an invite by entering your email address at https://bookwyrm.social.
If you'd like to join an instance, you can check out the [instances](https://joinbookwyrm.com/instances/) list.
## Contributing
See [contributing](https://docs.joinbookwyrm.com/how-to-contribute.html) for code, translation or monetary contributions.
See [contributing](https://docs.joinbookwyrm.com/contributing.html) for code, translation or monetary contributions.
## About BookWyrm
### What it is and isn't
BookWyrm is a platform for social reading! You can use it to track what you're reading, review books, and follow your friends. It isn't primarily meant for cataloguing or as a data-source for books, but it does do both of those things to some degree.
BookWyrm is a platform for social reading. You can use it to track what you're reading, review books, and follow your friends. It isn't primarily meant for cataloguing or as a data-source for books, but it does do both of those things to some degree.
### The role of federation
BookWyrm is built on [ActivityPub](http://activitypub.rocks/). With ActivityPub, it inter-operates with different instances of BookWyrm, and other ActivityPub compliant services, like Mastodon. This means you can run an instance for your book club, and still follow your friend who posts on a server devoted to 20th century Russian speculative fiction. It also means that your friend on mastodon can read and comment on a book review that you post on your BookWyrm instance.
@ -78,8 +75,5 @@ Deployment
- [Nginx](https://nginx.org/en/) HTTP server
## Book data
The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written.
## Set up Bookwyrm
The [documentation website](https://docs.joinbookwyrm.com/) has instruction on how to set up Bookwyrm in a [developer environment](https://docs.joinbookwyrm.com/developer-environment.html) or [production](https://docs.joinbookwyrm.com/installing-in-production.html).
## Set up BookWyrm
The [documentation website](https://docs.joinbookwyrm.com/) has instruction on how to set up BookWyrm in a [developer environment](https://docs.joinbookwyrm.com/install-dev.html) or [production](https://docs.joinbookwyrm.com/install-prod.html).

View file

@ -27,5 +27,5 @@ activity_objects = {c[0]: c[1] for c in cls_members if hasattr(c[1], "to_model")
def parse(activity_json):
""" figure out what activity this is and parse it """
"""figure out what activity this is and parse it"""
return naive_parse(activity_objects, activity_json)

View file

@ -1,6 +1,7 @@
""" basics for an activitypub serializer """
from dataclasses import dataclass, fields, MISSING
from json import JSONEncoder
import logging
from django.apps import apps
from django.db import IntegrityError, transaction
@ -8,37 +9,24 @@ from django.db import IntegrityError, transaction
from bookwyrm.connectors import ConnectorException, get_data
from bookwyrm.tasks import app
logger = logging.getLogger(__name__)
class ActivitySerializerError(ValueError):
""" routine problems serializing activitypub json """
"""routine problems serializing activitypub json"""
class ActivityEncoder(JSONEncoder):
""" used to convert an Activity object into json """
"""used to convert an Activity object into json"""
def default(self, o):
return o.__dict__
@dataclass
class Link:
""" for tagging a book in a status """
href: str
name: str
type: str = "Link"
@dataclass
class Mention(Link):
""" a subtype of Link for mentioning an actor """
type: str = "Mention"
@dataclass
# pylint: disable=invalid-name
class Signature:
""" public key block """
"""public key block"""
creator: str
created: str
@ -47,27 +35,27 @@ class Signature:
def naive_parse(activity_objects, activity_json, serializer=None):
""" this navigates circular import issues """
"""this navigates circular import issues by looking up models' serializers"""
if not serializer:
if activity_json.get("publicKeyPem"):
# ugh
activity_json["type"] = "PublicKey"
activity_type = activity_json.get("type")
if activity_type in ["Question", "Article"]:
return None
try:
serializer = activity_objects[activity_type]
except KeyError as e:
except KeyError as err:
# we know this exists and that we can't handle it
if activity_type in ["Question"]:
return None
raise ActivitySerializerError(e)
raise ActivitySerializerError(err)
return serializer(activity_objects=activity_objects, **activity_json)
@dataclass(init=False)
class ActivityObject:
""" actor activitypub json """
"""actor activitypub json"""
id: str
type: str
@ -80,7 +68,7 @@ class ActivityObject:
try:
value = kwargs[field.name]
if value in (None, MISSING, {}):
raise KeyError()
raise KeyError("Missing required field", field.name)
try:
is_subclass = issubclass(field.type, ActivityObject)
except TypeError:
@ -100,13 +88,16 @@ class ActivityObject:
except KeyError:
if field.default == MISSING and field.default_factory == MISSING:
raise ActivitySerializerError(
"Missing required field: %s" % field.name
f"Missing required field: {field.name}"
)
value = field.default
setattr(self, field.name, value)
def to_model(self, model=None, instance=None, allow_create=True, save=True):
""" convert from an activity to a model instance """
# pylint: disable=too-many-locals,too-many-branches,too-many-arguments
def to_model(
self, model=None, instance=None, allow_create=True, save=True, overwrite=True
):
"""convert from an activity to a model instance"""
model = model or get_model_from_type(self.type)
# only reject statuses if we're potentially creating them
@ -125,27 +116,41 @@ class ActivityObject:
return None
instance = instance or model()
# keep track of what we've changed
update_fields = []
# sets field on the model using the activity value
for field in instance.simple_fields:
try:
field.set_field_from_activity(instance, self)
changed = field.set_field_from_activity(
instance, self, overwrite=overwrite
)
if changed:
update_fields.append(field.name)
except AttributeError as e:
raise ActivitySerializerError(e)
# image fields have to be set after other fields because they can save
# too early and jank up users
for field in instance.image_fields:
field.set_field_from_activity(instance, self, save=save)
changed = field.set_field_from_activity(
instance, self, save=save, overwrite=overwrite
)
if changed:
update_fields.append(field.name)
if not save:
return instance
with transaction.atomic():
# can't force an update on fields unless the object already exists in the db
if not instance.id:
update_fields = None
# we can't set many to many and reverse fields on an unsaved object
try:
try:
instance.save(broadcast=False)
instance.save(broadcast=False, update_fields=update_fields)
except TypeError:
instance.save()
instance.save(update_fields=update_fields)
except IntegrityError as e:
raise ActivitySerializerError(e)
@ -180,8 +185,9 @@ class ActivityObject:
)
return instance
def serialize(self):
""" convert to dictionary with context attr """
def serialize(self, **kwargs):
"""convert to dictionary with context attr"""
omit = kwargs.get("omit", ())
data = self.__dict__.copy()
# recursively serialize
for (k, v) in data.items():
@ -190,53 +196,51 @@ class ActivityObject:
data[k] = v.serialize()
except TypeError:
pass
data = {k: v for (k, v) in data.items() if v is not None}
data["@context"] = "https://www.w3.org/ns/activitystreams"
data = {k: v for (k, v) in data.items() if v is not None and k not in omit}
if "@context" not in omit:
data["@context"] = "https://www.w3.org/ns/activitystreams"
return data
@app.task
@app.task(queue="medium_priority")
@transaction.atomic
def set_related_field(
model_name, origin_model_name, related_field_name, related_remote_id, data
):
""" load reverse related fields (editions, attachments) without blocking """
model = apps.get_model("bookwyrm.%s" % model_name, require_ready=True)
origin_model = apps.get_model("bookwyrm.%s" % origin_model_name, require_ready=True)
"""load reverse related fields (editions, attachments) without blocking"""
model = apps.get_model(f"bookwyrm.{model_name}", require_ready=True)
origin_model = apps.get_model(f"bookwyrm.{origin_model_name}", require_ready=True)
with transaction.atomic():
if isinstance(data, str):
existing = model.find_existing_by_remote_id(data)
if existing:
data = existing.to_activity()
else:
data = get_data(data)
activity = model.activity_serializer(**data)
if isinstance(data, str):
existing = model.find_existing_by_remote_id(data)
if existing:
data = existing.to_activity()
else:
data = get_data(data)
activity = model.activity_serializer(**data)
# this must exist because it's the object that triggered this function
instance = origin_model.find_existing_by_remote_id(related_remote_id)
if not instance:
raise ValueError("Invalid related remote id: %s" % related_remote_id)
# this must exist because it's the object that triggered this function
instance = origin_model.find_existing_by_remote_id(related_remote_id)
if not instance:
raise ValueError(f"Invalid related remote id: {related_remote_id}")
# set the origin's remote id on the activity so it will be there when
# the model instance is created
# edition.parentWork = instance, for example
model_field = getattr(model, related_field_name)
if hasattr(model_field, "activitypub_field"):
setattr(
activity, getattr(model_field, "activitypub_field"), instance.remote_id
)
item = activity.to_model()
# set the origin's remote id on the activity so it will be there when
# the model instance is created
# edition.parentWork = instance, for example
model_field = getattr(model, related_field_name)
if hasattr(model_field, "activitypub_field"):
setattr(activity, getattr(model_field, "activitypub_field"), instance.remote_id)
item = activity.to_model(model=model)
# if the related field isn't serialized (attachments on Status), then
# we have to set it post-creation
if not hasattr(model_field, "activitypub_field"):
setattr(item, related_field_name, instance)
item.save()
# if the related field isn't serialized (attachments on Status), then
# we have to set it post-creation
if not hasattr(model_field, "activitypub_field"):
setattr(item, related_field_name, instance)
item.save()
def get_model_from_type(activity_type):
""" given the activity, what type of model """
"""given the activity, what type of model"""
models = apps.get_models()
model = [
m
@ -247,7 +251,7 @@ def get_model_from_type(activity_type):
]
if not model:
raise ActivitySerializerError(
'No model found for activity type "%s"' % activity_type
f'No model found for activity type "{activity_type}"'
)
return model[0]
@ -255,8 +259,10 @@ def get_model_from_type(activity_type):
def resolve_remote_id(
remote_id, model=None, refresh=False, save=True, get_activity=False
):
""" take a remote_id and return an instance, creating if necessary """
"""take a remote_id and return an instance, creating if necessary"""
if model: # a bonus check we can do if we already know the model
if isinstance(model, str):
model = apps.get_model(f"bookwyrm.{model}", require_ready=True)
result = model.find_existing_by_remote_id(remote_id)
if result and not refresh:
return result if not get_activity else result.to_activity_dataclass()
@ -265,9 +271,9 @@ def resolve_remote_id(
try:
data = get_data(remote_id)
except ConnectorException:
raise ActivitySerializerError(
"Could not connect to host for remote_id in: %s" % (remote_id)
)
logger.exception("Could not connect to host for remote_id: %s", remote_id)
return None
# determine the model implicitly, if not provided
# or if it's a model with subclasses like Status, check again
if not model or hasattr(model.objects, "select_subclasses"):
@ -284,3 +290,28 @@ def resolve_remote_id(
# if we're refreshing, "result" will be set and we'll update it
return item.to_model(model=model, instance=result, save=save)
@dataclass(init=False)
class Link(ActivityObject):
"""for tagging a book in a status"""
href: str
name: str = None
mediaType: str = None
id: str = None
attributedTo: str = None
availability: str = None
type: str = "Link"
def serialize(self, **kwargs):
"""remove fields"""
omit = ("id", "type", "@context")
return super().serialize(omit=omit)
@dataclass(init=False)
class Mention(Link):
"""a subtype of Link for mentioning an actor"""
type: str = "Mention"

View file

@ -6,14 +6,32 @@ from .base_activity import ActivityObject
from .image import Document
# pylint: disable=invalid-name
@dataclass(init=False)
class Book(ActivityObject):
""" serializes an edition or work, abstract """
class BookData(ActivityObject):
"""shared fields for all book data and authors"""
openlibraryKey: str = None
inventaireId: str = None
librarythingKey: str = None
goodreadsKey: str = None
bnfId: str = None
viaf: str = None
wikidata: str = None
asin: str = None
lastEditedBy: str = None
links: List[str] = field(default_factory=lambda: [])
fileLinks: List[str] = field(default_factory=lambda: [])
# pylint: disable=invalid-name
@dataclass(init=False)
class Book(BookData):
"""serializes an edition or work, abstract"""
title: str
lastEditedBy: str = None
sortTitle: str = ""
subtitle: str = ""
sortTitle: str = None
subtitle: str = None
description: str = ""
languages: List[str] = field(default_factory=lambda: [])
series: str = ""
@ -25,53 +43,50 @@ class Book(ActivityObject):
firstPublishedDate: str = ""
publishedDate: str = ""
openlibraryKey: str = ""
librarythingKey: str = ""
goodreadsKey: str = ""
cover: Document = None
type: str = "Book"
# pylint: disable=invalid-name
@dataclass(init=False)
class Edition(Book):
""" Edition instance of a book object """
"""Edition instance of a book object"""
work: str
isbn10: str = ""
isbn13: str = ""
oclcNumber: str = ""
asin: str = ""
pages: int = None
physicalFormat: str = ""
physicalFormatDetail: str = ""
publishers: List[str] = field(default_factory=lambda: [])
editionRank: int = 0
type: str = "Edition"
# pylint: disable=invalid-name
@dataclass(init=False)
class Work(Book):
""" work instance of a book object """
"""work instance of a book object"""
lccn: str = ""
defaultEdition: str = ""
editions: List[str] = field(default_factory=lambda: [])
type: str = "Work"
# pylint: disable=invalid-name
@dataclass(init=False)
class Author(ActivityObject):
""" author of a book """
class Author(BookData):
"""author of a book"""
name: str
lastEditedBy: str = None
isni: str = None
viafId: str = None
gutenbergId: str = None
born: str = None
died: str = None
aliases: List[str] = field(default_factory=lambda: [])
bio: str = ""
openlibraryKey: str = ""
librarythingKey: str = ""
goodreadsKey: str = ""
wikipediaLink: str = ""
type: str = "Author"

View file

@ -5,7 +5,7 @@ from .base_activity import ActivityObject
@dataclass(init=False)
class Document(ActivityObject):
""" a document """
"""a document"""
url: str
name: str = ""
@ -15,6 +15,6 @@ class Document(ActivityObject):
@dataclass(init=False)
class Image(Document):
""" an image """
"""an image"""
type: str = "Image"

View file

@ -9,19 +9,20 @@ from .image import Document
@dataclass(init=False)
class Tombstone(ActivityObject):
""" the placeholder for a deleted status """
"""the placeholder for a deleted status"""
type: str = "Tombstone"
def to_model(self, *args, **kwargs): # pylint: disable=unused-argument
""" this should never really get serialized, just searched for """
"""this should never really get serialized, just searched for"""
model = apps.get_model("bookwyrm.Status")
return model.find_existing_by_remote_id(self.id)
# pylint: disable=invalid-name
@dataclass(init=False)
class Note(ActivityObject):
""" Note activity """
"""Note activity"""
published: str
attributedTo: str
@ -29,17 +30,18 @@ class Note(ActivityObject):
to: List[str] = field(default_factory=lambda: [])
cc: List[str] = field(default_factory=lambda: [])
replies: Dict = field(default_factory=lambda: {})
inReplyTo: str = ""
summary: str = ""
inReplyTo: str = None
summary: str = None
tag: List[Link] = field(default_factory=lambda: [])
attachment: List[Document] = field(default_factory=lambda: [])
sensitive: bool = False
updated: str = None
type: str = "Note"
@dataclass(init=False)
class Article(Note):
""" what's an article except a note with more fields """
"""what's an article except a note with more fields"""
name: str
type: str = "Article"
@ -47,30 +49,36 @@ class Article(Note):
@dataclass(init=False)
class GeneratedNote(Note):
""" just a re-typed note """
"""just a re-typed note"""
type: str = "GeneratedNote"
# pylint: disable=invalid-name
@dataclass(init=False)
class Comment(Note):
""" like a note but with a book """
"""like a note but with a book"""
inReplyToBook: str
readingStatus: str = None
progress: int = None
progressMode: str = None
type: str = "Comment"
@dataclass(init=False)
class Quotation(Comment):
""" a quote and commentary on a book """
"""a quote and commentary on a book"""
quote: str
position: int = None
positionMode: str = None
type: str = "Quotation"
@dataclass(init=False)
class Review(Comment):
""" a full book review """
"""a full book review"""
name: str = None
rating: int = None
@ -79,8 +87,9 @@ class Review(Comment):
@dataclass(init=False)
class Rating(Comment):
""" just a star rating """
"""just a star rating"""
rating: int
content: str = None
name: str = None # not used, but the model inherits from Review
type: str = "Rating"

View file

@ -5,9 +5,10 @@ from typing import List
from .base_activity import ActivityObject
# pylint: disable=invalid-name
@dataclass(init=False)
class OrderedCollection(ActivityObject):
""" structure of an ordered collection activity """
"""structure of an ordered collection activity"""
totalItems: int
first: str
@ -17,9 +18,10 @@ class OrderedCollection(ActivityObject):
type: str = "OrderedCollection"
# pylint: disable=invalid-name
@dataclass(init=False)
class OrderedCollectionPrivate(OrderedCollection):
""" an ordered collection with privacy settings """
"""an ordered collection with privacy settings"""
to: List[str] = field(default_factory=lambda: [])
cc: List[str] = field(default_factory=lambda: [])
@ -27,23 +29,24 @@ class OrderedCollectionPrivate(OrderedCollection):
@dataclass(init=False)
class Shelf(OrderedCollectionPrivate):
""" structure of an ordered collection activity """
"""structure of an ordered collection activity"""
type: str = "Shelf"
@dataclass(init=False)
class BookList(OrderedCollectionPrivate):
""" structure of an ordered collection activity """
"""structure of an ordered collection activity"""
summary: str = None
curation: str = "closed"
type: str = "BookList"
# pylint: disable=invalid-name
@dataclass(init=False)
class OrderedCollectionPage(ActivityObject):
""" structure of an ordered collection activity """
"""structure of an ordered collection activity"""
partOf: str
orderedItems: List
@ -54,7 +57,7 @@ class OrderedCollectionPage(ActivityObject):
@dataclass(init=False)
class CollectionItem(ActivityObject):
""" an item in a collection """
"""an item in a collection"""
actor: str
type: str = "CollectionItem"
@ -62,7 +65,7 @@ class CollectionItem(ActivityObject):
@dataclass(init=False)
class ListItem(CollectionItem):
""" a book on a list """
"""a book on a list"""
book: str
notes: str = None
@ -73,7 +76,7 @@ class ListItem(CollectionItem):
@dataclass(init=False)
class ShelfItem(CollectionItem):
""" a book on a list """
"""a book on a list"""
book: str
type: str = "ShelfItem"

View file

@ -6,18 +6,25 @@ from .base_activity import ActivityObject
from .image import Image
# pylint: disable=invalid-name
@dataclass(init=False)
class PublicKey(ActivityObject):
""" public key block """
"""public key block"""
owner: str
publicKeyPem: str
type: str = "PublicKey"
def serialize(self, **kwargs):
"""remove fields"""
omit = ("type", "@context")
return super().serialize(omit=omit)
# pylint: disable=invalid-name
@dataclass(init=False)
class Person(ActivityObject):
""" actor activitypub json """
"""actor activitypub json"""
preferredUsername: str
inbox: str
@ -32,4 +39,5 @@ class Person(ActivityObject):
bookwyrmUser: bool = False
manuallyApprovesFollowers: str = False
discoverable: str = False
hideFollows: str = False
type: str = "Person"

View file

@ -1,3 +1,4 @@
""" ActivityPub-specific json response wrapper """
from django.http import JsonResponse
from .base_activity import ActivityEncoder

View file

@ -9,22 +9,23 @@ from .ordered_collection import CollectionItem
@dataclass(init=False)
class Verb(ActivityObject):
"""generic fields for activities """
"""generic fields for activities"""
actor: str
object: ActivityObject
def action(self):
""" usually we just want to update and save """
"""usually we just want to update and save"""
# self.object may return None if the object is invalid in an expected way
# ie, Question type
if self.object:
self.object.to_model()
# pylint: disable=invalid-name
@dataclass(init=False)
class Create(Verb):
""" Create activity """
"""Create activity"""
to: List[str]
cc: List[str] = field(default_factory=lambda: [])
@ -32,16 +33,17 @@ class Create(Verb):
type: str = "Create"
# pylint: disable=invalid-name
@dataclass(init=False)
class Delete(Verb):
""" Create activity """
"""Create activity"""
to: List[str]
to: List[str] = field(default_factory=lambda: [])
cc: List[str] = field(default_factory=lambda: [])
type: str = "Delete"
def action(self):
""" find and delete the activity object """
"""find and delete the activity object"""
if not self.object:
return
@ -57,27 +59,29 @@ class Delete(Verb):
# if we can't find it, we don't need to delete it because we don't have it
# pylint: disable=invalid-name
@dataclass(init=False)
class Update(Verb):
""" Update activity """
"""Update activity"""
to: List[str]
type: str = "Update"
def action(self):
""" update a model instance from the dataclass """
if self.object:
self.object.to_model(allow_create=False)
"""update a model instance from the dataclass"""
if not self.object:
return
self.object.to_model(allow_create=False)
@dataclass(init=False)
class Undo(Verb):
""" Undo an activity """
"""Undo an activity"""
type: str = "Undo"
def action(self):
""" find and remove the activity object """
"""find and remove the activity object"""
if isinstance(self.object, str):
# it may be that sometihng should be done with these, but idk what
# this seems just to be coming from pleroma
@ -103,64 +107,64 @@ class Undo(Verb):
@dataclass(init=False)
class Follow(Verb):
""" Follow activity """
"""Follow activity"""
object: str
type: str = "Follow"
def action(self):
""" relationship save """
"""relationship save"""
self.to_model()
@dataclass(init=False)
class Block(Verb):
""" Block activity """
"""Block activity"""
object: str
type: str = "Block"
def action(self):
""" relationship save """
"""relationship save"""
self.to_model()
@dataclass(init=False)
class Accept(Verb):
""" Accept activity """
"""Accept activity"""
object: Follow
type: str = "Accept"
def action(self):
""" find and remove the activity object """
obj = self.object.to_model(save=False, allow_create=False)
"""accept a request"""
obj = self.object.to_model(save=False, allow_create=True)
obj.accept()
@dataclass(init=False)
class Reject(Verb):
""" Reject activity """
"""Reject activity"""
object: Follow
type: str = "Reject"
def action(self):
""" find and remove the activity object """
"""reject a follow request"""
obj = self.object.to_model(save=False, allow_create=False)
obj.reject()
@dataclass(init=False)
class Add(Verb):
"""Add activity """
"""Add activity"""
target: ActivityObject
object: CollectionItem
type: str = "Add"
def action(self):
""" figure out the target to assign the item to a collection """
"""figure out the target to assign the item to a collection"""
target = resolve_remote_id(self.target)
item = self.object.to_model(save=False)
setattr(item, item.collection_field, target)
@ -169,12 +173,12 @@ class Add(Verb):
@dataclass(init=False)
class Remove(Add):
"""Remove activity """
"""Remove activity"""
type: str = "Remove"
def action(self):
""" find and remove the activity object """
"""find and remove the activity object"""
obj = self.object.to_model(save=False, allow_create=False)
if obj:
obj.delete()
@ -182,19 +186,20 @@ class Remove(Add):
@dataclass(init=False)
class Like(Verb):
""" a user faving an object """
"""a user faving an object"""
object: str
type: str = "Like"
def action(self):
""" like """
"""like"""
self.to_model()
# pylint: disable=invalid-name
@dataclass(init=False)
class Announce(Verb):
""" boosting a status """
"""boosting a status"""
published: str
to: List[str] = field(default_factory=lambda: [])
@ -203,5 +208,5 @@ class Announce(Verb):
type: str = "Announce"
def action(self):
""" boost """
"""boost"""
self.to_model()

View file

@ -1,73 +1,104 @@
""" access the activity streams stored in redis """
from datetime import timedelta
from django.dispatch import receiver
from django.db import transaction
from django.db.models import signals, Q
from django.utils import timezone
from bookwyrm import models
from bookwyrm.redis_store import RedisStore, r
from bookwyrm.views.helpers import privacy_filter
from bookwyrm.tasks import app, LOW, MEDIUM, HIGH
class ActivityStream(RedisStore):
""" a category of activity stream (like home, local, federated) """
"""a category of activity stream (like home, local, books)"""
def stream_id(self, user):
""" the redis key for this user's instance of this stream """
return "{}-{}".format(user.id, self.key)
"""the redis key for this user's instance of this stream"""
return f"{user.id}-{self.key}"
def unread_id(self, user):
""" the redis key for this user's unread count for this stream """
return "{}-unread".format(self.stream_id(user))
"""the redis key for this user's unread count for this stream"""
stream_id = self.stream_id(user)
return f"{stream_id}-unread"
def unread_by_status_type_id(self, user):
"""the redis key for this user's unread count for this stream"""
stream_id = self.stream_id(user)
return f"{stream_id}-unread-by-type"
def get_rank(self, obj): # pylint: disable=no-self-use
""" statuses are sorted by date published """
"""statuses are sorted by date published"""
return obj.published_date.timestamp()
def add_status(self, status):
""" add a status to users' feeds """
def add_status(self, status, increment_unread=False):
"""add a status to users' feeds"""
# the pipeline contains all the add-to-stream activities
pipeline = self.add_object_to_related_stores(status, execute=False)
for user in self.get_audience(status):
# add to the unread status count
pipeline.incr(self.unread_id(user))
if increment_unread:
for user in self.get_audience(status):
# add to the unread status count
pipeline.incr(self.unread_id(user))
# add to the unread status count for status type
pipeline.hincrby(
self.unread_by_status_type_id(user), get_status_type(status), 1
)
# and go!
pipeline.execute()
def add_user_statuses(self, viewer, user):
""" add a user's statuses to another user's feed """
"""add a user's statuses to another user's feed"""
# only add the statuses that the viewer should be able to see (ie, not dms)
statuses = privacy_filter(viewer, user.status_set.all())
statuses = models.Status.privacy_filter(viewer).filter(user=user)
self.bulk_add_objects_to_store(statuses, self.stream_id(viewer))
def remove_user_statuses(self, viewer, user):
""" remove a user's status from another user's feed """
"""remove a user's status from another user's feed"""
# remove all so that followers only statuses are removed
statuses = user.status_set.all()
self.bulk_remove_objects_from_store(statuses, self.stream_id(viewer))
def get_activity_stream(self, user):
""" load the statuses to be displayed """
"""load the statuses to be displayed"""
# clear unreads for this feed
r.set(self.unread_id(user), 0)
r.delete(self.unread_by_status_type_id(user))
statuses = self.get_store(self.stream_id(user))
return (
models.Status.objects.select_subclasses()
.filter(id__in=statuses)
.select_related(
"user",
"reply_parent",
"comment__book",
"review__book",
"quotation__book",
)
.prefetch_related("mention_books", "mention_users")
.order_by("-published_date")
)
def get_unread_count(self, user):
""" get the unread status count for this user's feed """
"""get the unread status count for this user's feed"""
return int(r.get(self.unread_id(user)) or 0)
def get_unread_count_by_status_type(self, user):
"""get the unread status count for this user's feed's status types"""
status_types = r.hgetall(self.unread_by_status_type_id(user))
return {
str(key.decode("utf-8")): int(value) or 0
for key, value in status_types.items()
}
def populate_streams(self, user):
""" go from zero to a timeline """
"""go from zero to a timeline"""
self.populate_store(self.stream_id(user))
def get_audience(self, status): # pylint: disable=no-self-use
""" given a status, what users should see it """
"""given a status, what users should see it"""
# direct messages don't appeard in feeds, direct comments/reviews/etc do
if status.privacy == "direct" and status.status_type == "Note":
return []
@ -98,10 +129,9 @@ class ActivityStream(RedisStore):
return [self.stream_id(u) for u in self.get_audience(obj)]
def get_statuses_for_user(self, user): # pylint: disable=no-self-use
""" given a user, what statuses should they see on this stream """
return privacy_filter(
"""given a user, what statuses should they see on this stream"""
return models.Status.privacy_filter(
user,
models.Status.objects.select_subclasses(),
privacy_levels=["public", "unlisted", "followers"],
)
@ -111,7 +141,7 @@ class ActivityStream(RedisStore):
class HomeStream(ActivityStream):
""" users you follow """
"""users you follow"""
key = "home"
@ -125,16 +155,20 @@ class HomeStream(ActivityStream):
).distinct()
def get_statuses_for_user(self, user):
return privacy_filter(
return models.Status.privacy_filter(
user,
models.Status.objects.select_subclasses(),
privacy_levels=["public", "unlisted", "followers"],
following_only=True,
).exclude(
~Q( # remove everything except
Q(user__followers=user) # user following
| Q(user=user) # is self
| Q(mention_users=user) # mentions user
),
)
class LocalStream(ActivityStream):
""" users you follow """
"""users you follow"""
key = "local"
@ -146,124 +180,372 @@ class LocalStream(ActivityStream):
def get_statuses_for_user(self, user):
# all public statuses by a local user
return privacy_filter(
return models.Status.privacy_filter(
user,
models.Status.objects.select_subclasses().filter(user__local=True),
privacy_levels=["public"],
)
).filter(user__local=True)
class FederatedStream(ActivityStream):
""" users you follow """
class BooksStream(ActivityStream):
"""books on your shelves"""
key = "federated"
key = "books"
def get_audience(self, status):
# this stream wants no part in non-public statuses
if status.privacy != "public":
"""anyone with the mentioned book on their shelves"""
# only show public statuses on the books feed,
# and only statuses that mention books
if status.privacy != "public" or not (
status.mention_books.exists() or hasattr(status, "book")
):
return []
return super().get_audience(status)
def get_statuses_for_user(self, user):
return privacy_filter(
user,
models.Status.objects.select_subclasses(),
privacy_levels=["public"],
work = (
status.book.parent_work
if hasattr(status, "book")
else status.mention_books.first().parent_work
)
audience = super().get_audience(status)
if not audience:
return []
return audience.filter(shelfbook__book__parent_work=work).distinct()
def get_statuses_for_user(self, user):
"""any public status that mentions the user's books"""
books = user.shelfbook_set.values_list(
"book__parent_work__id", flat=True
).distinct()
return (
models.Status.privacy_filter(
user,
privacy_levels=["public"],
)
.filter(
Q(comment__book__parent_work__id__in=books)
| Q(quotation__book__parent_work__id__in=books)
| Q(review__book__parent_work__id__in=books)
| Q(mention_books__parent_work__id__in=books)
)
.distinct()
)
def add_book_statuses(self, user, book):
"""add statuses about a book to a user's feed"""
work = book.parent_work
statuses = (
models.Status.privacy_filter(
user,
privacy_levels=["public"],
)
.filter(
Q(comment__book__parent_work=work)
| Q(quotation__book__parent_work=work)
| Q(review__book__parent_work=work)
| Q(mention_books__parent_work=work)
)
.distinct()
)
self.bulk_add_objects_to_store(statuses, self.stream_id(user))
def remove_book_statuses(self, user, book):
"""add statuses about a book to a user's feed"""
work = book.parent_work
statuses = (
models.Status.privacy_filter(
user,
privacy_levels=["public"],
)
.filter(
Q(comment__book__parent_work=work)
| Q(quotation__book__parent_work=work)
| Q(review__book__parent_work=work)
| Q(mention_books__parent_work=work)
)
.distinct()
)
self.bulk_remove_objects_from_store(statuses, self.stream_id(user))
# determine which streams are enabled in settings.py
streams = {
"home": HomeStream(),
"local": LocalStream(),
"federated": FederatedStream(),
"books": BooksStream(),
}
@receiver(signals.post_save)
# pylint: disable=unused-argument
def add_status_on_create(sender, instance, created, *args, **kwargs):
""" add newly created statuses to activity feeds """
"""add newly created statuses to activity feeds"""
# we're only interested in new statuses
if not issubclass(sender, models.Status):
return
if instance.deleted:
for stream in streams.values():
stream.remove_object_from_related_stores(instance)
remove_status_task.delay(instance.id)
return
if not created:
return
# when creating new things, gotta wait on the transaction
transaction.on_commit(
lambda: add_status_on_create_command(sender, instance, created)
)
# iterates through Home, Local, Federated
for stream in streams.values():
stream.add_status(instance)
def add_status_on_create_command(sender, instance, created):
"""runs this code only after the database commit completes"""
priority = HIGH
# check if this is an old status, de-prioritize if so
# (this will happen if federation is very slow, or, more expectedly, on csv import)
if instance.published_date < timezone.now() - timedelta(
days=1
) or instance.created_date < instance.published_date - timedelta(days=1):
priority = LOW
add_status_task.apply_async(
args=(instance.id,),
kwargs={"increment_unread": created},
queue=priority,
)
if sender == models.Boost:
handle_boost_task.delay(instance.id)
@receiver(signals.post_delete, sender=models.Boost)
# pylint: disable=unused-argument
def remove_boost_on_delete(sender, instance, *args, **kwargs):
""" boosts are deleted """
# we're only interested in new statuses
for stream in streams.values():
stream.remove_object_from_related_stores(instance)
"""boosts are deleted"""
# remove the boost
remove_status_task.delay(instance.id)
# re-add the original status
add_status_task.delay(instance.boosted_status.id)
@receiver(signals.post_save, sender=models.UserFollows)
# pylint: disable=unused-argument
def add_statuses_on_follow(sender, instance, created, *args, **kwargs):
""" add a newly followed user's statuses to feeds """
"""add a newly followed user's statuses to feeds"""
if not created or not instance.user_subject.local:
return
HomeStream().add_user_statuses(instance.user_subject, instance.user_object)
add_user_statuses_task.delay(
instance.user_subject.id, instance.user_object.id, stream_list=["home"]
)
@receiver(signals.post_delete, sender=models.UserFollows)
# pylint: disable=unused-argument
def remove_statuses_on_unfollow(sender, instance, *args, **kwargs):
""" remove statuses from a feed on unfollow """
"""remove statuses from a feed on unfollow"""
if not instance.user_subject.local:
return
HomeStream().remove_user_statuses(instance.user_subject, instance.user_object)
remove_user_statuses_task.delay(
instance.user_subject.id, instance.user_object.id, stream_list=["home"]
)
@receiver(signals.post_save, sender=models.UserBlocks)
# pylint: disable=unused-argument
def remove_statuses_on_block(sender, instance, *args, **kwargs):
""" remove statuses from all feeds on block """
"""remove statuses from all feeds on block"""
# blocks apply ot all feeds
if instance.user_subject.local:
for stream in streams.values():
stream.remove_user_statuses(instance.user_subject, instance.user_object)
remove_user_statuses_task.delay(
instance.user_subject.id, instance.user_object.id
)
# and in both directions
if instance.user_object.local:
for stream in streams.values():
stream.remove_user_statuses(instance.user_object, instance.user_subject)
remove_user_statuses_task.delay(
instance.user_object.id, instance.user_subject.id
)
@receiver(signals.post_delete, sender=models.UserBlocks)
# pylint: disable=unused-argument
def add_statuses_on_unblock(sender, instance, *args, **kwargs):
""" remove statuses from all feeds on block """
public_streams = [LocalStream(), FederatedStream()]
"""add statuses back to all feeds on unblock"""
# make sure there isn't a block in the other direction
if models.UserBlocks.objects.filter(
user_subject=instance.user_object,
user_object=instance.user_subject,
).exists():
return
public_streams = [k for (k, v) in streams.items() if k != "home"]
# add statuses back to streams with statuses from anyone
if instance.user_subject.local:
for stream in public_streams:
stream.add_user_statuses(instance.user_subject, instance.user_object)
add_user_statuses_task.delay(
instance.user_subject.id,
instance.user_object.id,
stream_list=public_streams,
)
# add statuses back to streams with statuses from anyone
if instance.user_object.local:
for stream in public_streams:
stream.add_user_statuses(instance.user_object, instance.user_subject)
add_user_statuses_task.delay(
instance.user_object.id,
instance.user_subject.id,
stream_list=public_streams,
)
@receiver(signals.post_save, sender=models.User)
# pylint: disable=unused-argument
def populate_streams_on_account_create(sender, instance, created, *args, **kwargs):
""" build a user's feeds when they join """
"""build a user's feeds when they join"""
if not created or not instance.local:
return
transaction.on_commit(
lambda: populate_streams_on_account_create_command(instance.id)
)
def populate_streams_on_account_create_command(instance_id):
"""wait for the transaction to complete"""
for stream in streams:
populate_stream_task.delay(stream, instance_id)
@receiver(signals.pre_save, sender=models.ShelfBook)
# pylint: disable=unused-argument
def add_statuses_on_shelve(sender, instance, *args, **kwargs):
"""update books stream when user shelves a book"""
if not instance.user.local:
return
book = instance.book
# check if the book is already on the user's shelves
editions = book.parent_work.editions.all()
if models.ShelfBook.objects.filter(user=instance.user, book__in=editions).exists():
return
add_book_statuses_task.delay(instance.user.id, book.id)
@receiver(signals.post_delete, sender=models.ShelfBook)
# pylint: disable=unused-argument
def remove_statuses_on_unshelve(sender, instance, *args, **kwargs):
"""update books stream when user unshelves a book"""
if not instance.user.local:
return
book = instance.book
# check if the book is actually unshelved, not just moved
editions = book.parent_work.editions.all()
if models.ShelfBook.objects.filter(user=instance.user, book__in=editions).exists():
return
remove_book_statuses_task.delay(instance.user.id, book.id)
# ---- TASKS
@app.task(queue=LOW)
def add_book_statuses_task(user_id, book_id):
"""add statuses related to a book on shelve"""
user = models.User.objects.get(id=user_id)
book = models.Edition.objects.get(id=book_id)
BooksStream().add_book_statuses(user, book)
@app.task(queue=LOW)
def remove_book_statuses_task(user_id, book_id):
"""remove statuses about a book from a user's books feed"""
user = models.User.objects.get(id=user_id)
book = models.Edition.objects.get(id=book_id)
BooksStream().remove_book_statuses(user, book)
@app.task(queue=MEDIUM)
def populate_stream_task(stream, user_id):
"""background task for populating an empty activitystream"""
user = models.User.objects.get(id=user_id)
stream = streams[stream]
stream.populate_streams(user)
@app.task(queue=MEDIUM)
def remove_status_task(status_ids):
"""remove a status from any stream it might be in"""
# this can take an id or a list of ids
if not isinstance(status_ids, list):
status_ids = [status_ids]
statuses = models.Status.objects.filter(id__in=status_ids)
for stream in streams.values():
stream.populate_streams(instance)
for status in statuses:
stream.remove_object_from_related_stores(status)
@app.task(queue=HIGH)
def add_status_task(status_id, increment_unread=False):
"""add a status to any stream it should be in"""
status = models.Status.objects.select_subclasses().get(id=status_id)
# we don't want to tick the unread count for csv import statuses, idk how better
# to check than just to see if the states is more than a few days old
if status.created_date < timezone.now() - timedelta(days=2):
increment_unread = False
for stream in streams.values():
stream.add_status(status, increment_unread=increment_unread)
@app.task(queue=MEDIUM)
def remove_user_statuses_task(viewer_id, user_id, stream_list=None):
"""remove all statuses by a user from a viewer's stream"""
stream_list = [streams[s] for s in stream_list] if stream_list else streams.values()
viewer = models.User.objects.get(id=viewer_id)
user = models.User.objects.get(id=user_id)
for stream in stream_list:
stream.remove_user_statuses(viewer, user)
@app.task(queue=MEDIUM)
def add_user_statuses_task(viewer_id, user_id, stream_list=None):
"""add all statuses by a user to a viewer's stream"""
stream_list = [streams[s] for s in stream_list] if stream_list else streams.values()
viewer = models.User.objects.get(id=viewer_id)
user = models.User.objects.get(id=user_id)
for stream in stream_list:
stream.add_user_statuses(viewer, user)
@app.task(queue=MEDIUM)
def handle_boost_task(boost_id):
"""remove the original post and other, earlier boosts"""
instance = models.Status.objects.get(id=boost_id)
boosted = instance.boost.boosted_status
# previous boosts of this status
old_versions = models.Boost.objects.filter(
boosted_status__id=boosted.id,
created_date__lt=instance.created_date,
)
for stream in streams.values():
# people who should see the boost (not people who see the original status)
audience = stream.get_stores_for_object(instance)
stream.remove_object_from_related_stores(boosted, stores=audience)
for status in old_versions:
stream.remove_object_from_related_stores(status, stores=audience)
def get_status_type(status):
"""return status type even for boosted statuses"""
status_type = status.status_type.lower()
# Check if current status is a boost
if hasattr(status, "boost"):
# Act in accordance of your findings
if hasattr(status.boost.boosted_status, "review"):
status_type = "review"
if hasattr(status.boost.boosted_status, "comment"):
status_type = "comment"
if hasattr(status.boost.boosted_status, "quotation"):
status_type = "quotation"
return status_type

View file

@ -2,7 +2,6 @@
from django.contrib import admin
from bookwyrm import models
admin.site.register(models.SiteSettings)
admin.site.register(models.User)
admin.site.register(models.FederatedServer)
admin.site.register(models.Connector)

54
bookwyrm/apps.py Normal file
View file

@ -0,0 +1,54 @@
"""Do further startup configuration and initialization"""
import os
import urllib
import logging
from django.apps import AppConfig
from bookwyrm import settings
logger = logging.getLogger(__name__)
def download_file(url, destination):
"""Downloads a file to the given path"""
try:
# Ensure our destination directory exists
os.makedirs(os.path.dirname(destination))
with urllib.request.urlopen(url) as stream:
with open(destination, "b+w") as outfile:
outfile.write(stream.read())
except (urllib.error.HTTPError, urllib.error.URLError):
logger.info("Failed to download file %s", url)
except OSError:
logger.info("Couldn't open font file %s for writing", destination)
except: # pylint: disable=bare-except
logger.info("Unknown error in file download")
class BookwyrmConfig(AppConfig):
"""Handles additional configuration"""
name = "bookwyrm"
verbose_name = "BookWyrm"
# pylint: disable=no-self-use
def ready(self):
"""set up OTLP and preview image files, if desired"""
if settings.OTEL_EXPORTER_OTLP_ENDPOINT:
# pylint: disable=import-outside-toplevel
from bookwyrm.telemetry import open_telemetry
open_telemetry.instrumentDjango()
if settings.ENABLE_PREVIEW_IMAGES and settings.FONTS:
# Download any fonts that we don't have yet
logger.debug("Downloading fonts..")
for name, config in settings.FONTS.items():
font_path = os.path.join(
settings.FONT_DIR, config["directory"], config["filename"]
)
if "url" in config and not os.path.exists(font_path):
logger.info("Just a sec, downloading %s", name)
download_file(config["url"], font_path)

159
bookwyrm/book_search.py Normal file
View file

@ -0,0 +1,159 @@
""" using a bookwyrm instance as a source of book data """
from dataclasses import asdict, dataclass
from functools import reduce
import operator
from django.contrib.postgres.search import SearchRank, SearchQuery
from django.db.models import OuterRef, Subquery, F, Q
from bookwyrm import models
from bookwyrm.settings import MEDIA_FULL_URL
# pylint: disable=arguments-differ
def search(query, min_confidence=0, filters=None, return_first=False):
"""search your local database"""
filters = filters or []
if not query:
return []
# first, try searching unqiue identifiers
results = search_identifiers(query, *filters, return_first=return_first)
if not results:
# then try searching title/author
results = search_title_author(
query, min_confidence, *filters, return_first=return_first
)
return results
def isbn_search(query):
"""search your local database"""
if not query:
return []
filters = [{f: query} for f in ["isbn_10", "isbn_13"]]
results = models.Edition.objects.filter(
reduce(operator.or_, (Q(**f) for f in filters))
).distinct()
# when there are multiple editions of the same work, pick the default.
# it would be odd for this to happen.
default_editions = models.Edition.objects.filter(
parent_work=OuterRef("parent_work")
).order_by("-edition_rank")
results = (
results.annotate(default_id=Subquery(default_editions.values("id")[:1])).filter(
default_id=F("id")
)
or results
)
return results
def format_search_result(search_result):
"""convert a book object into a search result object"""
cover = None
if search_result.cover:
cover = f"{MEDIA_FULL_URL}{search_result.cover}"
return SearchResult(
title=search_result.title,
key=search_result.remote_id,
author=search_result.author_text,
year=search_result.published_date.year
if search_result.published_date
else None,
cover=cover,
confidence=search_result.rank if hasattr(search_result, "rank") else 1,
connector="",
).json()
def search_identifiers(query, *filters, return_first=False):
"""tries remote_id, isbn; defined as dedupe fields on the model"""
# pylint: disable=W0212
or_filters = [
{f.name: query}
for f in models.Edition._meta.get_fields()
if hasattr(f, "deduplication_field") and f.deduplication_field
]
results = models.Edition.objects.filter(
*filters, reduce(operator.or_, (Q(**f) for f in or_filters))
).distinct()
if results.count() <= 1:
if return_first:
return results.first()
return results
# when there are multiple editions of the same work, pick the default.
# it would be odd for this to happen.
default_editions = models.Edition.objects.filter(
parent_work=OuterRef("parent_work")
).order_by("-edition_rank")
results = (
results.annotate(default_id=Subquery(default_editions.values("id")[:1])).filter(
default_id=F("id")
)
or results
)
if return_first:
return results.first()
return results
def search_title_author(query, min_confidence, *filters, return_first=False):
"""searches for title and author"""
query = SearchQuery(query, config="simple") | SearchQuery(query, config="english")
results = (
models.Edition.objects.filter(*filters, search_vector=query)
.annotate(rank=SearchRank(F("search_vector"), query))
.filter(rank__gt=min_confidence)
.order_by("-rank")
)
# when there are multiple editions of the same work, pick the closest
editions_of_work = results.values("parent_work__id").values_list("parent_work__id")
# filter out multiple editions of the same work
list_results = []
for work_id in set(editions_of_work):
editions = results.filter(parent_work=work_id)
default = editions.order_by("-edition_rank").first()
default_rank = default.rank if default else 0
# if mutliple books have the top rank, pick the default edition
if default_rank == editions.first().rank:
result = default
else:
result = editions.first()
if return_first:
return result
list_results.append(result)
return list_results
@dataclass
class SearchResult:
"""standardized search result object"""
title: str
key: str
connector: object
view_link: str = None
author: str = None
year: str = None
cover: str = None
confidence: int = 1
def __repr__(self):
# pylint: disable=consider-using-f-string
return "<SearchResult key={!r} title={!r} author={!r} confidence={!r}>".format(
self.key, self.title, self.author, self.confidence
)
def json(self):
"""serialize a connector for json response"""
serialized = asdict(self)
del serialized["connector"]
return serialized

View file

@ -3,4 +3,4 @@ from .settings import CONNECTORS
from .abstract_connector import ConnectorException
from .abstract_connector import get_data, get_image
from .connector_manager import search, local_search, first_search_result
from .connector_manager import search, first_search_result

View file

@ -1,22 +1,24 @@
""" functionality outline for a book data connector """
from abc import ABC, abstractmethod
from dataclasses import asdict, dataclass
import imghdr
import logging
from urllib3.exceptions import RequestError
import re
from django.core.files.base import ContentFile
from django.db import transaction
import requests
from requests.exceptions import SSLError
from requests.exceptions import RequestException
from bookwyrm import activitypub, models, settings
from .connector_manager import load_more_data, ConnectorException
from .connector_manager import load_more_data, ConnectorException, raise_not_valid_url
from .format_mappings import format_mappings
logger = logging.getLogger(__name__)
class AbstractMinimalConnector(ABC):
""" just the bare bones, for other bookwyrm instances """
"""just the bare bones, for other bookwyrm instances"""
def __init__(self, identifier):
# load connector settings
@ -30,67 +32,43 @@ class AbstractMinimalConnector(ABC):
"covers_url",
"search_url",
"isbn_search_url",
"max_query_count",
"name",
"identifier",
"local",
]
for field in self_fields:
setattr(self, field, getattr(info, field))
def search(self, query, min_confidence=None):
""" free text search """
params = {}
if min_confidence:
params["min_confidence"] = min_confidence
def get_search_url(self, query):
"""format the query url"""
# Check if the query resembles an ISBN
if maybe_isbn(query) and self.isbn_search_url and self.isbn_search_url != "":
return f"{self.isbn_search_url}{query}"
data = get_data(
"%s%s" % (self.search_url, query),
params=params,
)
results = []
# NOTE: previously, we tried searching isbn and if that produces no results,
# searched as free text. This, instead, only searches isbn if it's isbn-y
return f"{self.search_url}{query}"
for doc in self.parse_search_data(data)[:10]:
results.append(self.format_search_result(doc))
return results
def isbn_search(self, query):
""" isbn search """
params = {}
data = get_data(
"%s%s" % (self.isbn_search_url, query),
params=params,
)
results = []
# this shouldn't be returning mutliple results, but just in case
for doc in self.parse_isbn_search_data(data)[:10]:
results.append(self.format_isbn_search_result(doc))
return results
def process_search_response(self, query, data, min_confidence):
"""Format the search results based on the formt of the query"""
if maybe_isbn(query):
return list(self.parse_isbn_search_data(data))[:10]
return list(self.parse_search_data(data, min_confidence))[:10]
@abstractmethod
def get_or_create_book(self, remote_id):
""" pull up a book record by whatever means possible """
"""pull up a book record by whatever means possible"""
@abstractmethod
def parse_search_data(self, data):
""" turn the result json from a search into a list """
@abstractmethod
def format_search_result(self, search_result):
""" create a SearchResult obj from json """
def parse_search_data(self, data, min_confidence):
"""turn the result json from a search into a list"""
@abstractmethod
def parse_isbn_search_data(self, data):
""" turn the result json from a search into a list """
@abstractmethod
def format_isbn_search_result(self, search_result):
""" create a SearchResult obj from json """
"""turn the result json from a search into a list"""
class AbstractConnector(AbstractMinimalConnector):
""" generic book data connector """
"""generic book data connector"""
def __init__(self, identifier):
super().__init__(identifier)
@ -98,27 +76,19 @@ class AbstractConnector(AbstractMinimalConnector):
# title we handle separately.
self.book_mappings = []
def is_available(self):
""" check if you're allowed to use this connector """
if self.max_query_count is not None:
if self.connector.query_count >= self.max_query_count:
return False
return True
def get_or_create_book(self, remote_id):
""" translate arbitrary json into an Activitypub dataclass """
"""translate arbitrary json into an Activitypub dataclass"""
# first, check if we have the origin_id saved
existing = models.Edition.find_existing_by_remote_id(
remote_id
) or models.Work.find_existing_by_remote_id(remote_id)
if existing:
if hasattr(existing, "get_default_editon"):
return existing.get_default_editon()
if hasattr(existing, "default_edition"):
return existing.default_edition
return existing
# load the json
data = get_data(remote_id)
mapped_data = dict_from_mappings(data, self.book_mappings)
# load the json data from the remote data source
data = self.get_book_data(remote_id)
if self.is_work_data(data):
try:
edition_data = self.get_edition_from_work_data(data)
@ -126,57 +96,69 @@ class AbstractConnector(AbstractMinimalConnector):
# hack: re-use the work data as the edition data
# this is why remote ids aren't necessarily unique
edition_data = data
work_data = mapped_data
work_data = data
else:
edition_data = data
try:
work_data = self.get_work_from_edition_data(data)
work_data = dict_from_mappings(work_data, self.book_mappings)
except (KeyError, ConnectorException):
work_data = mapped_data
edition_data = data
except (KeyError, ConnectorException) as err:
logger.info(err)
work_data = data
if not work_data or not edition_data:
raise ConnectorException("Unable to load book data: %s" % remote_id)
raise ConnectorException(f"Unable to load book data: {remote_id}")
with transaction.atomic():
# create activitypub object
work_activity = activitypub.Work(**work_data)
work_activity = activitypub.Work(
**dict_from_mappings(work_data, self.book_mappings)
)
# this will dedupe automatically
work = work_activity.to_model(model=models.Work)
for author in self.get_authors_from_data(data):
work = work_activity.to_model(model=models.Work, overwrite=False)
for author in self.get_authors_from_data(work_data):
work.authors.add(author)
edition = self.create_edition_from_data(work, edition_data)
load_more_data.delay(self.connector.id, work.id)
return edition
def create_edition_from_data(self, work, edition_data):
""" if we already have the work, we're ready """
def get_book_data(self, remote_id): # pylint: disable=no-self-use
"""this allows connectors to override the default behavior"""
return get_data(remote_id)
def create_edition_from_data(self, work, edition_data, instance=None):
"""if we already have the work, we're ready"""
mapped_data = dict_from_mappings(edition_data, self.book_mappings)
mapped_data["work"] = work.remote_id
edition_activity = activitypub.Edition(**mapped_data)
edition = edition_activity.to_model(model=models.Edition)
edition.connector = self.connector
edition.save()
edition = edition_activity.to_model(
model=models.Edition, overwrite=False, instance=instance
)
if not work.default_edition:
work.default_edition = edition
work.save()
# if we're updating an existing instance, we don't need to load authors
if instance:
return edition
if not edition.connector:
edition.connector = self.connector
edition.save(broadcast=False, update_fields=["connector"])
for author in self.get_authors_from_data(edition_data):
edition.authors.add(author)
# use the authors from the work if none are found for the edition
if not edition.authors.exists() and work.authors.exists():
edition.authors.set(work.authors.all())
return edition
def get_or_create_author(self, remote_id):
""" load that author """
existing = models.Author.find_existing_by_remote_id(remote_id)
if existing:
return existing
def get_or_create_author(self, remote_id, instance=None):
"""load that author"""
if not instance:
existing = models.Author.find_existing_by_remote_id(remote_id)
if existing:
return existing
data = get_data(remote_id)
data = self.get_book_data(remote_id)
mapped_data = dict_from_mappings(data, self.author_mappings)
try:
@ -185,27 +167,44 @@ class AbstractConnector(AbstractMinimalConnector):
return None
# this will dedupe
return activity.to_model(model=models.Author)
return activity.to_model(
model=models.Author, overwrite=False, instance=instance
)
def get_remote_id_from_model(self, obj):
"""given the data stored, how can we look this up"""
return getattr(obj, getattr(self, "generated_remote_link_field"))
def update_author_from_remote(self, obj):
"""load the remote data from this connector and add it to an existing author"""
remote_id = self.get_remote_id_from_model(obj)
return self.get_or_create_author(remote_id, instance=obj)
def update_book_from_remote(self, obj):
"""load the remote data from this connector and add it to an existing book"""
remote_id = self.get_remote_id_from_model(obj)
data = self.get_book_data(remote_id)
return self.create_edition_from_data(obj.parent_work, data, instance=obj)
@abstractmethod
def is_work_data(self, data):
""" differentiate works and editions """
"""differentiate works and editions"""
@abstractmethod
def get_edition_from_work_data(self, data):
""" every work needs at least one edition """
"""every work needs at least one edition"""
@abstractmethod
def get_work_from_edition_data(self, data):
""" every edition needs a work """
"""every edition needs a work"""
@abstractmethod
def get_authors_from_data(self, data):
""" load author data """
"""load author data"""
@abstractmethod
def expand_book_data(self, book):
""" get more info on a book """
"""get more info on a book"""
def dict_from_mappings(data, mappings):
@ -213,85 +212,75 @@ def dict_from_mappings(data, mappings):
the subclass"""
result = {}
for mapping in mappings:
# sometimes there are multiple mappings for one field, don't
# overwrite earlier writes in that case
if mapping.local_field in result and result[mapping.local_field]:
continue
result[mapping.local_field] = mapping.get_value(data)
return result
def get_data(url, params=None):
""" wrapper for request.get """
def get_data(url, params=None, timeout=10):
"""wrapper for request.get"""
# check if the url is blocked
if models.FederatedServer.is_blocked(url):
raise ConnectorException(
"Attempting to load data from blocked url: {:s}".format(url)
)
raise_not_valid_url(url)
try:
resp = requests.get(
url,
params=params,
headers={
"Accept": "application/json; charset=utf-8",
headers={ # pylint: disable=line-too-long
"Accept": (
'application/json, application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"; charset=utf-8'
),
"User-Agent": settings.USER_AGENT,
},
timeout=timeout,
)
except (RequestError, SSLError, ConnectionError) as e:
logger.exception(e)
raise ConnectorException()
except RequestException as err:
logger.info(err)
raise ConnectorException(err)
if not resp.ok:
raise ConnectorException()
try:
data = resp.json()
except ValueError as e:
logger.exception(e)
raise ConnectorException()
except ValueError as err:
logger.info(err)
raise ConnectorException(err)
return data
def get_image(url):
""" wrapper for requesting an image """
def get_image(url, timeout=10):
"""wrapper for requesting an image"""
raise_not_valid_url(url)
try:
resp = requests.get(
url,
headers={
"User-Agent": settings.USER_AGENT,
},
timeout=timeout,
)
except (RequestError, SSLError) as e:
logger.exception(e)
return None
except RequestException as err:
logger.info(err)
return None, None
if not resp.ok:
return None
return resp
return None, None
image_content = ContentFile(resp.content)
extension = imghdr.what(None, image_content.read())
if not extension:
logger.info("File requested was not an image: %s", url)
return None, None
@dataclass
class SearchResult:
""" standardized search result object """
title: str
key: str
connector: object
author: str = None
year: str = None
cover: str = None
confidence: int = 1
def __repr__(self):
return "<SearchResult key={!r} title={!r} author={!r}>".format(
self.key, self.title, self.author
)
def json(self):
""" serialize a connector for json response """
serialized = asdict(self)
del serialized["connector"]
return serialized
return image_content, extension
class Mapping:
""" associate a local database field with a field in an external dataset """
"""associate a local database field with a field in an external dataset"""
def __init__(self, local_field, remote_field=None, formatter=None):
noop = lambda x: x
@ -301,7 +290,7 @@ class Mapping:
self.formatter = formatter or noop
def get_value(self, data):
""" pull a field from incoming json and return the formatted version """
"""pull a field from incoming json and return the formatted version"""
value = data.get(self.remote_field)
if not value:
return None
@ -309,3 +298,31 @@ class Mapping:
return self.formatter(value)
except: # pylint: disable=bare-except
return None
def infer_physical_format(format_text):
"""try to figure out what the standardized format is from the free value"""
format_text = format_text.lower()
if format_text in format_mappings:
# try a direct match
return format_mappings[format_text]
# failing that, try substring
matches = [v for k, v in format_mappings.items() if k in format_text]
if not matches:
return None
return matches[0]
def unique_physical_format(format_text):
"""only store the format if it isn't diretly in the format mappings"""
format_text = format_text.lower()
if format_text in format_mappings:
# try a direct match, so saving this would be redundant
return None
return format_text
def maybe_isbn(query):
"""check if a query looks like an isbn"""
isbn = re.sub(r"[\W_]", "", query) # removes filler characters
return len(isbn) in [10, 13] # ISBN10 or ISBN13

View file

@ -1,27 +1,21 @@
""" using another bookwyrm instance as a source of book data """
from bookwyrm import activitypub, models
from .abstract_connector import AbstractMinimalConnector, SearchResult
from bookwyrm.book_search import SearchResult
from .abstract_connector import AbstractMinimalConnector
class Connector(AbstractMinimalConnector):
""" this is basically just for search """
"""this is basically just for search"""
def get_or_create_book(self, remote_id):
edition = activitypub.resolve_remote_id(remote_id, model=models.Edition)
work = edition.parent_work
work.default_edition = work.get_default_edition()
work.save()
return edition
return activitypub.resolve_remote_id(remote_id, model=models.Edition)
def parse_search_data(self, data):
return data
def format_search_result(self, search_result):
search_result["connector"] = self
return SearchResult(**search_result)
def parse_search_data(self, data, min_confidence):
for search_result in data:
search_result["connector"] = self
yield SearchResult(**search_result)
def parse_isbn_search_data(self, data):
return data
def format_isbn_search_result(self, search_result):
return self.format_search_result(search_result)
for search_result in data:
search_result["connector"] = self
yield SearchResult(**search_result)

View file

@ -1,101 +1,127 @@
""" interface with whatever connectors the app has """
import asyncio
import importlib
import ipaddress
import logging
import re
from urllib.parse import urlparse
import aiohttp
from django.dispatch import receiver
from django.db.models import signals
from requests import HTTPError
from bookwyrm import models
from bookwyrm import book_search, models
from bookwyrm.settings import SEARCH_TIMEOUT, USER_AGENT
from bookwyrm.tasks import app
logger = logging.getLogger(__name__)
class ConnectorException(HTTPError):
""" when the connector can't do what was asked """
"""when the connector can't do what was asked"""
def search(query, min_confidence=0.1):
""" find books based on arbitary keywords """
async def get_results(session, url, min_confidence, query, connector):
"""try this specific connector"""
# pylint: disable=line-too-long
headers = {
"Accept": (
'application/json, application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"; charset=utf-8'
),
"User-Agent": USER_AGENT,
}
params = {"min_confidence": min_confidence}
try:
async with session.get(url, headers=headers, params=params) as response:
if not response.ok:
logger.info("Unable to connect to %s: %s", url, response.reason)
return
try:
raw_data = await response.json()
except aiohttp.client_exceptions.ContentTypeError as err:
logger.exception(err)
return
return {
"connector": connector,
"results": connector.process_search_response(
query, raw_data, min_confidence
),
}
except asyncio.TimeoutError:
logger.info("Connection timed out for url: %s", url)
except aiohttp.ClientError as err:
logger.exception(err)
async def async_connector_search(query, items, min_confidence):
"""Try a number of requests simultaneously"""
timeout = aiohttp.ClientTimeout(total=SEARCH_TIMEOUT)
async with aiohttp.ClientSession(timeout=timeout) as session:
tasks = []
for url, connector in items:
tasks.append(
asyncio.ensure_future(
get_results(session, url, min_confidence, query, connector)
)
)
results = await asyncio.gather(*tasks)
return results
def search(query, min_confidence=0.1, return_first=False):
"""find books based on arbitary keywords"""
if not query:
return []
results = []
# Have we got a ISBN ?
isbn = re.sub(r"[\W_]", "", query)
maybe_isbn = len(isbn) in [10, 13] # ISBN10 or ISBN13
dedup_slug = lambda r: "%s/%s/%s" % (r.title, r.author, r.year)
result_index = set()
items = []
for connector in get_connectors():
result_set = None
if maybe_isbn:
# Search on ISBN
if not connector.isbn_search_url or connector.isbn_search_url == "":
result_set = []
else:
try:
result_set = connector.isbn_search(isbn)
except Exception as e: # pylint: disable=broad-except
logger.exception(e)
continue
# get the search url from the connector before sending
url = connector.get_search_url(query)
try:
raise_not_valid_url(url)
except ConnectorException:
# if this URL is invalid we should skip it and move on
logger.info("Request denied to blocked domain: %s", url)
continue
items.append((url, connector))
# if no isbn search or results, we fallback to generic search
if result_set in (None, []):
try:
result_set = connector.search(query, min_confidence=min_confidence)
except Exception as e: # pylint: disable=broad-except
# we don't want *any* error to crash the whole search page
logger.exception(e)
continue
# load as many results as we can
results = asyncio.run(async_connector_search(query, items, min_confidence))
results = [r for r in results if r]
# if the search results look the same, ignore them
result_set = [r for r in result_set if dedup_slug(r) not in result_index]
# `|=` concats two sets. WE ARE GETTING FANCY HERE
result_index |= set(dedup_slug(r) for r in result_set)
results.append(
{
"connector": connector,
"results": result_set,
}
)
if return_first:
# find the best result from all the responses and return that
all_results = [r for con in results for r in con["results"]]
all_results = sorted(all_results, key=lambda r: r.confidence, reverse=True)
return all_results[0] if all_results else None
# failed requests will return None, so filter those out
return results
def local_search(query, min_confidence=0.1, raw=False):
""" only look at local search results """
connector = load_connector(models.Connector.objects.get(local=True))
return connector.search(query, min_confidence=min_confidence, raw=raw)
def isbn_local_search(query, raw=False):
""" only look at local search results """
connector = load_connector(models.Connector.objects.get(local=True))
return connector.isbn_search(query, raw=raw)
def first_search_result(query, min_confidence=0.1):
""" search until you find a result that fits """
for connector in get_connectors():
result = connector.search(query, min_confidence=min_confidence)
if result:
return result[0]
return None
"""search until you find a result that fits"""
# try local search first
result = book_search.search(query, min_confidence=min_confidence, return_first=True)
if result:
return result
# otherwise, try remote endpoints
return search(query, min_confidence=min_confidence, return_first=True) or None
def get_connectors():
""" load all connectors """
for info in models.Connector.objects.order_by("priority").all():
"""load all connectors"""
for info in models.Connector.objects.filter(active=True).order_by("priority").all():
yield load_connector(info)
def get_or_create_connector(remote_id):
""" get the connector related to the object's server """
"""get the connector related to the object's server"""
url = urlparse(remote_id)
identifier = url.netloc
if not identifier:
@ -107,19 +133,19 @@ def get_or_create_connector(remote_id):
connector_info = models.Connector.objects.create(
identifier=identifier,
connector_file="bookwyrm_connector",
base_url="https://%s" % identifier,
books_url="https://%s/book" % identifier,
covers_url="https://%s/images/covers" % identifier,
search_url="https://%s/search?q=" % identifier,
base_url=f"https://{identifier}",
books_url=f"https://{identifier}/book",
covers_url=f"https://{identifier}/images/covers",
search_url=f"https://{identifier}/search?q=",
priority=2,
)
return load_connector(connector_info)
@app.task
@app.task(queue="low_priority")
def load_more_data(connector_id, book_id):
""" background the work of getting all 10,000 editions of LoTR """
"""background the work of getting all 10,000 editions of LoTR"""
connector_info = models.Connector.objects.get(id=connector_id)
connector = load_connector(connector_info)
book = models.Book.objects.select_subclasses().get(id=book_id)
@ -127,9 +153,9 @@ def load_more_data(connector_id, book_id):
def load_connector(connector_info):
""" instantiate the connector class """
"""instantiate the connector class"""
connector = importlib.import_module(
"bookwyrm.connectors.%s" % connector_info.connector_file
f"bookwyrm.connectors.{connector_info.connector_file}"
)
return connector.Connector(connector_info.identifier)
@ -137,6 +163,23 @@ def load_connector(connector_info):
@receiver(signals.post_save, sender="bookwyrm.FederatedServer")
# pylint: disable=unused-argument
def create_connector(sender, instance, created, *args, **kwargs):
""" create a connector to an external bookwyrm server """
"""create a connector to an external bookwyrm server"""
if instance.application_type == "bookwyrm":
get_or_create_connector("https://{:s}".format(instance.server_name))
get_or_create_connector(f"https://{instance.server_name}")
def raise_not_valid_url(url):
"""do some basic reality checks on the url"""
parsed = urlparse(url)
if not parsed.scheme in ["http", "https"]:
raise ConnectorException("Invalid scheme: ", url)
try:
ipaddress.ip_address(parsed.netloc)
raise ConnectorException("Provided url is an IP address: ", url)
except ValueError:
# it's not an IP address, which is good
pass
if models.FederatedServer.is_blocked(url):
raise ConnectorException(f"Attempting to load data from blocked url: {url}")

View file

@ -0,0 +1,43 @@
""" comparing a free text format to the standardized one """
format_mappings = {
"paperback": "Paperback",
"soft": "Paperback",
"pamphlet": "Paperback",
"peperback": "Paperback",
"tapa blanda": "Paperback",
"turtleback": "Paperback",
"pocket": "Paperback",
"spiral": "Paperback",
"ring": "Paperback",
"平装": "Paperback",
"简装": "Paperback",
"hardcover": "Hardcover",
"hardcocer": "Hardcover",
"hardover": "Hardcover",
"hardback": "Hardcover",
"library": "Hardcover",
"tapa dura": "Hardcover",
"leather": "Hardcover",
"clothbound": "Hardcover",
"精装": "Hardcover",
"ebook": "EBook",
"e-book": "EBook",
"digital": "EBook",
"computer file": "EBook",
"epub": "EBook",
"online": "EBook",
"pdf": "EBook",
"elektronische": "EBook",
"electronic": "EBook",
"audiobook": "AudiobookFormat",
"audio": "AudiobookFormat",
"cd": "AudiobookFormat",
"dvd": "AudiobookFormat",
"mp3": "AudiobookFormat",
"cassette": "AudiobookFormat",
"kindle": "AudiobookFormat",
"talking": "AudiobookFormat",
"sound": "AudiobookFormat",
"comic": "GraphicNovel",
"graphic": "GraphicNovel",
}

View file

@ -0,0 +1,216 @@
""" inventaire data connector """
import re
from bookwyrm import models
from bookwyrm.book_search import SearchResult
from .abstract_connector import AbstractConnector, Mapping
from .abstract_connector import get_data
from .connector_manager import ConnectorException
class Connector(AbstractConnector):
"""instantiate a connector for inventaire"""
generated_remote_link_field = "inventaire_id"
def __init__(self, identifier):
super().__init__(identifier)
get_first = lambda a: a[0]
shared_mappings = [
Mapping("id", remote_field="uri", formatter=self.get_remote_id),
Mapping("bnfId", remote_field="wdt:P268", formatter=get_first),
Mapping("openlibraryKey", remote_field="wdt:P648", formatter=get_first),
]
self.book_mappings = [
Mapping("title", remote_field="wdt:P1476", formatter=get_first),
Mapping("title", remote_field="labels", formatter=get_language_code),
Mapping("subtitle", remote_field="wdt:P1680", formatter=get_first),
Mapping("inventaireId", remote_field="uri"),
Mapping(
"description", remote_field="sitelinks", formatter=self.get_description
),
Mapping("cover", remote_field="image", formatter=self.get_cover_url),
Mapping("isbn13", remote_field="wdt:P212", formatter=get_first),
Mapping("isbn10", remote_field="wdt:P957", formatter=get_first),
Mapping("oclcNumber", remote_field="wdt:P5331", formatter=get_first),
Mapping("goodreadsKey", remote_field="wdt:P2969", formatter=get_first),
Mapping("librarythingKey", remote_field="wdt:P1085", formatter=get_first),
Mapping("languages", remote_field="wdt:P407", formatter=self.resolve_keys),
Mapping("publishers", remote_field="wdt:P123", formatter=self.resolve_keys),
Mapping("publishedDate", remote_field="wdt:P577", formatter=get_first),
Mapping("pages", remote_field="wdt:P1104", formatter=get_first),
Mapping(
"subjectPlaces", remote_field="wdt:P840", formatter=self.resolve_keys
),
Mapping("subjects", remote_field="wdt:P921", formatter=self.resolve_keys),
Mapping("asin", remote_field="wdt:P5749", formatter=get_first),
] + shared_mappings
# TODO: P136: genre, P674 characters, P950 bne
self.author_mappings = [
Mapping("id", remote_field="uri", formatter=self.get_remote_id),
Mapping("name", remote_field="labels", formatter=get_language_code),
Mapping("bio", remote_field="sitelinks", formatter=self.get_description),
Mapping("goodreadsKey", remote_field="wdt:P2963", formatter=get_first),
Mapping("isni", remote_field="wdt:P213", formatter=get_first),
Mapping("viafId", remote_field="wdt:P214", formatter=get_first),
Mapping("gutenberg_id", remote_field="wdt:P1938", formatter=get_first),
Mapping("born", remote_field="wdt:P569", formatter=get_first),
Mapping("died", remote_field="wdt:P570", formatter=get_first),
] + shared_mappings
def get_remote_id(self, value):
"""convert an id/uri into a url"""
return f"{self.books_url}?action=by-uris&uris={value}"
def get_book_data(self, remote_id):
data = get_data(remote_id)
extracted = list(data.get("entities").values())
try:
data = extracted[0]
except (KeyError, IndexError):
raise ConnectorException("Invalid book data")
# flatten the data so that images, uri, and claims are on the same level
return {
**data.get("claims", {}),
**{k: data.get(k) for k in ["uri", "image", "labels", "sitelinks", "type"]},
}
def parse_search_data(self, data, min_confidence):
for search_result in data.get("results", []):
images = search_result.get("image")
cover = f"{self.covers_url}/img/entities/{images[0]}" if images else None
# a deeply messy translation of inventaire's scores
confidence = float(search_result.get("_score", 0.1))
confidence = 0.1 if confidence < 150 else 0.999
if confidence < min_confidence:
continue
yield SearchResult(
title=search_result.get("label"),
key=self.get_remote_id(search_result.get("uri")),
author=search_result.get("description"),
view_link=f"{self.base_url}/entity/{search_result.get('uri')}",
cover=cover,
confidence=confidence,
connector=self,
)
def parse_isbn_search_data(self, data):
"""got some daaaata"""
results = data.get("entities")
if not results:
return
for search_result in list(results.values()):
title = search_result.get("claims", {}).get("wdt:P1476", [])
if not title:
continue
yield SearchResult(
title=title[0],
key=self.get_remote_id(search_result.get("uri")),
author=search_result.get("description"),
view_link=f"{self.base_url}/entity/{search_result.get('uri')}",
cover=self.get_cover_url(search_result.get("image")),
connector=self,
)
def is_work_data(self, data):
return data.get("type") == "work"
def load_edition_data(self, work_uri):
"""get a list of editions for a work"""
# pylint: disable=line-too-long
url = f"{self.books_url}?action=reverse-claims&property=wdt:P629&value={work_uri}&sort=true"
return get_data(url)
def get_edition_from_work_data(self, data):
data = self.load_edition_data(data.get("uri"))
try:
uri = data.get("uris", [])[0]
except IndexError:
raise ConnectorException("Invalid book data")
return self.get_book_data(self.get_remote_id(uri))
def get_work_from_edition_data(self, data):
uri = data.get("wdt:P629", [None])[0]
if not uri:
raise ConnectorException("Invalid book data")
return self.get_book_data(self.get_remote_id(uri))
def get_authors_from_data(self, data):
authors = data.get("wdt:P50", [])
for author in authors:
yield self.get_or_create_author(self.get_remote_id(author))
def expand_book_data(self, book):
work = book
# go from the edition to the work, if necessary
if isinstance(book, models.Edition):
work = book.parent_work
try:
edition_options = self.load_edition_data(work.inventaire_id)
except ConnectorException:
# who knows, man
return
for edition_uri in edition_options.get("uris"):
remote_id = self.get_remote_id(edition_uri)
try:
data = self.get_book_data(remote_id)
except ConnectorException:
# who, indeed, knows
continue
self.create_edition_from_data(work, data)
def get_cover_url(self, cover_blob, *_):
"""format the relative cover url into an absolute one:
{"url": "/img/entities/e794783f01b9d4f897a1ea9820b96e00d346994f"}
"""
# covers may or may not be a list
if isinstance(cover_blob, list) and len(cover_blob) > 0:
cover_blob = cover_blob[0]
cover_id = cover_blob.get("url")
if not cover_id:
return None
# cover may or may not be an absolute url already
if re.match(r"^http", cover_id):
return cover_id
return f"{self.covers_url}{cover_id}"
def resolve_keys(self, keys):
"""cool, it's "wd:Q3156592" now what the heck does that mean"""
results = []
for uri in keys:
try:
data = self.get_book_data(self.get_remote_id(uri))
except ConnectorException:
continue
results.append(get_language_code(data.get("labels")))
return results
def get_description(self, links):
"""grab an extracted excerpt from wikipedia"""
link = links.get("enwiki")
if not link:
return ""
url = f"{self.base_url}/api/data?action=wp-extract&lang=en&title={link}"
try:
data = get_data(url)
except ConnectorException:
return ""
return data.get("extract")
def get_remote_id_from_model(self, obj):
"""use get_remote_id to figure out the link from a model obj"""
remote_id_value = obj.inventaire_id
return self.get_remote_id(remote_id_value)
def get_language_code(options, code="en"):
"""when there are a bunch of translation but we need a single field"""
result = options.get(code)
if result:
return result
values = list(options.values())
return values[0] if values else None

View file

@ -2,20 +2,23 @@
import re
from bookwyrm import models
from .abstract_connector import AbstractConnector, SearchResult, Mapping
from .abstract_connector import get_data
from bookwyrm.book_search import SearchResult
from .abstract_connector import AbstractConnector, Mapping
from .abstract_connector import get_data, infer_physical_format, unique_physical_format
from .connector_manager import ConnectorException
from .openlibrary_languages import languages
class Connector(AbstractConnector):
""" instantiate a connector for OL """
"""instantiate a connector for OL"""
generated_remote_link_field = "openlibrary_link"
def __init__(self, identifier):
super().__init__(identifier)
get_first = lambda a: a[0]
get_remote_id = lambda a: self.base_url + a
get_first = lambda a, *args: a[0]
get_remote_id = lambda a, *args: self.base_url + a
self.book_mappings = [
Mapping("title"),
Mapping("id", remote_field="key", formatter=get_remote_id),
@ -43,7 +46,16 @@ class Connector(AbstractConnector):
),
Mapping("publishedDate", remote_field="publish_date"),
Mapping("pages", remote_field="number_of_pages"),
Mapping("physicalFormat", remote_field="physical_format"),
Mapping(
"physicalFormat",
remote_field="physical_format",
formatter=infer_physical_format,
),
Mapping(
"physicalFormatDetail",
remote_field="physical_format",
formatter=unique_physical_format,
),
Mapping("publishers"),
]
@ -56,15 +68,46 @@ class Connector(AbstractConnector):
Mapping("born", remote_field="birth_date"),
Mapping("died", remote_field="death_date"),
Mapping("bio", formatter=get_description),
Mapping(
"isni",
remote_field="remote_ids",
formatter=lambda b: get_dict_field(b, "isni"),
),
Mapping(
"asin",
remote_field="remote_ids",
formatter=lambda b: get_dict_field(b, "amazon"),
),
Mapping(
"viaf",
remote_field="remote_ids",
formatter=lambda b: get_dict_field(b, "viaf"),
),
Mapping(
"wikidata",
remote_field="remote_ids",
formatter=lambda b: get_dict_field(b, "wikidata"),
),
Mapping(
"wikipedia_link", remote_field="links", formatter=get_wikipedia_link
),
Mapping("inventaire_id", remote_field="links", formatter=get_inventaire_id),
]
def get_book_data(self, remote_id):
data = get_data(remote_id)
if data.get("type", {}).get("key") == "/type/redirect":
remote_id = self.base_url + data.get("location")
return get_data(remote_id)
return data
def get_remote_id_from_data(self, data):
""" format a url from an openlibrary id field """
"""format a url from an openlibrary id field"""
try:
key = data["key"]
except KeyError:
raise ConnectorException("Invalid book data")
return "%s%s" % (self.books_url, key)
return f"{self.books_url}{key}"
def is_work_data(self, data):
return bool(re.match(r"^[\/\w]+OL\d+W$", data["key"]))
@ -74,76 +117,81 @@ class Connector(AbstractConnector):
key = data["key"]
except KeyError:
raise ConnectorException("Invalid book data")
url = "%s%s/editions" % (self.books_url, key)
data = get_data(url)
return pick_default_edition(data["entries"])
url = f"{self.books_url}{key}/editions"
data = self.get_book_data(url)
edition = pick_default_edition(data["entries"])
if not edition:
raise ConnectorException("No editions for work")
return edition
def get_work_from_edition_data(self, data):
try:
key = data["works"][0]["key"]
except (IndexError, KeyError):
raise ConnectorException("No work found for edition")
url = "%s%s" % (self.books_url, key)
return get_data(url)
url = f"{self.books_url}{key}"
return self.get_book_data(url)
def get_authors_from_data(self, data):
""" parse author json and load or create authors """
"""parse author json and load or create authors"""
for author_blob in data.get("authors", []):
author_blob = author_blob.get("author", author_blob)
# this id is "/authors/OL1234567A"
author_id = author_blob["key"]
url = "%s%s" % (self.base_url, author_id)
url = f"{self.base_url}{author_id}"
author = self.get_or_create_author(url)
if not author:
continue
yield author
def get_cover_url(self, cover_blob, size="L"):
""" ask openlibrary for the cover """
"""ask openlibrary for the cover"""
if not cover_blob:
return None
cover_id = cover_blob[0]
image_name = "%s-%s.jpg" % (cover_id, size)
return "%s/b/id/%s" % (self.covers_url, image_name)
image_name = f"{cover_id}-{size}.jpg"
return f"{self.covers_url}/b/id/{image_name}"
def parse_search_data(self, data):
return data.get("docs")
def parse_search_data(self, data, min_confidence):
for idx, search_result in enumerate(data.get("docs")):
# build the remote id from the openlibrary key
key = self.books_url + search_result["key"]
author = search_result.get("author_name") or ["Unknown"]
cover_blob = search_result.get("cover_i")
cover = self.get_cover_url([cover_blob], size="M") if cover_blob else None
def format_search_result(self, search_result):
# build the remote id from the openlibrary key
key = self.books_url + search_result["key"]
author = search_result.get("author_name") or ["Unknown"]
cover_blob = search_result.get("cover_i")
cover = self.get_cover_url([cover_blob], size="M") if cover_blob else None
return SearchResult(
title=search_result.get("title"),
key=key,
author=", ".join(author),
connector=self,
year=search_result.get("first_publish_year"),
cover=cover,
)
# OL doesn't provide confidence, but it does sort by an internal ranking, so
# this confidence value is relative to the list position
confidence = 1 / (idx + 1)
yield SearchResult(
title=search_result.get("title"),
key=key,
author=", ".join(author),
connector=self,
year=search_result.get("first_publish_year"),
cover=cover,
confidence=confidence,
)
def parse_isbn_search_data(self, data):
return list(data.values())
def format_isbn_search_result(self, search_result):
# build the remote id from the openlibrary key
key = self.books_url + search_result["key"]
authors = search_result.get("authors") or [{"name": "Unknown"}]
author_names = [author.get("name") for author in authors]
return SearchResult(
title=search_result.get("title"),
key=key,
author=", ".join(author_names),
connector=self,
year=search_result.get("publish_date"),
)
for search_result in list(data.values()):
# build the remote id from the openlibrary key
key = self.books_url + search_result["key"]
authors = search_result.get("authors") or [{"name": "Unknown"}]
author_names = [author.get("name") for author in authors]
yield SearchResult(
title=search_result.get("title"),
key=key,
author=", ".join(author_names),
connector=self,
year=search_result.get("publish_date"),
)
def load_edition_data(self, olkey):
""" query openlibrary for editions of a work """
url = "%s/works/%s/editions" % (self.books_url, olkey)
return get_data(url)
"""query openlibrary for editions of a work"""
url = f"{self.books_url}/works/{olkey}/editions"
return self.get_book_data(url)
def expand_book_data(self, book):
work = book
@ -166,7 +214,7 @@ class Connector(AbstractConnector):
def ignore_edition(edition_data):
""" don't load a million editions that have no metadata """
"""don't load a million editions that have no metadata"""
# an isbn, we love to see it
if edition_data.get("isbn_13") or edition_data.get("isbn_10"):
return False
@ -185,27 +233,61 @@ def ignore_edition(edition_data):
def get_description(description_blob):
""" descriptions can be a string or a dict """
"""descriptions can be a string or a dict"""
if isinstance(description_blob, dict):
return description_blob.get("value")
return description_blob
def get_openlibrary_key(key):
""" convert /books/OL27320736M into OL27320736M """
"""convert /books/OL27320736M into OL27320736M"""
return key.split("/")[-1]
def get_languages(language_blob):
""" /language/eng -> English """
"""/language/eng -> English"""
langs = []
for lang in language_blob:
langs.append(languages.get(lang.get("key", ""), None))
return langs
def get_dict_field(blob, field_name):
"""extract the isni from the remote id data for the author"""
if not blob or not isinstance(blob, dict):
return None
return blob.get(field_name)
def get_wikipedia_link(links):
"""extract wikipedia links"""
if not isinstance(links, list):
return None
for link in links:
if not isinstance(link, dict):
continue
if link.get("title") == "wikipedia":
return link.get("url")
return None
def get_inventaire_id(links):
"""extract and format inventaire ids"""
if not isinstance(links, list):
return None
for link in links:
if not isinstance(link, dict):
continue
if link.get("title") == "inventaire.io":
iv_link = link.get("url")
return iv_link.split("/")[-1]
return None
def pick_default_edition(options):
""" favor physical copies with covers in english """
"""favor physical copies with covers in english"""
if not options:
return None
if len(options) == 1:

View file

@ -1,148 +0,0 @@
""" using a bookwyrm instance as a source of book data """
from functools import reduce
import operator
from django.contrib.postgres.search import SearchRank, SearchVector
from django.db.models import Count, F, Q
from bookwyrm import models
from .abstract_connector import AbstractConnector, SearchResult
class Connector(AbstractConnector):
""" instantiate a connector """
# pylint: disable=arguments-differ
def search(self, query, min_confidence=0.1, raw=False):
""" search your local database """
if not query:
return []
# first, try searching unqiue identifiers
results = search_identifiers(query)
if not results:
# then try searching title/author
results = search_title_author(query, min_confidence)
search_results = []
for result in results:
if raw:
search_results.append(result)
else:
search_results.append(self.format_search_result(result))
if len(search_results) >= 10:
break
if not raw:
search_results.sort(key=lambda r: r.confidence, reverse=True)
return search_results
def isbn_search(self, query, raw=False):
""" search your local database """
if not query:
return []
filters = [{f: query} for f in ["isbn_10", "isbn_13"]]
results = models.Edition.objects.filter(
reduce(operator.or_, (Q(**f) for f in filters))
).distinct()
# when there are multiple editions of the same work, pick the default.
# it would be odd for this to happen.
results = results.filter(parent_work__default_edition__id=F("id")) or results
search_results = []
for result in results:
if raw:
search_results.append(result)
else:
search_results.append(self.format_search_result(result))
if len(search_results) >= 10:
break
return search_results
def format_search_result(self, search_result):
return SearchResult(
title=search_result.title,
key=search_result.remote_id,
author=search_result.author_text,
year=search_result.published_date.year
if search_result.published_date
else None,
connector=self,
cover="%s%s" % (self.covers_url, search_result.cover),
confidence=search_result.rank if hasattr(search_result, "rank") else 1,
)
def format_isbn_search_result(self, search_result):
return self.format_search_result(search_result)
def is_work_data(self, data):
pass
def get_edition_from_work_data(self, data):
pass
def get_work_from_edition_data(self, data):
pass
def get_authors_from_data(self, data):
return None
def parse_isbn_search_data(self, data):
""" it's already in the right format, don't even worry about it """
return data
def parse_search_data(self, data):
""" it's already in the right format, don't even worry about it """
return data
def expand_book_data(self, book):
pass
def search_identifiers(query):
""" tries remote_id, isbn; defined as dedupe fields on the model """
filters = [
{f.name: query}
for f in models.Edition._meta.get_fields()
if hasattr(f, "deduplication_field") and f.deduplication_field
]
results = models.Edition.objects.filter(
reduce(operator.or_, (Q(**f) for f in filters))
).distinct()
# when there are multiple editions of the same work, pick the default.
# it would be odd for this to happen.
return results.filter(parent_work__default_edition__id=F("id")) or results
def search_title_author(query, min_confidence):
""" searches for title and author """
vector = (
SearchVector("title", weight="A")
+ SearchVector("subtitle", weight="B")
+ SearchVector("authors__name", weight="C")
+ SearchVector("series", weight="D")
)
results = (
models.Edition.objects.annotate(search=vector)
.annotate(rank=SearchRank(vector, query))
.filter(rank__gt=min_confidence)
.order_by("-rank")
)
# when there are multiple editions of the same work, pick the closest
editions_of_work = (
results.values("parent_work")
.annotate(Count("parent_work"))
.values_list("parent_work")
)
for work_id in set(editions_of_work):
editions = results.filter(parent_work=work_id)
default = editions.filter(parent_work__default_edition=F("id"))
default_rank = default.first().rank if default.exists() else 0
# if mutliple books have the top rank, pick the default edition
if default_rank == editions.first().rank:
yield default.first()
else:
yield editions.first()

View file

@ -1,3 +1,3 @@
""" settings book data connectors """
CONNECTORS = ["openlibrary", "self_connector", "bookwyrm_connector"]
CONNECTORS = ["openlibrary", "inventaire", "bookwyrm_connector"]

View file

@ -1,7 +1,31 @@
""" customize the info available in context for rendering templates """
from bookwyrm import models
from bookwyrm import models, settings
def site_settings(request): # pylint: disable=unused-argument
""" include the custom info about the site """
return {"site": models.SiteSettings.objects.get()}
"""include the custom info about the site"""
request_protocol = "https://"
if not request.is_secure():
request_protocol = "http://"
site = models.SiteSettings.objects.get()
theme = "css/themes/bookwyrm-light.scss"
if (
hasattr(request, "user")
and request.user.is_authenticated
and request.user.theme
):
theme = request.user.theme.path
elif site.default_theme:
theme = site.default_theme.path
return {
"site": site,
"site_theme": theme,
"active_announcements": models.Announcement.active_announcements(),
"thumbnail_generation_enabled": settings.ENABLE_THUMBNAIL_GENERATION,
"media_full_url": settings.MEDIA_FULL_URL,
"preview_images_enabled": settings.ENABLE_PREVIEW_IMAGES,
"request_protocol": request_protocol,
"js_cache": settings.JS_CACHE,
}

View file

@ -8,59 +8,70 @@ from bookwyrm.settings import DOMAIN
def email_data():
""" fields every email needs """
"""fields every email needs"""
site = models.SiteSettings.objects.get()
if site.logo_small:
logo_path = "/images/{}".format(site.logo_small.url)
else:
logo_path = "/static/images/logo-small.png"
return {
"site_name": site.name,
"logo": logo_path,
"logo": site.logo_small_url,
"domain": DOMAIN,
"user": None,
}
def email_confirmation_email(user):
"""newly registered users confirm email address"""
data = email_data()
data["confirmation_code"] = user.confirmation_code
data["confirmation_link"] = user.confirmation_link
send_email.delay(user.email, *format_email("confirm", data))
def invite_email(invite_request):
""" send out an invite code """
"""send out an invite code"""
data = email_data()
data["invite_link"] = invite_request.invite.link
send_email.delay(invite_request.email, *format_email("invite", data))
def password_reset_email(reset_code):
""" generate a password reset email """
"""generate a password reset email"""
data = email_data()
data["reset_link"] = reset_code.link
data["user"] = reset_code.user.display_name
send_email.delay(reset_code.user.email, *format_email("password_reset", data))
def moderation_report_email(report):
"""a report was created"""
data = email_data()
data["reporter"] = report.reporter.localname or report.reporter.username
data["reportee"] = report.user.localname or report.user.username
data["report_link"] = report.remote_id
for admin in models.User.objects.filter(
groups__name__in=["admin", "moderator"]
).distinct():
data["user"] = admin.display_name
send_email.delay(admin.email, *format_email("moderation_report", data))
def format_email(email_name, data):
""" render the email templates """
subject = (
get_template("email/{}/subject.html".format(email_name)).render(data).strip()
)
"""render the email templates"""
subject = get_template(f"email/{email_name}/subject.html").render(data).strip()
html_content = (
get_template("email/{}/html_content.html".format(email_name))
.render(data)
.strip()
get_template(f"email/{email_name}/html_content.html").render(data).strip()
)
text_content = (
get_template("email/{}/text_content.html".format(email_name))
.render(data)
.strip()
get_template(f"email/{email_name}/text_content.html").render(data).strip()
)
return (subject, html_content, text_content)
@app.task
@app.task(queue="high_priority")
def send_email(recipient, subject, html_content, text_content):
""" use a task to send the email """
"""use a task to send the email"""
email = EmailMultiAlternatives(
subject, text_content, settings.DEFAULT_FROM_EMAIL, [recipient]
subject, text_content, settings.EMAIL_SENDER, [recipient]
)
email.attach_alternative(html_content, "text/html")
email.send()

View file

@ -1,312 +0,0 @@
""" using django model forms """
import datetime
from collections import defaultdict
from django import forms
from django.forms import ModelForm, PasswordInput, widgets, ChoiceField
from django.forms.widgets import Textarea
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from bookwyrm import models
class CustomForm(ModelForm):
""" add css classes to the forms """
def __init__(self, *args, **kwargs):
css_classes = defaultdict(lambda: "")
css_classes["text"] = "input"
css_classes["password"] = "input"
css_classes["email"] = "input"
css_classes["number"] = "input"
css_classes["checkbox"] = "checkbox"
css_classes["textarea"] = "textarea"
super(CustomForm, self).__init__(*args, **kwargs)
for visible in self.visible_fields():
if hasattr(visible.field.widget, "input_type"):
input_type = visible.field.widget.input_type
if isinstance(visible.field.widget, Textarea):
input_type = "textarea"
visible.field.widget.attrs["cols"] = None
visible.field.widget.attrs["rows"] = None
visible.field.widget.attrs["class"] = css_classes[input_type]
# pylint: disable=missing-class-docstring
class LoginForm(CustomForm):
class Meta:
model = models.User
fields = ["localname", "password"]
help_texts = {f: None for f in fields}
widgets = {
"password": PasswordInput(),
}
class RegisterForm(CustomForm):
class Meta:
model = models.User
fields = ["localname", "email", "password"]
help_texts = {f: None for f in fields}
widgets = {"password": PasswordInput()}
class RatingForm(CustomForm):
class Meta:
model = models.ReviewRating
fields = ["user", "book", "rating", "privacy"]
class ReviewForm(CustomForm):
class Meta:
model = models.Review
fields = [
"user",
"book",
"name",
"content",
"rating",
"content_warning",
"sensitive",
"privacy",
]
class CommentForm(CustomForm):
class Meta:
model = models.Comment
fields = [
"user",
"book",
"content",
"content_warning",
"sensitive",
"privacy",
"progress",
"progress_mode",
]
class QuotationForm(CustomForm):
class Meta:
model = models.Quotation
fields = [
"user",
"book",
"quote",
"content",
"content_warning",
"sensitive",
"privacy",
]
class ReplyForm(CustomForm):
class Meta:
model = models.Status
fields = [
"user",
"content",
"content_warning",
"sensitive",
"reply_parent",
"privacy",
]
class StatusForm(CustomForm):
class Meta:
model = models.Status
fields = ["user", "content", "content_warning", "sensitive", "privacy"]
class EditUserForm(CustomForm):
class Meta:
model = models.User
fields = [
"avatar",
"name",
"email",
"summary",
"show_goal",
"manually_approves_followers",
"discoverable",
"preferred_timezone",
]
help_texts = {f: None for f in fields}
class LimitedEditUserForm(CustomForm):
class Meta:
model = models.User
fields = [
"avatar",
"name",
"summary",
"manually_approves_followers",
"discoverable",
]
help_texts = {f: None for f in fields}
class UserGroupForm(CustomForm):
class Meta:
model = models.User
fields = ["groups"]
class TagForm(CustomForm):
class Meta:
model = models.Tag
fields = ["name"]
help_texts = {f: None for f in fields}
labels = {"name": "Add a tag"}
class CoverForm(CustomForm):
class Meta:
model = models.Book
fields = ["cover"]
help_texts = {f: None for f in fields}
class EditionForm(CustomForm):
class Meta:
model = models.Edition
exclude = [
"remote_id",
"origin_id",
"created_date",
"updated_date",
"edition_rank",
"authors",
"parent_work",
"shelves",
"subjects", # TODO
"subject_places", # TODO
"connector",
]
class AuthorForm(CustomForm):
class Meta:
model = models.Author
exclude = [
"remote_id",
"origin_id",
"created_date",
"updated_date",
]
class ImportForm(forms.Form):
csv_file = forms.FileField()
class ExpiryWidget(widgets.Select):
def value_from_datadict(self, data, files, name):
""" human-readable exiration time buckets """
selected_string = super().value_from_datadict(data, files, name)
if selected_string == "day":
interval = datetime.timedelta(days=1)
elif selected_string == "week":
interval = datetime.timedelta(days=7)
elif selected_string == "month":
interval = datetime.timedelta(days=31) # Close enough?
elif selected_string == "forever":
return None
else:
return selected_string # "This will raise
return timezone.now() + interval
class InviteRequestForm(CustomForm):
def clean(self):
""" make sure the email isn't in use by a registered user """
cleaned_data = super().clean()
email = cleaned_data.get("email")
if email and models.User.objects.filter(email=email).exists():
self.add_error("email", _("A user with this email already exists."))
class Meta:
model = models.InviteRequest
fields = ["email"]
class CreateInviteForm(CustomForm):
class Meta:
model = models.SiteInvite
exclude = ["code", "user", "times_used", "invitees"]
widgets = {
"expiry": ExpiryWidget(
choices=[
("day", _("One Day")),
("week", _("One Week")),
("month", _("One Month")),
("forever", _("Does Not Expire")),
]
),
"use_limit": widgets.Select(
choices=[
(i, _("%(count)d uses" % {"count": i}))
for i in [1, 5, 10, 25, 50, 100]
]
+ [(None, _("Unlimited"))]
),
}
class ShelfForm(CustomForm):
class Meta:
model = models.Shelf
fields = ["user", "name", "privacy"]
class GoalForm(CustomForm):
class Meta:
model = models.AnnualGoal
fields = ["user", "year", "goal", "privacy"]
class SiteForm(CustomForm):
class Meta:
model = models.SiteSettings
exclude = []
class ListForm(CustomForm):
class Meta:
model = models.List
fields = ["user", "name", "description", "curation", "privacy"]
class ReportForm(CustomForm):
class Meta:
model = models.Report
fields = ["user", "reporter", "statuses", "note"]
class ServerForm(CustomForm):
class Meta:
model = models.FederatedServer
exclude = ["remote_id"]
class SortListForm(forms.Form):
sort_by = ChoiceField(
choices=(
("order", _("List Order")),
("title", _("Book Title")),
("rating", _("Rating")),
),
label=_("Sort By"),
)
direction = ChoiceField(
choices=(
("ascending", _("Ascending")),
("descending", _("Descending")),
),
)

View file

@ -0,0 +1,12 @@
""" make forms available to the app """
# site admin
from .admin import *
from .author import *
from .books import *
from .edit_user import *
from .forms import *
from .groups import *
from .landing import *
from .links import *
from .lists import *
from .status import *

141
bookwyrm/forms/admin.py Normal file
View file

@ -0,0 +1,141 @@
""" using django model forms """
import datetime
from django import forms
from django.forms import widgets
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django_celery_beat.models import IntervalSchedule
from bookwyrm import models
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class ExpiryWidget(widgets.Select):
def value_from_datadict(self, data, files, name):
"""human-readable exiration time buckets"""
selected_string = super().value_from_datadict(data, files, name)
if selected_string == "day":
interval = datetime.timedelta(days=1)
elif selected_string == "week":
interval = datetime.timedelta(days=7)
elif selected_string == "month":
interval = datetime.timedelta(days=31) # Close enough?
elif selected_string == "forever":
return None
else:
return selected_string # This will raise
return timezone.now() + interval
class CreateInviteForm(CustomForm):
class Meta:
model = models.SiteInvite
exclude = ["code", "user", "times_used", "invitees"]
widgets = {
"expiry": ExpiryWidget(
choices=[
("day", _("One Day")),
("week", _("One Week")),
("month", _("One Month")),
("forever", _("Does Not Expire")),
]
),
"use_limit": widgets.Select(
choices=[(i, _(f"{i} uses")) for i in [1, 5, 10, 25, 50, 100]]
+ [(None, _("Unlimited"))]
),
}
class SiteForm(CustomForm):
class Meta:
model = models.SiteSettings
exclude = ["admin_code", "install_mode"]
widgets = {
"instance_short_description": forms.TextInput(
attrs={"aria-describedby": "desc_instance_short_description"}
),
"require_confirm_email": forms.CheckboxInput(
attrs={"aria-describedby": "desc_require_confirm_email"}
),
"invite_request_text": forms.Textarea(
attrs={"aria-describedby": "desc_invite_request_text"}
),
}
class ThemeForm(CustomForm):
class Meta:
model = models.Theme
fields = ["name", "path"]
widgets = {
"name": forms.TextInput(attrs={"aria-describedby": "desc_name"}),
"path": forms.TextInput(
attrs={
"aria-describedby": "desc_path",
"placeholder": "css/themes/theme-name.scss",
}
),
}
class AnnouncementForm(CustomForm):
class Meta:
model = models.Announcement
exclude = ["remote_id"]
widgets = {
"preview": forms.TextInput(attrs={"aria-describedby": "desc_preview"}),
"content": forms.Textarea(attrs={"aria-describedby": "desc_content"}),
"event_date": forms.SelectDateWidget(
attrs={"aria-describedby": "desc_event_date"}
),
"start_date": forms.SelectDateWidget(
attrs={"aria-describedby": "desc_start_date"}
),
"end_date": forms.SelectDateWidget(
attrs={"aria-describedby": "desc_end_date"}
),
"active": forms.CheckboxInput(attrs={"aria-describedby": "desc_active"}),
}
class EmailBlocklistForm(CustomForm):
class Meta:
model = models.EmailBlocklist
fields = ["domain"]
widgets = {
"avatar": forms.TextInput(attrs={"aria-describedby": "desc_domain"}),
}
class IPBlocklistForm(CustomForm):
class Meta:
model = models.IPBlocklist
fields = ["address"]
class ServerForm(CustomForm):
class Meta:
model = models.FederatedServer
exclude = ["remote_id"]
class AutoModRuleForm(CustomForm):
class Meta:
model = models.AutoMod
fields = ["string_match", "flag_users", "flag_statuses", "created_by"]
class IntervalScheduleForm(CustomForm):
class Meta:
model = IntervalSchedule
fields = ["every", "period"]
widgets = {
"every": forms.NumberInput(attrs={"aria-describedby": "desc_every"}),
"period": forms.Select(attrs={"aria-describedby": "desc_period"}),
}

47
bookwyrm/forms/author.py Normal file
View file

@ -0,0 +1,47 @@
""" using django model forms """
from django import forms
from bookwyrm import models
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class AuthorForm(CustomForm):
class Meta:
model = models.Author
fields = [
"last_edited_by",
"name",
"aliases",
"bio",
"wikipedia_link",
"born",
"died",
"openlibrary_key",
"inventaire_id",
"librarything_key",
"goodreads_key",
"isni",
]
widgets = {
"name": forms.TextInput(attrs={"aria-describedby": "desc_name"}),
"aliases": forms.TextInput(attrs={"aria-describedby": "desc_aliases"}),
"bio": forms.Textarea(attrs={"aria-describedby": "desc_bio"}),
"wikipedia_link": forms.TextInput(
attrs={"aria-describedby": "desc_wikipedia_link"}
),
"born": forms.SelectDateWidget(attrs={"aria-describedby": "desc_born"}),
"died": forms.SelectDateWidget(attrs={"aria-describedby": "desc_died"}),
"oepnlibrary_key": forms.TextInput(
attrs={"aria-describedby": "desc_oepnlibrary_key"}
),
"inventaire_id": forms.TextInput(
attrs={"aria-describedby": "desc_inventaire_id"}
),
"librarything_key": forms.TextInput(
attrs={"aria-describedby": "desc_librarything_key"}
),
"goodreads_key": forms.TextInput(
attrs={"aria-describedby": "desc_goodreads_key"}
),
}

104
bookwyrm/forms/books.py Normal file
View file

@ -0,0 +1,104 @@
""" using django model forms """
from django import forms
from bookwyrm import models
from bookwyrm.models.fields import ClearableFileInputWithWarning
from .custom_form import CustomForm
from .widgets import ArrayWidget, SelectDateWidget, Select
# pylint: disable=missing-class-docstring
class CoverForm(CustomForm):
class Meta:
model = models.Book
fields = ["cover"]
help_texts = {f: None for f in fields}
class EditionForm(CustomForm):
class Meta:
model = models.Edition
exclude = [
"remote_id",
"origin_id",
"created_date",
"updated_date",
"edition_rank",
"authors",
"parent_work",
"shelves",
"connector",
"search_vector",
"links",
"file_links",
]
widgets = {
"title": forms.TextInput(attrs={"aria-describedby": "desc_title"}),
"subtitle": forms.TextInput(attrs={"aria-describedby": "desc_subtitle"}),
"description": forms.Textarea(
attrs={"aria-describedby": "desc_description"}
),
"series": forms.TextInput(attrs={"aria-describedby": "desc_series"}),
"series_number": forms.TextInput(
attrs={"aria-describedby": "desc_series_number"}
),
"subjects": ArrayWidget(),
"languages": forms.TextInput(
attrs={"aria-describedby": "desc_languages_help desc_languages"}
),
"publishers": forms.TextInput(
attrs={"aria-describedby": "desc_publishers_help desc_publishers"}
),
"first_published_date": SelectDateWidget(
attrs={"aria-describedby": "desc_first_published_date"}
),
"published_date": SelectDateWidget(
attrs={"aria-describedby": "desc_published_date"}
),
"cover": ClearableFileInputWithWarning(
attrs={"aria-describedby": "desc_cover"}
),
"physical_format": Select(
attrs={"aria-describedby": "desc_physical_format"}
),
"physical_format_detail": forms.TextInput(
attrs={"aria-describedby": "desc_physical_format_detail"}
),
"pages": forms.NumberInput(attrs={"aria-describedby": "desc_pages"}),
"isbn_13": forms.TextInput(attrs={"aria-describedby": "desc_isbn_13"}),
"isbn_10": forms.TextInput(attrs={"aria-describedby": "desc_isbn_10"}),
"openlibrary_key": forms.TextInput(
attrs={"aria-describedby": "desc_openlibrary_key"}
),
"inventaire_id": forms.TextInput(
attrs={"aria-describedby": "desc_inventaire_id"}
),
"oclc_number": forms.TextInput(
attrs={"aria-describedby": "desc_oclc_number"}
),
"ASIN": forms.TextInput(attrs={"aria-describedby": "desc_ASIN"}),
}
class EditionFromWorkForm(CustomForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# make all fields hidden
for visible in self.visible_fields():
visible.field.widget = forms.HiddenInput()
class Meta:
model = models.Work
fields = [
"title",
"subtitle",
"authors",
"description",
"languages",
"series",
"series_number",
"subjects",
"subject_places",
"cover",
"first_published_date",
]

View file

@ -0,0 +1,26 @@
""" Overrides django's default form class """
from collections import defaultdict
from django.forms import ModelForm
from django.forms.widgets import Textarea
class CustomForm(ModelForm):
"""add css classes to the forms"""
def __init__(self, *args, **kwargs):
css_classes = defaultdict(lambda: "")
css_classes["text"] = "input"
css_classes["password"] = "input"
css_classes["email"] = "input"
css_classes["number"] = "input"
css_classes["checkbox"] = "checkbox"
css_classes["textarea"] = "textarea"
# pylint: disable=super-with-arguments
super(CustomForm, self).__init__(*args, **kwargs)
for visible in self.visible_fields():
if hasattr(visible.field.widget, "input_type"):
input_type = visible.field.widget.input_type
if isinstance(visible.field.widget, Textarea):
input_type = "textarea"
visible.field.widget.attrs["rows"] = 5
visible.field.widget.attrs["class"] = css_classes[input_type]

View file

@ -0,0 +1,68 @@
""" using django model forms """
from django import forms
from bookwyrm import models
from bookwyrm.models.fields import ClearableFileInputWithWarning
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class EditUserForm(CustomForm):
class Meta:
model = models.User
fields = [
"avatar",
"name",
"email",
"summary",
"show_goal",
"show_suggested_users",
"manually_approves_followers",
"default_post_privacy",
"discoverable",
"hide_follows",
"preferred_timezone",
"preferred_language",
"theme",
]
help_texts = {f: None for f in fields}
widgets = {
"avatar": ClearableFileInputWithWarning(
attrs={"aria-describedby": "desc_avatar"}
),
"name": forms.TextInput(attrs={"aria-describedby": "desc_name"}),
"summary": forms.Textarea(attrs={"aria-describedby": "desc_summary"}),
"email": forms.EmailInput(attrs={"aria-describedby": "desc_email"}),
"discoverable": forms.CheckboxInput(
attrs={"aria-describedby": "desc_discoverable"}
),
}
class LimitedEditUserForm(CustomForm):
class Meta:
model = models.User
fields = [
"avatar",
"name",
"summary",
"manually_approves_followers",
"discoverable",
]
help_texts = {f: None for f in fields}
widgets = {
"avatar": ClearableFileInputWithWarning(
attrs={"aria-describedby": "desc_avatar"}
),
"name": forms.TextInput(attrs={"aria-describedby": "desc_name"}),
"summary": forms.Textarea(attrs={"aria-describedby": "desc_summary"}),
"discoverable": forms.CheckboxInput(
attrs={"aria-describedby": "desc_discoverable"}
),
}
class DeleteUserForm(CustomForm):
class Meta:
model = models.User
fields = ["password"]

64
bookwyrm/forms/forms.py Normal file
View file

@ -0,0 +1,64 @@
""" using django model forms """
from django import forms
from django.forms import widgets
from django.utils.translation import gettext_lazy as _
from bookwyrm import models
from bookwyrm.models.user import FeedFilterChoices
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class FeedStatusTypesForm(CustomForm):
class Meta:
model = models.User
fields = ["feed_status_types"]
help_texts = {f: None for f in fields}
widgets = {
"feed_status_types": widgets.CheckboxSelectMultiple(
choices=FeedFilterChoices,
),
}
class ImportForm(forms.Form):
csv_file = forms.FileField()
class ShelfForm(CustomForm):
class Meta:
model = models.Shelf
fields = ["user", "name", "privacy", "description"]
class GoalForm(CustomForm):
class Meta:
model = models.AnnualGoal
fields = ["user", "year", "goal", "privacy"]
class ReportForm(CustomForm):
class Meta:
model = models.Report
fields = ["user", "reporter", "status", "links", "note"]
class ReadThroughForm(CustomForm):
def clean(self):
"""don't let readthroughs end before they start"""
cleaned_data = super().clean()
start_date = cleaned_data.get("start_date")
finish_date = cleaned_data.get("finish_date")
if start_date and finish_date and start_date > finish_date:
self.add_error(
"finish_date", _("Reading finish date cannot be before start date.")
)
stopped_date = cleaned_data.get("stopped_date")
if start_date and stopped_date and start_date > stopped_date:
self.add_error(
"stopped_date", _("Reading stopped date cannot be before start date.")
)
class Meta:
model = models.ReadThrough
fields = ["user", "book", "start_date", "finish_date", "stopped_date"]

16
bookwyrm/forms/groups.py Normal file
View file

@ -0,0 +1,16 @@
""" using django model forms """
from bookwyrm import models
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class UserGroupForm(CustomForm):
class Meta:
model = models.User
fields = ["groups"]
class GroupForm(CustomForm):
class Meta:
model = models.Group
fields = ["user", "privacy", "name", "description"]

45
bookwyrm/forms/landing.py Normal file
View file

@ -0,0 +1,45 @@
""" Forms for the landing pages """
from django.forms import PasswordInput
from django.utils.translation import gettext_lazy as _
from bookwyrm import models
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class LoginForm(CustomForm):
class Meta:
model = models.User
fields = ["localname", "password"]
help_texts = {f: None for f in fields}
widgets = {
"password": PasswordInput(),
}
class RegisterForm(CustomForm):
class Meta:
model = models.User
fields = ["localname", "email", "password"]
help_texts = {f: None for f in fields}
widgets = {"password": PasswordInput()}
def clean(self):
"""Check if the username is taken"""
cleaned_data = super().clean()
localname = cleaned_data.get("localname").strip()
if models.User.objects.filter(localname=localname).first():
self.add_error("localname", _("User with this username already exists"))
class InviteRequestForm(CustomForm):
def clean(self):
"""make sure the email isn't in use by a registered user"""
cleaned_data = super().clean()
email = cleaned_data.get("email")
if email and models.User.objects.filter(email=email).exists():
self.add_error("email", _("A user with this email already exists."))
class Meta:
model = models.InviteRequest
fields = ["email", "answer"]

48
bookwyrm/forms/links.py Normal file
View file

@ -0,0 +1,48 @@
""" using django model forms """
from urllib.parse import urlparse
from django.utils.translation import gettext_lazy as _
from bookwyrm import models
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class LinkDomainForm(CustomForm):
class Meta:
model = models.LinkDomain
fields = ["name"]
class FileLinkForm(CustomForm):
class Meta:
model = models.FileLink
fields = ["url", "filetype", "availability", "book", "added_by"]
def clean(self):
"""make sure the domain isn't blocked or pending"""
cleaned_data = super().clean()
url = cleaned_data.get("url")
filetype = cleaned_data.get("filetype")
book = cleaned_data.get("book")
domain = urlparse(url).netloc
if models.LinkDomain.objects.filter(domain=domain).exists():
status = models.LinkDomain.objects.get(domain=domain).status
if status == "blocked":
# pylint: disable=line-too-long
self.add_error(
"url",
_(
"This domain is blocked. Please contact your administrator if you think this is an error."
),
)
elif models.FileLink.objects.filter(
url=url, book=book, filetype=filetype
).exists():
# pylint: disable=line-too-long
self.add_error(
"url",
_(
"This link with file type has already been added for this book. If it is not visible, the domain is still pending."
),
)

37
bookwyrm/forms/lists.py Normal file
View file

@ -0,0 +1,37 @@
""" using django model forms """
from django import forms
from django.forms import ChoiceField
from django.utils.translation import gettext_lazy as _
from bookwyrm import models
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class ListForm(CustomForm):
class Meta:
model = models.List
fields = ["user", "name", "description", "curation", "privacy", "group"]
class ListItemForm(CustomForm):
class Meta:
model = models.ListItem
fields = ["user", "book", "book_list", "notes"]
class SortListForm(forms.Form):
sort_by = ChoiceField(
choices=(
("order", _("List Order")),
("title", _("Book Title")),
("rating", _("Rating")),
),
label=_("Sort By"),
)
direction = ChoiceField(
choices=(
("ascending", _("Ascending")),
("descending", _("Descending")),
),
)

82
bookwyrm/forms/status.py Normal file
View file

@ -0,0 +1,82 @@
""" using django model forms """
from bookwyrm import models
from .custom_form import CustomForm
# pylint: disable=missing-class-docstring
class RatingForm(CustomForm):
class Meta:
model = models.ReviewRating
fields = ["user", "book", "rating", "privacy"]
class ReviewForm(CustomForm):
class Meta:
model = models.Review
fields = [
"user",
"book",
"name",
"content",
"rating",
"content_warning",
"sensitive",
"privacy",
]
class CommentForm(CustomForm):
class Meta:
model = models.Comment
fields = [
"user",
"book",
"content",
"content_warning",
"sensitive",
"privacy",
"progress",
"progress_mode",
"reading_status",
]
class QuotationForm(CustomForm):
class Meta:
model = models.Quotation
fields = [
"user",
"book",
"quote",
"content",
"content_warning",
"sensitive",
"privacy",
"position",
"position_mode",
]
class ReplyForm(CustomForm):
class Meta:
model = models.Status
fields = [
"user",
"content",
"content_warning",
"sensitive",
"reply_parent",
"privacy",
]
class StatusForm(CustomForm):
class Meta:
model = models.Status
fields = ["user", "content", "content_warning", "sensitive", "privacy"]
class DirectForm(CustomForm):
class Meta:
model = models.Status
fields = ["user", "content", "content_warning", "sensitive", "privacy"]

70
bookwyrm/forms/widgets.py Normal file
View file

@ -0,0 +1,70 @@
""" using django model forms """
from django import forms
class ArrayWidget(forms.widgets.TextInput):
"""Inputs for postgres array fields"""
# pylint: disable=unused-argument
# pylint: disable=no-self-use
def value_from_datadict(self, data, files, name):
"""get all values for this name"""
return [i for i in data.getlist(name) if i]
class Select(forms.Select):
"""custom template for select widget"""
template_name = "widgets/select.html"
class SelectDateWidget(forms.SelectDateWidget):
"""
A widget that splits date input into two <select> boxes and a numerical year.
"""
template_name = "widgets/addon_multiwidget.html"
select_widget = Select
def get_context(self, name, value, attrs):
"""sets individual widgets"""
context = super().get_context(name, value, attrs)
date_context = {}
year_name = self.year_field % name
date_context["year"] = forms.NumberInput().get_context(
name=year_name,
value=context["widget"]["value"]["year"],
attrs={
**context["widget"]["attrs"],
"id": f"id_{year_name}",
"class": "input",
},
)
month_choices = list(self.months.items())
if not self.is_required:
month_choices.insert(0, self.month_none_value)
month_name = self.month_field % name
date_context["month"] = self.select_widget(
attrs, choices=month_choices
).get_context(
name=month_name,
value=context["widget"]["value"]["month"],
attrs={**context["widget"]["attrs"], "id": f"id_{month_name}"},
)
day_choices = [(i, i) for i in range(1, 32)]
if not self.is_required:
day_choices.insert(0, self.day_none_value)
day_name = self.day_field % name
date_context["day"] = self.select_widget(
attrs,
choices=day_choices,
).get_context(
name=day_name,
value=context["widget"]["value"]["day"],
attrs={**context["widget"]["attrs"], "id": f"id_{day_name}"},
)
subwidgets = []
for field in self._parse_date_fmt():
subwidgets.append(date_context[field]["widget"])
context["widget"]["subwidgets"] = subwidgets
return context

113
bookwyrm/imagegenerators.py Normal file
View file

@ -0,0 +1,113 @@
"""Generators for all the different thumbnail sizes"""
from imagekit import ImageSpec, register
from imagekit.processors import ResizeToFit
class BookXSmallWebp(ImageSpec):
"""Handles XSmall size in Webp format"""
processors = [ResizeToFit(80, 80)]
format = "WEBP"
options = {"quality": 95}
class BookXSmallJpg(ImageSpec):
"""Handles XSmall size in Jpeg format"""
processors = [ResizeToFit(80, 80)]
format = "JPEG"
options = {"quality": 95}
class BookSmallWebp(ImageSpec):
"""Handles Small size in Webp format"""
processors = [ResizeToFit(100, 100)]
format = "WEBP"
options = {"quality": 95}
class BookSmallJpg(ImageSpec):
"""Handles Small size in Jpeg format"""
processors = [ResizeToFit(100, 100)]
format = "JPEG"
options = {"quality": 95}
class BookMediumWebp(ImageSpec):
"""Handles Medium size in Webp format"""
processors = [ResizeToFit(150, 150)]
format = "WEBP"
options = {"quality": 95}
class BookMediumJpg(ImageSpec):
"""Handles Medium size in Jpeg format"""
processors = [ResizeToFit(150, 150)]
format = "JPEG"
options = {"quality": 95}
class BookLargeWebp(ImageSpec):
"""Handles Large size in Webp format"""
processors = [ResizeToFit(200, 200)]
format = "WEBP"
options = {"quality": 95}
class BookLargeJpg(ImageSpec):
"""Handles Large size in Jpeg format"""
processors = [ResizeToFit(200, 200)]
format = "JPEG"
options = {"quality": 95}
class BookXLargeWebp(ImageSpec):
"""Handles XLarge size in Webp format"""
processors = [ResizeToFit(250, 250)]
format = "WEBP"
options = {"quality": 95}
class BookXLargeJpg(ImageSpec):
"""Handles XLarge size in Jpeg format"""
processors = [ResizeToFit(250, 250)]
format = "JPEG"
options = {"quality": 95}
class BookXxLargeWebp(ImageSpec):
"""Handles XxLarge size in Webp format"""
processors = [ResizeToFit(500, 500)]
format = "WEBP"
options = {"quality": 95}
class BookXxLargeJpg(ImageSpec):
"""Handles XxLarge size in Jpeg format"""
processors = [ResizeToFit(500, 500)]
format = "JPEG"
options = {"quality": 95}
register.generator("bw:book:xsmall:webp", BookXSmallWebp)
register.generator("bw:book:xsmall:jpg", BookXSmallJpg)
register.generator("bw:book:small:webp", BookSmallWebp)
register.generator("bw:book:small:jpg", BookSmallJpg)
register.generator("bw:book:medium:webp", BookMediumWebp)
register.generator("bw:book:medium:jpg", BookMediumJpg)
register.generator("bw:book:large:webp", BookLargeWebp)
register.generator("bw:book:large:jpg", BookLargeJpg)
register.generator("bw:book:xlarge:webp", BookXLargeWebp)
register.generator("bw:book:xlarge:jpg", BookXLargeJpg)
register.generator("bw:book:xxlarge:webp", BookXxLargeWebp)
register.generator("bw:book:xxlarge:jpg", BookXxLargeJpg)

View file

@ -1,5 +1,8 @@
""" import classes """
from .importer import Importer
from .calibre_import import CalibreImporter
from .goodreads_import import GoodreadsImporter
from .librarything_import import LibrarythingImporter
from .openlibrary_import import OpenLibraryImporter
from .storygraph_import import StorygraphImporter

View file

@ -0,0 +1,28 @@
""" handle reading a csv from calibre """
from bookwyrm.models import Shelf
from . import Importer
class CalibreImporter(Importer):
"""csv downloads from Calibre"""
service = "Calibre"
def __init__(self, *args, **kwargs):
# Add timestamp to row_mappings_guesses for date_added to avoid
# integrity error
row_mappings_guesses = []
for field, mapping in self.row_mappings_guesses:
if field in ("date_added",):
row_mappings_guesses.append((field, mapping + ["timestamp"]))
else:
row_mappings_guesses.append((field, mapping))
self.row_mappings_guesses = row_mappings_guesses
super().__init__(*args, **kwargs)
def get_shelf(self, normalized_row):
# Calibre export does not indicate which shelf to use. Go with a default one for now
return Shelf.TO_READ

View file

@ -3,14 +3,7 @@ from . import Importer
class GoodreadsImporter(Importer):
"""GoodReads is the default importer, thus Importer follows its structure.
"""Goodreads is the default importer, thus Importer follows its structure.
For a more complete example of overriding see librarything_import.py"""
service = "GoodReads"
def parse_fields(self, entry):
""" handle the specific fields in goodreads csvs """
entry.update({"import_source": self.service})
# add missing 'Date Started' field
entry.update({"Date Started": None})
return entry
service = "Goodreads"

View file

@ -1,106 +1,184 @@
""" handle reading a csv from an external service, defaults are from GoodReads """
""" handle reading a csv from an external service, defaults are from Goodreads """
import csv
import logging
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from bookwyrm import models
from bookwyrm.models import ImportJob, ImportItem
from bookwyrm.tasks import app
from bookwyrm.tasks import app, LOW
logger = logging.getLogger(__name__)
class Importer:
""" Generic class for csv data import from an outside service """
"""Generic class for csv data import from an outside service"""
service = "Unknown"
service = "Import"
delimiter = ","
encoding = "UTF-8"
mandatory_fields = ["Title", "Author"]
# these are from Goodreads
row_mappings_guesses = [
("id", ["id", "book id"]),
("title", ["title"]),
("authors", ["author", "authors", "primary author"]),
("isbn_10", ["isbn10", "isbn"]),
("isbn_13", ["isbn13", "isbn", "isbns"]),
("shelf", ["shelf", "exclusive shelf", "read status", "bookshelf"]),
("review_name", ["review name"]),
("review_body", ["my review", "review"]),
("rating", ["my rating", "rating", "star rating"]),
("date_added", ["date added", "entry date", "added"]),
("date_started", ["date started", "started"]),
("date_finished", ["date finished", "last date read", "date read", "finished"]),
]
date_fields = ["date_added", "date_started", "date_finished"]
shelf_mapping_guesses = {
"to-read": ["to-read", "want to read"],
"read": ["read", "already read"],
"reading": ["currently-reading", "reading", "currently reading"],
}
def create_job(self, user, csv_file, include_reviews, privacy):
""" check over a csv and creates a database entry for the job"""
"""check over a csv and creates a database entry for the job"""
csv_reader = csv.DictReader(csv_file, delimiter=self.delimiter)
rows = enumerate(list(csv_reader))
job = ImportJob.objects.create(
user=user, include_reviews=include_reviews, privacy=privacy
user=user,
include_reviews=include_reviews,
privacy=privacy,
mappings=self.create_row_mappings(csv_reader.fieldnames),
source=self.service,
)
for index, entry in enumerate(
list(csv.DictReader(csv_file, delimiter=self.delimiter))
):
if not all(x in entry for x in self.mandatory_fields):
raise ValueError("Author and title must be in data.")
entry = self.parse_fields(entry)
self.save_item(job, index, entry)
for index, entry in rows:
self.create_item(job, index, entry)
return job
def save_item(self, job, index, data): # pylint: disable=no-self-use
""" creates and saves an import item """
ImportItem(job=job, index=index, data=data).save()
def update_legacy_job(self, job):
"""patch up a job that was in the old format"""
items = job.items
headers = list(items.first().data.keys())
job.mappings = self.create_row_mappings(headers)
job.updated_date = timezone.now()
job.save()
def parse_fields(self, entry):
""" updates csv data with additional info """
entry.update({"import_source": self.service})
return entry
for item in items.all():
normalized = self.normalize_row(item.data, job.mappings)
normalized["shelf"] = self.get_shelf(normalized)
item.normalized_data = normalized
item.save()
def create_row_mappings(self, headers):
"""guess what the headers mean"""
mappings = {}
for (key, guesses) in self.row_mappings_guesses:
value = [h for h in headers if h.lower() in guesses]
value = value[0] if len(value) else None
if value:
headers.remove(value)
mappings[key] = value
return mappings
def create_item(self, job, index, data):
"""creates and saves an import item"""
normalized = self.normalize_row(data, job.mappings)
normalized["shelf"] = self.get_shelf(normalized)
ImportItem(job=job, index=index, data=data, normalized_data=normalized).save()
def get_shelf(self, normalized_row):
"""determine which shelf to use"""
shelf_name = normalized_row.get("shelf")
if not shelf_name:
return None
shelf_name = shelf_name.lower()
shelf = [
s for (s, gs) in self.shelf_mapping_guesses.items() if shelf_name in gs
]
return shelf[0] if shelf else None
def normalize_row(self, entry, mappings): # pylint: disable=no-self-use
"""use the dataclass to create the formatted row of data"""
return {k: entry.get(v) for k, v in mappings.items()}
def create_retry_job(self, user, original_job, items):
""" retry items that didn't import """
"""retry items that didn't import"""
job = ImportJob.objects.create(
user=user,
include_reviews=original_job.include_reviews,
privacy=original_job.privacy,
source=original_job.source,
# TODO: allow users to adjust mappings
mappings=original_job.mappings,
retry=True,
)
for item in items:
self.save_item(job, item.index, item.data)
# this will re-normalize the raw data
self.create_item(job, item.index, item.data)
return job
def start_import(self, job):
""" initalizes a csv import job """
result = import_data.delay(self.service, job.id)
def start_import(self, job): # pylint: disable=no-self-use
"""initalizes a csv import job"""
result = start_import_task.delay(job.id)
job.task_id = result.id
job.save()
@app.task
def import_data(source, job_id):
""" does the actual lookup work in a celery task """
@app.task(queue="low_priority")
def start_import_task(job_id):
"""trigger the child tasks for each row"""
job = ImportJob.objects.get(id=job_id)
# these are sub-tasks so that one big task doesn't use up all the memory in celery
for item in job.items.values_list("id", flat=True).all():
import_item_task.delay(item)
@app.task(queue="low_priority")
def import_item_task(item_id):
"""resolve a row into a book"""
item = models.ImportItem.objects.get(id=item_id)
try:
for item in job.items.all():
try:
item.resolve()
except Exception as e: # pylint: disable=broad-except
logger.exception(e)
item.fail_reason = "Error loading book"
item.save()
continue
item.resolve()
except Exception as err: # pylint: disable=broad-except
item.fail_reason = _("Error loading book")
item.save()
item.update_job()
raise err
if item.book:
item.save()
if item.book:
# shelves book and handles reviews
handle_imported_book(item)
else:
item.fail_reason = _("Could not find a match for book")
# shelves book and handles reviews
handle_imported_book(
source, job.user, item, job.include_reviews, job.privacy
)
else:
item.fail_reason = "Could not find a match for book"
item.save()
finally:
job.complete = True
job.save()
item.save()
item.update_job()
def handle_imported_book(source, user, item, include_reviews, privacy):
""" process a csv and then post about it """
def handle_imported_book(item):
"""process a csv and then post about it"""
job = item.job
user = job.user
if isinstance(item.book, models.Work):
item.book = item.book.default_edition
if not item.book:
item.fail_reason = _("Error loading book")
item.save()
return
if not isinstance(item.book, models.Edition):
item.book = item.book.edition
existing_shelf = models.ShelfBook.objects.filter(book=item.book, user=user).exists()
# shelve the book if it hasn't been shelved already
if item.shelf and not existing_shelf:
desired_shelf = models.Shelf.objects.get(identifier=item.shelf, user=user)
models.ShelfBook.objects.create(book=item.book, shelf=desired_shelf, user=user)
shelved_date = item.date_added or timezone.now()
models.ShelfBook(
book=item.book, shelf=desired_shelf, user=user, shelved_date=shelved_date
).save(priority=LOW)
for read in item.reads:
# check for an existing readthrough with the same dates
@ -115,25 +193,52 @@ def handle_imported_book(source, user, item, include_reviews, privacy):
read.user = user
read.save()
if include_reviews and (item.rating or item.review):
review_title = (
"Review of {!r} on {!r}".format(
item.book.title,
source,
)
if item.review
else ""
)
if job.include_reviews and (item.rating or item.review) and not item.linked_review:
# we don't know the publication date of the review,
# but "now" is a bad guess
published_date_guess = item.date_read or item.date_added
models.Review.objects.create(
user=user,
book=item.book,
name=review_title,
content=item.review,
rating=item.rating,
published_date=published_date_guess,
privacy=privacy,
)
if item.review:
# pylint: disable=consider-using-f-string
review_title = "Review of {!r} on {!r}".format(
item.book.title,
job.source,
)
review = models.Review.objects.filter(
user=user,
book=item.book,
name=review_title,
rating=item.rating,
published_date=published_date_guess,
).first()
if not review:
review = models.Review(
user=user,
book=item.book,
name=review_title,
content=item.review,
rating=item.rating,
published_date=published_date_guess,
privacy=job.privacy,
)
review.save(software="bookwyrm", priority=LOW)
else:
# just a rating
review = models.ReviewRating.objects.filter(
user=user,
book=item.book,
published_date=published_date_guess,
rating=item.rating,
).first()
if not review:
review = models.ReviewRating(
user=user,
book=item.book,
rating=item.rating,
published_date=published_date_guess,
privacy=job.privacy,
)
review.save(software="bookwyrm", priority=LOW)
# only broadcast this review to other bookwyrm instances
item.linked_review = review
item.save()

View file

@ -1,42 +1,30 @@
""" handle reading a csv from librarything """
""" handle reading a tsv from librarything """
import re
import math
from bookwyrm.models import Shelf
from . import Importer
class LibrarythingImporter(Importer):
""" csv downloads from librarything """
"""csv downloads from librarything"""
service = "LibraryThing"
delimiter = "\t"
encoding = "ISO-8859-1"
# mandatory_fields : fields matching the book title and author
mandatory_fields = ["Title", "Primary Author"]
def parse_fields(self, entry):
""" custom parsing for librarything """
data = {}
data["import_source"] = self.service
data["Book Id"] = entry["Book Id"]
data["Title"] = entry["Title"]
data["Author"] = entry["Primary Author"]
data["ISBN13"] = entry["ISBN"]
data["My Review"] = entry["Review"]
if entry["Rating"]:
data["My Rating"] = math.ceil(float(entry["Rating"]))
else:
data["My Rating"] = ""
data["Date Added"] = re.sub(r"\[|\]", "", entry["Entry Date"])
data["Date Started"] = re.sub(r"\[|\]", "", entry["Date Started"])
data["Date Read"] = re.sub(r"\[|\]", "", entry["Date Read"])
def normalize_row(self, entry, mappings): # pylint: disable=no-self-use
"""use the dataclass to create the formatted row of data"""
remove_brackets = lambda v: re.sub(r"\[|\]", "", v) if v else None
normalized = {k: remove_brackets(entry.get(v)) for k, v in mappings.items()}
isbn_13 = normalized.get("isbn_13")
isbn_13 = isbn_13.split(", ") if isbn_13 else []
normalized["isbn_13"] = isbn_13[1] if len(isbn_13) > 0 else None
return normalized
data["Exclusive Shelf"] = None
if data["Date Read"]:
data["Exclusive Shelf"] = "read"
elif data["Date Started"]:
data["Exclusive Shelf"] = "reading"
else:
data["Exclusive Shelf"] = "to-read"
return data
def get_shelf(self, normalized_row):
if normalized_row["date_finished"]:
return Shelf.READ_FINISHED
if normalized_row["date_started"]:
return Shelf.READING
return Shelf.TO_READ

View file

@ -0,0 +1,13 @@
""" handle reading a csv from openlibrary"""
from . import Importer
class OpenLibraryImporter(Importer):
"""csv downloads from OpenLibrary"""
service = "OpenLibrary"
def __init__(self, *args, **kwargs):
self.row_mappings_guesses.append(("openlibrary_key", ["edition id"]))
self.row_mappings_guesses.append(("openlibrary_work_key", ["work id"]))
super().__init__(*args, **kwargs)

View file

@ -0,0 +1,8 @@
""" handle reading a csv from storygraph"""
from . import Importer
class StorygraphImporter(Importer):
"""csv downloads from Storygraph"""
service = "Storygraph"

251
bookwyrm/lists_stream.py Normal file
View file

@ -0,0 +1,251 @@
""" access the list streams stored in redis """
from django.dispatch import receiver
from django.db import transaction
from django.db.models import signals, Count, Q
from bookwyrm import models
from bookwyrm.redis_store import RedisStore
from bookwyrm.tasks import app, MEDIUM, HIGH
class ListsStream(RedisStore):
"""all the lists you can see"""
def stream_id(self, user): # pylint: disable=no-self-use
"""the redis key for this user's instance of this stream"""
if isinstance(user, int):
# allows the function to take an int or an obj
return f"{user}-lists"
return f"{user.id}-lists"
def get_rank(self, obj): # pylint: disable=no-self-use
"""lists are sorted by updated date"""
return obj.updated_date.timestamp()
def add_list(self, book_list):
"""add a list to users' feeds"""
# the pipeline contains all the add-to-stream activities
self.add_object_to_related_stores(book_list)
def add_user_lists(self, viewer, user):
"""add a user's lists to another user's feed"""
# only add the lists that the viewer should be able to see
lists = models.List.privacy_filter(viewer).filter(user=user)
self.bulk_add_objects_to_store(lists, self.stream_id(viewer))
def remove_user_lists(self, viewer, user, exclude_privacy=None):
"""remove a user's list from another user's feed"""
# remove all so that followers only lists are removed
lists = user.list_set
if exclude_privacy:
lists = lists.exclude(privacy=exclude_privacy)
self.bulk_remove_objects_from_store(lists.all(), self.stream_id(viewer))
def get_list_stream(self, user):
"""load the lists to be displayed"""
lists = self.get_store(self.stream_id(user))
return (
models.List.objects.filter(id__in=lists)
.annotate(item_count=Count("listitem", filter=Q(listitem__approved=True)))
# hide lists with no approved books
.filter(item_count__gt=0)
.select_related("user")
.prefetch_related("listitem_set")
.order_by("-updated_date")
.distinct()
)
def populate_lists(self, user):
"""go from zero to a timeline"""
self.populate_store(self.stream_id(user))
def get_audience(self, book_list): # pylint: disable=no-self-use
"""given a list, what users should see it"""
# everybody who could plausibly see this list
audience = models.User.objects.filter(
is_active=True,
local=True, # we only create feeds for users of this instance
).exclude( # not blocked
Q(id__in=book_list.user.blocks.all()) | Q(blocks=book_list.user)
)
group = book_list.group
# only visible to the poster and mentioned users
if book_list.privacy == "direct":
if group:
audience = audience.filter(
Q(id=book_list.user.id) # if the user is the post's author
| ~Q(groups=group.memberships) # if the user is in the group
)
else:
audience = audience.filter(
Q(id=book_list.user.id) # if the user is the post's author
)
# only visible to the poster's followers and tagged users
elif book_list.privacy == "followers":
if group:
audience = audience.filter(
Q(id=book_list.user.id) # if the user is the list's owner
| Q(following=book_list.user) # if the user is following the pwmer
# if a user is in the group
| Q(memberships__group__id=book_list.group.id)
)
else:
audience = audience.filter(
Q(id=book_list.user.id) # if the user is the list's owner
| Q(following=book_list.user) # if the user is following the pwmer
)
return audience.distinct()
def get_stores_for_object(self, obj):
return [self.stream_id(u) for u in self.get_audience(obj)]
def get_lists_for_user(self, user): # pylint: disable=no-self-use
"""given a user, what lists should they see on this stream"""
return models.List.privacy_filter(
user,
privacy_levels=["public", "followers"],
)
def get_objects_for_store(self, store):
user = models.User.objects.get(id=store.split("-")[0])
return self.get_lists_for_user(user)
@receiver(signals.post_save, sender=models.List)
# pylint: disable=unused-argument
def add_list_on_create(sender, instance, created, *args, **kwargs):
"""add newly created lists streamsstreams"""
if not created:
return
# when creating new things, gotta wait on the transaction
transaction.on_commit(lambda: add_list_on_create_command(instance.id))
@receiver(signals.post_delete, sender=models.List)
# pylint: disable=unused-argument
def remove_list_on_delete(sender, instance, *args, **kwargs):
"""remove deleted lists to streams"""
remove_list_task.delay(instance.id)
def add_list_on_create_command(instance_id):
"""runs this code only after the database commit completes"""
add_list_task.delay(instance_id)
@receiver(signals.post_save, sender=models.UserFollows)
# pylint: disable=unused-argument
def add_lists_on_follow(sender, instance, created, *args, **kwargs):
"""add a newly followed user's lists to feeds"""
if not created or not instance.user_subject.local:
return
add_user_lists_task.delay(instance.user_subject.id, instance.user_object.id)
@receiver(signals.post_delete, sender=models.UserFollows)
# pylint: disable=unused-argument
def remove_lists_on_unfollow(sender, instance, *args, **kwargs):
"""remove lists from a feed on unfollow"""
if not instance.user_subject.local:
return
# remove all but public lists
remove_user_lists_task.delay(
instance.user_subject.id, instance.user_object.id, exclude_privacy="public"
)
@receiver(signals.post_save, sender=models.UserBlocks)
# pylint: disable=unused-argument
def remove_lists_on_block(sender, instance, *args, **kwargs):
"""remove lists from all feeds on block"""
# blocks apply ot all feeds
if instance.user_subject.local:
remove_user_lists_task.delay(instance.user_subject.id, instance.user_object.id)
# and in both directions
if instance.user_object.local:
remove_user_lists_task.delay(instance.user_object.id, instance.user_subject.id)
@receiver(signals.post_delete, sender=models.UserBlocks)
# pylint: disable=unused-argument
def add_lists_on_unblock(sender, instance, *args, **kwargs):
"""add lists back to all feeds on unblock"""
# make sure there isn't a block in the other direction
if models.UserBlocks.objects.filter(
user_subject=instance.user_object,
user_object=instance.user_subject,
).exists():
return
# add lists back to streams with lists from anyone
if instance.user_subject.local:
add_user_lists_task.delay(
instance.user_subject.id,
instance.user_object.id,
)
# add lists back to streams with lists from anyone
if instance.user_object.local:
add_user_lists_task.delay(
instance.user_object.id,
instance.user_subject.id,
)
@receiver(signals.post_save, sender=models.User)
# pylint: disable=unused-argument
def populate_lists_on_account_create(sender, instance, created, *args, **kwargs):
"""build a user's feeds when they join"""
if not created or not instance.local:
return
transaction.on_commit(lambda: add_list_on_account_create_command(instance.id))
def add_list_on_account_create_command(user_id):
"""wait for the transaction to complete"""
populate_lists_task.delay(user_id)
# ---- TASKS
@app.task(queue=MEDIUM)
def populate_lists_task(user_id):
"""background task for populating an empty list stream"""
user = models.User.objects.get(id=user_id)
ListsStream().populate_lists(user)
@app.task(queue=MEDIUM)
def remove_list_task(list_id):
"""remove a list from any stream it might be in"""
stores = models.User.objects.filter(local=True, is_active=True).values_list(
"id", flat=True
)
# delete for every store
stores = [ListsStream().stream_id(idx) for idx in stores]
ListsStream().remove_object_from_related_stores(list_id, stores=stores)
@app.task(queue=HIGH)
def add_list_task(list_id):
"""add a list to any stream it should be in"""
book_list = models.List.objects.get(id=list_id)
ListsStream().add_list(book_list)
@app.task(queue=MEDIUM)
def remove_user_lists_task(viewer_id, user_id, exclude_privacy=None):
"""remove all lists by a user from a viewer's stream"""
viewer = models.User.objects.get(id=viewer_id)
user = models.User.objects.get(id=user_id)
ListsStream().remove_user_lists(viewer, user, exclude_privacy=exclude_privacy)
@app.task(queue=MEDIUM)
def add_user_lists_task(viewer_id, user_id):
"""add all lists by a user to a viewer's stream"""
viewer = models.User.objects.get(id=viewer_id)
user = models.User.objects.get(id=user_id)
ListsStream().add_user_lists(viewer, user)

View file

@ -0,0 +1,23 @@
""" Get your admin code to allow install """
from django.core.management.base import BaseCommand
from bookwyrm import models
def get_admin_code():
"""get that code"""
return models.SiteSettings.objects.get().admin_code
class Command(BaseCommand):
"""command-line options"""
help = "Gets admin code for configuring BookWyrm"
# pylint: disable=unused-argument
def handle(self, *args, **options):
"""execute init"""
self.stdout.write("*******************************************")
self.stdout.write("Use this code to create your admin account:")
self.stdout.write(get_admin_code())
self.stdout.write("*******************************************")

View file

@ -6,7 +6,7 @@ from bookwyrm import models
def update_related(canonical, obj):
""" update all the models with fk to the object being removed """
"""update all the models with fk to the object being removed"""
# move related models to canonical
related_models = [
(r.remote_field.name, r.related_model) for r in canonical._meta.related_objects
@ -24,7 +24,7 @@ def update_related(canonical, obj):
def copy_data(canonical, obj):
""" try to get the most data possible """
"""try to get the most data possible"""
for data_field in obj._meta.get_fields():
if not hasattr(data_field, "activitypub_field"):
continue
@ -38,7 +38,7 @@ def copy_data(canonical, obj):
def dedupe_model(model):
""" combine duplicate editions and update related models """
"""combine duplicate editions and update related models"""
fields = model._meta.get_fields()
dedupe_fields = [
f for f in fields if hasattr(f, "deduplication_field") and f.deduplication_field
@ -68,12 +68,12 @@ def dedupe_model(model):
class Command(BaseCommand):
""" dedplucate allllll the book data models """
"""dedplucate allllll the book data models"""
help = "merges duplicate book data"
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
""" run deudplications """
"""run deudplications"""
dedupe_model(models.Edition)
dedupe_model(models.Work)
dedupe_model(models.Author)

View file

@ -5,20 +5,23 @@ import redis
from bookwyrm import settings
r = redis.Redis(
host=settings.REDIS_ACTIVITY_HOST, port=settings.REDIS_ACTIVITY_PORT, db=0
host=settings.REDIS_ACTIVITY_HOST,
port=settings.REDIS_ACTIVITY_PORT,
password=settings.REDIS_ACTIVITY_PASSWORD,
db=settings.REDIS_ACTIVITY_DB_INDEX,
)
def erase_streams():
""" throw the whole redis away """
"""throw the whole redis away"""
r.flushall()
class Command(BaseCommand):
""" delete activity streams for all users """
"""delete activity streams for all users"""
help = "Delete all the user streams"
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
""" flush all, baby """
"""flush all, baby"""
erase_streams()

View file

@ -0,0 +1,73 @@
""" Generate preview images """
from django.core.management.base import BaseCommand
from bookwyrm import models, preview_images
# pylint: disable=line-too-long
class Command(BaseCommand):
"""Creates previews for existing objects"""
help = "Generate preview images"
# pylint: disable=no-self-use
def add_arguments(self, parser):
"""options for how the command is run"""
parser.add_argument(
"--all",
"-a",
action="store_true",
help="Generates images for ALL types: site, users and books. Can use a lot of computing power.",
)
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
"""generate preview images"""
self.stdout.write(
" | Hello! I will be generating preview images for your instance."
)
if options["all"]:
self.stdout.write(
"🧑‍🎨 ⎨ This might take quite long if your instance has a lot of books and users."
)
self.stdout.write(" | ✧ Thank you for your patience ✧")
else:
self.stdout.write("🧑‍🎨 ⎨ I will only generate the instance preview image.")
self.stdout.write(" | ✧ Be right back! ✧")
# Site
self.stdout.write(" → Site preview image: ", ending="")
preview_images.generate_site_preview_image_task.delay()
self.stdout.write(" OK 🖼")
# pylint: disable=consider-using-f-string
if options["all"]:
# Users
users = models.User.objects.filter(
local=True,
is_active=True,
)
self.stdout.write(
" → User preview images ({}): ".format(len(users)), ending=""
)
for user in users:
preview_images.generate_user_preview_image_task.delay(user.id)
self.stdout.write(".", ending="")
self.stdout.write(" OK 🖼")
# Books
book_ids = (
models.Book.objects.select_subclasses()
.filter()
.values_list("id", flat=True)
)
self.stdout.write(
" → Book preview images ({}): ".format(len(book_ids)), ending=""
)
for book_id in book_ids:
preview_images.generate_edition_preview_image_task.delay(book_id)
self.stdout.write(".", ending="")
self.stdout.write(" OK 🖼")
self.stdout.write("🧑‍🎨 ⎨ Im all done! ✧ Enjoy ✧")

View file

@ -1,25 +1,25 @@
from django.core.management.base import BaseCommand, CommandError
""" What you need in the database to make it work """
from django.core.management.base import BaseCommand
from django.contrib.auth.models import Group, Permission
from django.contrib.contenttypes.models import ContentType
from bookwyrm.models import Connector, FederatedServer, SiteSettings, User
from bookwyrm.settings import DOMAIN
from bookwyrm import models
def init_groups():
"""permission levels"""
groups = ["admin", "moderator", "editor"]
for group in groups:
Group.objects.create(name=group)
def init_permissions():
"""permission types"""
permissions = [
{
"codename": "edit_instance_settings",
"name": "change the instance info",
"groups": [
"admin",
],
"groups": ["admin"],
},
{
"codename": "set_user_group",
@ -53,7 +53,7 @@ def init_permissions():
},
]
content_type = ContentType.objects.get_for_model(User)
content_type = ContentType.objects.get_for_model(models.User)
for permission in permissions:
permission_obj = Permission.objects.create(
codename=permission["codename"],
@ -64,27 +64,12 @@ def init_permissions():
for group_name in permission["groups"]:
Group.objects.get(name=group_name).permissions.add(permission_obj)
# while the groups and permissions shouldn't be changed because the code
# depends on them, what permissions go with what groups should be editable
def init_connectors():
Connector.objects.create(
identifier=DOMAIN,
name="Local",
local=True,
connector_file="self_connector",
base_url="https://%s" % DOMAIN,
books_url="https://%s/book" % DOMAIN,
covers_url="https://%s/images/" % DOMAIN,
search_url="https://%s/search?q=" % DOMAIN,
isbn_search_url="https://%s/isbn/" % DOMAIN,
priority=1,
)
Connector.objects.create(
"""access book data sources"""
models.Connector.objects.create(
identifier="bookwyrm.social",
name="BookWyrm dot Social",
name="Bookwyrm.social",
connector_file="bookwyrm_connector",
base_url="https://bookwyrm.social",
books_url="https://bookwyrm.social/book",
@ -94,7 +79,20 @@ def init_connectors():
priority=2,
)
Connector.objects.create(
# pylint: disable=line-too-long
models.Connector.objects.create(
identifier="inventaire.io",
name="Inventaire",
connector_file="inventaire",
base_url="https://inventaire.io",
books_url="https://inventaire.io/api/entities",
covers_url="https://inventaire.io",
search_url="https://inventaire.io/api/search?types=works&types=works&search=",
isbn_search_url="https://inventaire.io/api/entities?action=by-uris&uris=isbn%3A",
priority=1,
)
models.Connector.objects.create(
identifier="openlibrary.org",
name="OpenLibrary",
connector_file="openlibrary",
@ -103,30 +101,71 @@ def init_connectors():
covers_url="https://covers.openlibrary.org",
search_url="https://openlibrary.org/search?q=",
isbn_search_url="https://openlibrary.org/api/books?jscmd=data&format=json&bibkeys=ISBN:",
priority=3,
priority=1,
)
def init_federated_servers():
""" big no to nazis """
built_in_blocks = ["gab.ai", "gab.com"]
for server in built_in_blocks:
FederatedServer.objects.create(
server_name=server,
status="blocked",
def init_settings():
"""info about the instance"""
models.SiteSettings.objects.create(
support_link="https://www.patreon.com/bookwyrm",
support_title="Patreon",
install_mode=True,
)
def init_link_domains():
"""safe book links"""
domains = [
("standardebooks.org", "Standard EBooks"),
("www.gutenberg.org", "Project Gutenberg"),
("archive.org", "Internet Archive"),
("openlibrary.org", "Open Library"),
("theanarchistlibrary.org", "The Anarchist Library"),
]
for domain, name in domains:
models.LinkDomain.objects.create(
domain=domain,
name=name,
status="approved",
)
def init_settings():
SiteSettings.objects.create()
# pylint: disable=no-self-use
# pylint: disable=unused-argument
class Command(BaseCommand):
"""command-line options"""
help = "Initializes the database with starter data"
def add_arguments(self, parser):
"""specify which function to run"""
parser.add_argument(
"--limit",
default=None,
help="Limit init to specific table",
)
def handle(self, *args, **options):
init_groups()
init_permissions()
init_connectors()
init_federated_servers()
init_settings()
"""execute init"""
limit = options.get("limit")
tables = [
"group",
"permission",
"connector",
"settings",
"linkdomain",
]
if limit and limit not in tables:
raise Exception("Invalid table limit:", limit)
if not limit or limit == "group":
init_groups()
if not limit or limit == "permission":
init_permissions()
if not limit or limit == "connector":
init_connectors()
if not limit or limit == "settings":
init_settings()
if not limit or limit == "linkdomain":
init_link_domains()

View file

@ -0,0 +1,54 @@
""" Get your admin code to allow install """
from django.core.management.base import BaseCommand
from bookwyrm import models
from bookwyrm.settings import VERSION
# pylint: disable=no-self-use
class Command(BaseCommand):
"""command-line options"""
help = "What version is this?"
def add_arguments(self, parser):
"""specify which function to run"""
parser.add_argument(
"--current",
action="store_true",
help="Version stored in database",
)
parser.add_argument(
"--target",
action="store_true",
help="Version stored in settings",
)
parser.add_argument(
"--update",
action="store_true",
help="Update database version",
)
# pylint: disable=unused-argument
def handle(self, *args, **options):
"""execute init"""
site = models.SiteSettings.objects.get()
current = site.version or "0.0.1"
target = VERSION
if options.get("current"):
print(current)
return
if options.get("target"):
print(target)
return
if options.get("update"):
site.version = target
site.save()
return
if current != target:
print(f"{current}/{target}")
else:
print(current)

View file

@ -0,0 +1,28 @@
""" Re-create list streams """
from django.core.management.base import BaseCommand
from bookwyrm import lists_stream, models
def populate_lists_streams():
"""build all the lists streams for all the users"""
print("Populating lists streams")
users = models.User.objects.filter(
local=True,
is_active=True,
).order_by("-last_active_date")
print("This may take a long time! Please be patient.")
for user in users:
print(".", end="")
lists_stream.populate_lists_task.delay(user.id)
print("\nAll done, thank you for your patience!")
class Command(BaseCommand):
"""start all over with lists streams"""
help = "Populate list streams for all users"
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
"""run feed builder"""
populate_lists_streams()

View file

@ -1,30 +1,39 @@
""" Re-create user streams """
from django.core.management.base import BaseCommand
import redis
from bookwyrm import activitystreams, models, settings
r = redis.Redis(
host=settings.REDIS_ACTIVITY_HOST, port=settings.REDIS_ACTIVITY_PORT, db=0
)
from bookwyrm import activitystreams, lists_stream, models
def populate_streams():
""" build all the streams for all the users """
def populate_streams(stream=None):
"""build all the streams for all the users"""
streams = [stream] if stream else activitystreams.streams.keys()
print("Populating streams", streams)
users = models.User.objects.filter(
local=True,
is_active=True,
)
).order_by("-last_active_date")
print("This may take a long time! Please be patient.")
for user in users:
for stream in activitystreams.streams.values():
stream.populate_streams(user)
print(".", end="")
lists_stream.populate_lists_task.delay(user.id)
for stream_key in streams:
print(".", end="")
activitystreams.populate_stream_task.delay(stream_key, user.id)
class Command(BaseCommand):
""" start all over with user streams """
"""start all over with user streams"""
help = "Populate streams for all users"
def add_arguments(self, parser):
parser.add_argument(
"--stream",
default=None,
help="Specifies which time of stream to populate",
)
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
""" run feed builder """
populate_streams()
"""run feed builder"""
stream = options.get("stream")
populate_streams(stream=stream)

View file

@ -0,0 +1,25 @@
""" Populate suggested users """
from django.core.management.base import BaseCommand
from bookwyrm import models
from bookwyrm.suggested_users import rerank_suggestions_task
def populate_suggestions():
"""build all the streams for all the users"""
users = models.User.objects.filter(
local=True,
is_active=True,
).values_list("id", flat=True)
for user in users:
rerank_suggestions_task.delay(user)
class Command(BaseCommand):
"""start all over with user suggestions"""
help = "Populate suggested users for all users"
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
"""run builder"""
populate_suggestions()

View file

@ -5,7 +5,7 @@ from bookwyrm import models
def remove_editions():
""" combine duplicate editions and update related models """
"""combine duplicate editions and update related models"""
# not in use
filters = {
"%s__isnull" % r.name: True for r in models.Edition._meta.related_objects
@ -33,10 +33,10 @@ def remove_editions():
class Command(BaseCommand):
""" dedplucate allllll the book data models """
"""dedplucate allllll the book data models"""
help = "merges duplicate book data"
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
""" run deudplications """
"""run deudplications"""
remove_editions()

View file

@ -0,0 +1,3 @@
""" look at all this nice middleware! """
from .timezone_middleware import TimezoneMiddleware
from .ip_middleware import IPBlocklistMiddleware

View file

@ -0,0 +1,16 @@
""" Block IP addresses """
from django.http import Http404
from bookwyrm import models
class IPBlocklistMiddleware:
"""check incoming traffic against an IP block-list"""
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
address = request.META.get("REMOTE_ADDR")
if models.IPBlocklist.objects.filter(address=address).exists():
raise Http404()
return self.get_response(request)

View file

@ -1,9 +1,12 @@
""" Makes the app aware of the users timezone """
import pytz
from django.utils import timezone
class TimezoneMiddleware:
"""Determine the timezone based on the request"""
def __init__(self, get_response):
self.get_response = get_response

View file

@ -8,7 +8,7 @@ from psycopg2.extras import execute_values
def convert_review_rating(app_registry, schema_editor):
""" take rating type Reviews and convert them to ReviewRatings """
"""take rating type Reviews and convert them to ReviewRatings"""
db_alias = schema_editor.connection.alias
reviews = (
@ -29,7 +29,7 @@ VALUES %s""",
def unconvert_review_rating(app_registry, schema_editor):
""" undo the conversion from ratings back to reviews"""
"""undo the conversion from ratings back to reviews"""
# All we need to do to revert this is drop the table, which Django will do
# on its own, as long as we have a valid reverse function. So, this is a
# no-op function so Django will do its thing

View file

@ -0,0 +1,27 @@
# Generated by Django 3.0.7 on 2021-02-14 00:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0045_auto_20210210_2114"),
]
operations = [
migrations.AddField(
model_name="user",
name="default_post_privacy",
field=models.CharField(
choices=[
("public", "Public"),
("unlisted", "Unlisted"),
("followers", "Followers"),
("direct", "Direct"),
],
default="public",
max_length=255,
),
),
]

View file

@ -0,0 +1,30 @@
# Generated by Django 3.1.6 on 2021-04-06 17:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0061_auto_20210402_1435"),
]
operations = [
migrations.RemoveConstraint(
model_name="connector",
name="connector_file_valid",
),
migrations.AlterField(
model_name="connector",
name="connector_file",
field=models.CharField(
choices=[
("openlibrary", "Openlibrary"),
("inventaire", "Inventaire"),
("self_connector", "Self Connector"),
("bookwyrm_connector", "Bookwyrm Connector"),
],
max_length=255,
),
),
]

View file

@ -0,0 +1,63 @@
# Generated by Django 3.1.6 on 2021-04-07 00:45
import bookwyrm.models.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0062_auto_20210406_1731"),
]
operations = [
migrations.AddField(
model_name="author",
name="bnf_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name="author",
name="gutenberg_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name="author",
name="inventaire_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name="author",
name="isni",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name="author",
name="viaf_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name="book",
name="bnf_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
migrations.AddField(
model_name="book",
name="inventaire_id",
field=bookwyrm.models.fields.CharField(
blank=True, max_length=255, null=True
),
),
]

View file

@ -0,0 +1,35 @@
# Generated by Django 3.1.8 on 2021-04-23 01:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0069_auto_20210422_1604"),
]
operations = [
migrations.AlterUniqueTogether(
name="usertag",
unique_together=None,
),
migrations.RemoveField(
model_name="usertag",
name="book",
),
migrations.RemoveField(
model_name="usertag",
name="tag",
),
migrations.RemoveField(
model_name="usertag",
name="user",
),
migrations.DeleteModel(
name="Tag",
),
migrations.DeleteModel(
name="UserTag",
),
]

View file

@ -0,0 +1,13 @@
# Generated by Django 3.2 on 2021-04-26 21:32
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0063_auto_20210407_0045"),
("bookwyrm", "0070_auto_20210423_0121"),
]
operations = []

View file

@ -0,0 +1,17 @@
# Generated by Django 3.2 on 2021-04-28 22:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0071_merge_0063_auto_20210407_0045_0070_auto_20210423_0121"),
]
operations = [
migrations.RemoveField(
model_name="work",
name="default_edition",
),
]

View file

@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2021-04-30 17:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0072_remove_work_default_edition"),
]
operations = [
migrations.AddField(
model_name="sitesettings",
name="footer_item",
field=models.TextField(blank=True, null=True),
),
]

View file

@ -0,0 +1,48 @@
# Generated by Django 3.2 on 2021-05-11 18:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0073_sitesettings_footer_item"),
]
operations = [
migrations.RemoveField(
model_name="connector",
name="max_query_count",
),
migrations.RemoveField(
model_name="connector",
name="politeness_delay",
),
migrations.RemoveField(
model_name="connector",
name="query_count",
),
migrations.RemoveField(
model_name="connector",
name="query_count_expiry",
),
migrations.AddField(
model_name="connector",
name="active",
field=models.BooleanField(default=True),
),
migrations.AddField(
model_name="connector",
name="deactivation_reason",
field=models.CharField(
blank=True,
choices=[
("self_deletion", "Self Deletion"),
("moderator_deletion", "Moderator Deletion"),
("domain_block", "Domain Block"),
],
max_length=255,
null=True,
),
),
]

View file

@ -0,0 +1,56 @@
# Generated by Django 3.2 on 2021-05-20 19:34
import bookwyrm.models.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0074_auto_20210511_1829"),
]
operations = [
migrations.CreateModel(
name="Announcement",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("created_date", models.DateTimeField(auto_now_add=True)),
("updated_date", models.DateTimeField(auto_now=True)),
(
"remote_id",
bookwyrm.models.fields.RemoteIdField(
max_length=255,
null=True,
validators=[bookwyrm.models.fields.validate_remote_id],
),
),
("preview", models.CharField(max_length=255)),
("content", models.TextField(blank=True, null=True)),
("event_date", models.DateTimeField(blank=True, null=True)),
("start_date", models.DateTimeField(blank=True, null=True)),
("end_date", models.DateTimeField(blank=True, null=True)),
("active", models.BooleanField(default=True)),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"abstract": False,
},
),
]

View file

@ -0,0 +1,32 @@
# Generated by Django 3.2 on 2021-05-26 12:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0075_announcement"),
]
operations = [
migrations.AddField(
model_name="book",
name="preview_image",
field=models.ImageField(
blank=True, null=True, upload_to="previews/covers/"
),
),
migrations.AddField(
model_name="sitesettings",
name="preview_image",
field=models.ImageField(blank=True, null=True, upload_to="previews/logos/"),
),
migrations.AddField(
model_name="user",
name="preview_image",
field=models.ImageField(
blank=True, null=True, upload_to="previews/avatars/"
),
),
]

View file

@ -0,0 +1,126 @@
# Generated by Django 3.2.4 on 2021-06-23 21:55
import django.contrib.postgres.indexes
import django.contrib.postgres.search
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0076_preview_images"),
]
operations = [
migrations.AddField(
model_name="author",
name="search_vector",
field=django.contrib.postgres.search.SearchVectorField(null=True),
),
migrations.AddField(
model_name="book",
name="search_vector",
field=django.contrib.postgres.search.SearchVectorField(null=True),
),
migrations.AddIndex(
model_name="author",
index=django.contrib.postgres.indexes.GinIndex(
fields=["search_vector"], name="bookwyrm_au_search__b050a8_gin"
),
),
migrations.AddIndex(
model_name="book",
index=django.contrib.postgres.indexes.GinIndex(
fields=["search_vector"], name="bookwyrm_bo_search__51beb3_gin"
),
),
migrations.RunSQL(
sql="""
CREATE FUNCTION book_trigger() RETURNS trigger AS $$
begin
new.search_vector :=
coalesce(
NULLIF(setweight(to_tsvector('english', coalesce(new.title, '')), 'A'), ''),
setweight(to_tsvector('simple', coalesce(new.title, '')), 'A')
) ||
setweight(to_tsvector('english', coalesce(new.subtitle, '')), 'B') ||
(SELECT setweight(to_tsvector('simple', coalesce(array_to_string(array_agg(bookwyrm_author.name), ' '), '')), 'C')
FROM bookwyrm_book
LEFT OUTER JOIN bookwyrm_book_authors
ON bookwyrm_book.id = bookwyrm_book_authors.book_id
LEFT OUTER JOIN bookwyrm_author
ON bookwyrm_book_authors.author_id = bookwyrm_author.id
WHERE bookwyrm_book.id = new.id
) ||
setweight(to_tsvector('english', coalesce(new.series, '')), 'D');
return new;
end
$$ LANGUAGE plpgsql;
CREATE TRIGGER search_vector_trigger
BEFORE INSERT OR UPDATE OF title, subtitle, series, search_vector
ON bookwyrm_book
FOR EACH ROW EXECUTE FUNCTION book_trigger();
UPDATE bookwyrm_book SET search_vector = NULL;
""",
reverse_sql="""
DROP TRIGGER IF EXISTS search_vector_trigger
ON bookwyrm_book;
DROP FUNCTION IF EXISTS book_trigger;
""",
),
# when an author is edited
migrations.RunSQL(
sql="""
CREATE FUNCTION author_trigger() RETURNS trigger AS $$
begin
WITH book AS (
SELECT bookwyrm_book.id as row_id
FROM bookwyrm_author
LEFT OUTER JOIN bookwyrm_book_authors
ON bookwyrm_book_authors.id = new.id
LEFT OUTER JOIN bookwyrm_book
ON bookwyrm_book.id = bookwyrm_book_authors.book_id
)
UPDATE bookwyrm_book SET search_vector = ''
FROM book
WHERE id = book.row_id;
return new;
end
$$ LANGUAGE plpgsql;
CREATE TRIGGER author_search_vector_trigger
AFTER UPDATE OF name
ON bookwyrm_author
FOR EACH ROW EXECUTE FUNCTION author_trigger();
""",
reverse_sql="""
DROP TRIGGER IF EXISTS author_search_vector_trigger
ON bookwyrm_author;
DROP FUNCTION IF EXISTS author_trigger;
""",
),
# when an author is added to or removed from a book
migrations.RunSQL(
sql="""
CREATE FUNCTION book_authors_trigger() RETURNS trigger AS $$
begin
UPDATE bookwyrm_book SET search_vector = ''
WHERE id = coalesce(new.book_id, old.book_id);
return new;
end
$$ LANGUAGE plpgsql;
CREATE TRIGGER book_authors_search_vector_trigger
AFTER INSERT OR DELETE
ON bookwyrm_book_authors
FOR EACH ROW EXECUTE FUNCTION book_authors_trigger();
""",
reverse_sql="""
DROP TRIGGER IF EXISTS book_authors_search_vector_trigger
ON bookwyrm_book_authors;
DROP FUNCTION IF EXISTS book_authors_trigger;
""",
),
]

View file

@ -0,0 +1,34 @@
# Generated by Django 3.2.4 on 2021-07-03 08:25
from django.db import migrations, models
import django.utils.timezone
def copy_created_date(app_registry, schema_editor):
db_alias = schema_editor.connection.alias
ShelfBook = app_registry.get_model("bookwyrm", "ShelfBook")
ShelfBook.objects.all().update(shelved_date=models.F("created_date"))
def do_nothing(app_registry, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0077_auto_20210623_2155"),
]
operations = [
migrations.AlterModelOptions(
name="shelfbook",
options={"ordering": ("-shelved_date",)},
),
migrations.AddField(
model_name="shelfbook",
name="shelved_date",
field=models.DateTimeField(default=django.utils.timezone.now),
),
migrations.RunPython(copy_created_date, reverse_code=do_nothing),
]

View file

@ -0,0 +1,13 @@
# Generated by Django 3.2.4 on 2021-08-04 17:46
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0046_user_default_post_privacy"),
("bookwyrm", "0078_add_shelved_date"),
]
operations = []

View file

@ -0,0 +1,17 @@
# Generated by Django 3.2.4 on 2021-08-05 00:00
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0079_merge_20210804_1746"),
]
operations = [
migrations.AlterModelOptions(
name="shelfbook",
options={"ordering": ("-shelved_date", "-created_date", "-updated_date")},
),
]

View file

@ -0,0 +1,19 @@
# Generated by Django 3.2.4 on 2021-08-06 02:51
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0080_alter_shelfbook_options"),
]
operations = [
migrations.AlterField(
model_name="user",
name="last_active_date",
field=models.DateTimeField(default=django.utils.timezone.now),
),
]

View file

@ -0,0 +1,56 @@
# Generated by Django 3.2.4 on 2021-08-06 23:24
import bookwyrm.models.base_model
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0081_alter_user_last_active_date"),
]
operations = [
migrations.AddField(
model_name="sitesettings",
name="require_confirm_email",
field=models.BooleanField(default=True),
),
migrations.AddField(
model_name="user",
name="confirmation_code",
field=models.CharField(
default=bookwyrm.models.base_model.new_access_code, max_length=32
),
),
migrations.AlterField(
model_name="connector",
name="deactivation_reason",
field=models.CharField(
blank=True,
choices=[
("pending", "Pending"),
("self_deletion", "Self Deletion"),
("moderator_deletion", "Moderator Deletion"),
("domain_block", "Domain Block"),
],
max_length=255,
null=True,
),
),
migrations.AlterField(
model_name="user",
name="deactivation_reason",
field=models.CharField(
blank=True,
choices=[
("pending", "Pending"),
("self_deletion", "Self Deletion"),
("moderator_deletion", "Moderator Deletion"),
("domain_block", "Domain Block"),
],
max_length=255,
null=True,
),
),
]

View file

@ -0,0 +1,56 @@
# Generated by Django 3.2.4 on 2021-08-16 20:22
import bookwyrm.models.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0082_auto_20210806_2324"),
]
operations = [
migrations.AddField(
model_name="comment",
name="reading_status",
field=bookwyrm.models.fields.CharField(
blank=True,
choices=[
("to-read", "Toread"),
("reading", "Reading"),
("read", "Read"),
],
max_length=255,
null=True,
),
),
migrations.AddField(
model_name="quotation",
name="reading_status",
field=bookwyrm.models.fields.CharField(
blank=True,
choices=[
("to-read", "Toread"),
("reading", "Reading"),
("read", "Read"),
],
max_length=255,
null=True,
),
),
migrations.AddField(
model_name="review",
name="reading_status",
field=bookwyrm.models.fields.CharField(
blank=True,
choices=[
("to-read", "Toread"),
("reading", "Reading"),
("read", "Read"),
],
max_length=255,
null=True,
),
),
]

View file

@ -0,0 +1,56 @@
# Generated by Django 3.2.4 on 2021-08-17 19:16
import bookwyrm.models.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0083_auto_20210816_2022"),
]
operations = [
migrations.AlterField(
model_name="comment",
name="reading_status",
field=bookwyrm.models.fields.CharField(
blank=True,
choices=[
("to-read", "To-Read"),
("reading", "Reading"),
("read", "Read"),
],
max_length=255,
null=True,
),
),
migrations.AlterField(
model_name="quotation",
name="reading_status",
field=bookwyrm.models.fields.CharField(
blank=True,
choices=[
("to-read", "To-Read"),
("reading", "Reading"),
("read", "Read"),
],
max_length=255,
null=True,
),
),
migrations.AlterField(
model_name="review",
name="reading_status",
field=bookwyrm.models.fields.CharField(
blank=True,
choices=[
("to-read", "To-Read"),
("reading", "Reading"),
("read", "Read"),
],
max_length=255,
null=True,
),
),
]

View file

@ -0,0 +1,20 @@
# Generated by Django 3.2.4 on 2021-08-23 18:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0084_auto_20210817_1916"),
]
operations = [
migrations.AddField(
model_name="user",
name="saved_lists",
field=models.ManyToManyField(
related_name="saved_lists", to="bookwyrm.List"
),
),
]

View file

@ -0,0 +1,40 @@
# Generated by Django 3.2.4 on 2021-08-27 17:27
from django.db import migrations, models
import django.db.models.expressions
def normalize_readthrough_dates(app_registry, schema_editor):
"""Find any invalid dates and reset them"""
db_alias = schema_editor.connection.alias
app_registry.get_model("bookwyrm", "ReadThrough").objects.using(db_alias).filter(
start_date__gt=models.F("finish_date")
).update(start_date=models.F("finish_date"))
def reverse_func(apps, schema_editor):
"""nothing to do here"""
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0085_user_saved_lists"),
]
operations = [
migrations.RunPython(normalize_readthrough_dates, reverse_func),
migrations.AlterModelOptions(
name="readthrough",
options={"ordering": ("-start_date",)},
),
migrations.AddConstraint(
model_name="readthrough",
constraint=models.CheckConstraint(
check=models.Q(
("finish_date__gte", django.db.models.expressions.F("start_date"))
),
name="chronology",
),
),
]

Some files were not shown because too many files have changed in this diff Show more