-
-
Notifications
You must be signed in to change notification settings - Fork 267
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! |
Hi @mouse-reeve, I have a question regarding the best practice for the Wikidata field format. Should it be entered as "Q56789" or simply "56789"? I want to make sure I follow the recommended convention. Thank you in advance for your guidance! |
Hi @Guanchishan . Please, do include the On a different note, for the future, if you want your question to have better chances to be answered, you may want to ask them in an issue, not as a comment in a Pull Request that has been closed and therefore, unlikely to be read again ;) |
Thank you so much for your reply and tips! |
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