-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add wikidata field for authors #3275
Conversation
This PR simply creates a field for wikidata and displays it on the author's profile. Nothing else. Currently, any string can be added to the field. I would want to add the following:
But I do not know how to do it. Suggestions are welcome. Also, I would like to create an importer, but this will come in future PR, if I manage to understand how the inventaire import works (I believe there will be quite some things to re-use). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the only change needed her is removing the change to the model. Otherwise it's a great addition to have this be an editable field on Author
.
bookwyrm/models/author.py
Outdated
@@ -18,6 +18,9 @@ class Author(BookDataModel): | |||
wikipedia_link = fields.CharField( | |||
max_length=255, blank=True, null=True, deduplication_field=True | |||
) | |||
wikidata = fields.CharField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to add this here -- the field is already on this model, it's inherited from the parent model, BookDataModel
: https://github.com/bookwyrm-social/bookwyrm/blob/main/bookwyrm/models/book.py#L55
thanks for dealing wiht this, @mouse-reeve . Apologies because life got busy for me and I left that unfinished. Glad you did it! |
This PR simply creates a field for wikidata and displays it on the author's profile. Nothing else.
Adding a wikidata field to author's profile would be the first step to address the issues with multiple, multilingual wikipedia links #1585