Commit graph

89 commits

Author SHA1 Message Date
Mouse Reeve
48f8ee57a6 Merge branch 'main' into check-version-number 2024-02-03 08:02:15 -08:00
Mouse Reeve
01db77a745 Adds success message 2024-01-02 18:29:55 -08:00
Mouse Reeve
d6f7f76c4d Removes outdated/unused version and updating code
I had the bright idea of creating this update script but it doesn't work
and hasn't been maintained, so it's just sitting there causing confusing
and requiring weird things to exist in other places.

Now, the unused `version` field can be removed and I can scrap the
management command for getting versions.
2024-01-02 11:37:01 -08:00
Mouse Reeve
381490e31d Adds management command to clear all deleted user data 2024-01-02 10:50:46 -08:00
Mouse Reeve
455b0c82ea Fixes typo and outdated comment 2023-08-01 20:53:06 -07:00
Mouse Reeve
eee4e30e25 Adds managment command to repair editions in bad state 2023-07-17 11:22:59 -07:00
Neil Roberts
d80cefd416 Add a management command to merge works 2023-04-26 15:54:37 +02:00
Jascha Urbach
e28562949b
./bw.-dev black
get rid of the black error.
2023-04-15 16:31:15 +02:00
Neil Roberts
bd893e29de Add management commands to merge editions and authors 2023-04-15 11:59:40 +02:00
Neil Roberts
71e2486d01 Move the merging code from deduplicate code to common module
That way it can be used in a new command to merge individual items.
2023-04-15 11:59:40 +02:00
Neil Roberts
2bbc9a16ad Fix deduplicating books that are on a shelf or in a list
Previously when the deduplicate_book_data script tried to merge an
edition that was on a shelf or in a list then it would fail because when
the canonical book was added to the shelf or the list then it wouldn’t
set the extra fields of the linking table for the “through” model of the
field. These would end up defaulting to NULL, but that is not valid for
some of the fields in ShelfItem and ListItem so postgres wouldn’t accept
it.

To fix that, this patch makes it skip updating fields that have a
non-autogenerated linking table. The linking table would appear as a
separate model anyway so the book will be moved via that instead.

Fixes: #2817
2023-04-15 11:59:12 +02:00
Josh Soref
4c9408d772 spelling: revoke
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
45a1457a4f spelling: deduplications
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
c2022acf67 spelling: deduplicate
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Mouse Reeve
e55e4429b1
Merge pull request #2604 from rrgeorge/redis-sockets
Add support to connecting to redis via unix socket
2023-01-26 06:39:15 -08:00
Christof Dorner
c991733c8d Set default auth user group to editor on initdb 2023-01-21 17:04:32 +01:00
Robert George
207abed654 Add support for specifying redis url to support unix sockets 2023-01-14 14:52:54 -08:00
Joachim
f0dc146005 Merge branch 'main' into disable-remote-users-preview-images 2022-12-19 22:32:30 +01:00
Christof Dorner
f5ebdd4ba1 Add compile_themes management command 2022-12-19 18:43:16 +01:00
Joachim
00c2930290 Black 2022-12-17 17:56:28 +01:00
Joachim
b570602a47 Update remove_remote_user_preview_images.py 2022-12-17 17:35:44 +01:00
Joachim
09c095cfec Add remove_remote_user_preview_images command 2022-12-17 17:34:27 +01:00
Mouse Reeve
3a9a344089
Merge pull request #2478 from bookwyrm-social/admin-roles
Adds "owner" role
2022-12-11 13:05:39 -08:00
Jascha Urbach
ea316627be
Manual email confirm (#2492)
* manual approve email via bw-dev/manage.py

./bw-dev confirm_email USER
(venv) python manage.py confirm_email USER

* add "confirm_email" and "remove_2fa" to autocompletion

* OK, sometimes I feel fooled by this.

The lione was not LONG ENOUGH.

* Change deactivate reason to None

* Whyever this works now

Python in my system is a wondermachine.
2022-12-11 12:35:20 -08:00
Mouse Reeve
f779c57f33 Safely get or create permissions for tests/re-running 2022-12-06 14:25:50 -08:00
Mouse Reeve
9b087199ed Adds new role and permissions 2022-12-05 16:07:09 -08:00
Jascha Urbach
8a99482a2f
correct linter errors
./bw-dev black

reformatted bookwyrm/management/commands/remove_2fa.py

All done!  🍰 
1 file reformatted, 544 files left unchanged.
2022-11-15 23:32:24 +01:00
Jascha Urbach
cd57537854
Remove TFA from user
added bookwyrm/management/remove_2fa.py

changed bw-dev
2022-11-15 23:20:21 +01:00
Mouse Reeve
b812a5c73e Adds management command to revoke preview image tasks 2022-11-14 12:09:16 -08: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
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
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
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
820279166a Adds update script 2022-03-16 12:39:49 -07: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
63558bb75e Python formatting 2022-02-17 11:31:52 -08:00
Mouse Reeve
ed536e6b41 Adds command to get admin code 2022-02-17 10:59:28 -08:00
Mouse Reeve
7811a9920e Copy config from prod branch to main 2022-02-04 18:36:12 -08:00
Mouse Reeve
ba18e1e34b Adds tests for initdb command 2022-01-27 13:23:29 -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
67c3091aa1 Fixes option checking in initdb management command 2022-01-22 15:09:30 -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
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
Jade Meskill
3638e18844
add support for different redis db 2022-01-12 19:44:11 -07: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