Commit graph

86 commits

Author SHA1 Message Date
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
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
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
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
Mouse Reeve
73a8f89bee
Merge branch 'main' into bookwyrm-groups 2021-10-06 11:37:38 -07:00
Mouse Reeve
97cc129478 Updates calls to privacy_filter 2021-10-06 10:37:09 -07:00
Hugh Rundle
dafda649f1 run Black on changed code 2021-10-04 21:31:28 +11:00
Hugh Rundle
77ac8e0c04 add group membership to raise_not_deletable for lists 2021-10-03 11:45:53 +11: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
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
Hugh Rundle
8496f24032 fix filters for group members to see and edit group lists 2021-10-02 18:09:15 +10:00
Mouse Reeve
5dd2aac600 Merge branch 'main' into search-refactor 2021-09-30 10:41:30 -07:00
Mouse Reeve
f13f3d460c Fixing checking list perms 2021-09-27 17:52:27 -07:00
Mouse Reeve
62ff9d6199 Python formatting 2021-09-27 16:08:52 -07:00
Mouse Reeve
dfa8bafe18 Uses new visible/editable/deleteable functions 2021-09-27 16:04:40 -07:00
Mouse Reeve
556ae0726b Check perms in list views 2021-09-27 14:03:06 -07: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
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
f3a3ba5f01 pass group value to list views and vice-versa 2021-09-26 15:56:02 +10:00
Mouse Reeve
cf3157a3b5 Merge branch 'main' into pylint-update 2021-09-20 16:31:27 -07:00
Mouse Reeve
aa0ffd86c0 Fetch related items when loading list page 2021-09-20 14:49:07 -07:00
Mouse Reeve
acfb1bb376 Updating string format synatx part 2 2021-09-18 11:32:00 -07:00
Mouse Reeve
0d5e05a3c2 Updates other calls to the search endpoint 2021-09-16 10:55:23 -07:00
Mouse Reeve
c630ec3572 Adds delete list view 2021-09-06 10:41:55 -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
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
7345705b08 Small efficiency improvement in list view 2021-08-21 20:21:39 -07:00
Mouse Reeve
4479864008 Updates code for linter 2021-06-18 14:12:56 -07:00
Mouse Reeve
92e2c70baf Fixes list sorting by rating 2021-05-10 18:28:31 -07:00
Mouse Reeve
7dfc991468 Adds elided page range to shelf pagination 2021-05-03 14:47:27 -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
5bb341ba52 Use copy of requests GET params in list redirect 2021-04-26 11:43:13 -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
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
Mouse Reeve
91aa6fa95f Remove unneeded page checking logic 2021-04-19 15:01:20 -07:00
Mouse Reeve
77775d9bf8 Remove superfluous calls to all() 2021-04-19 14:47:59 -07:00
Pablo Barton
fa75438070 per review, removing custom pagination for booklist and handling all pending books at the end of the list 2021-04-18 14:46:28 -04:00
Pablo Barton
afd1cdc2a8 adjust test 2021-04-18 11:52:22 -04:00
Pablo Barton
3d0de5bea8 approving list items puts them at the end of the list 2021-04-18 11:15:42 -04:00
Pablo Barton
602c8c83ba black 2021-04-17 22:09:00 -04:00
Pablo Barton
9031184176 addressing some review 2021-04-17 21:31:38 -04:00
Pablo Barton
f6824268ed 584 sorting of lists 2021-04-16 22:17:15 -04:00
Pablo Barton
88d37736ee 902 using get_page for Paginator instead of page 2021-04-15 08:54:23 -04:00
Mouse Reeve
77caf1a8fa Merge branch 'main' into domain-block 2021-04-11 10:02:11 -07:00
Mouse Reeve
b6a7871b04 Makes visibility evaluator a model function 2021-04-11 09:31:18 -07:00