diff --git a/bookwyrm/forms/author.py b/bookwyrm/forms/author.py index 5b54a07b5..a3a759af7 100644 --- a/bookwyrm/forms/author.py +++ b/bookwyrm/forms/author.py @@ -15,6 +15,7 @@ class AuthorForm(CustomForm): "aliases", "bio", "wikipedia_link", + "wikidata", "website", "born", "died", @@ -32,6 +33,7 @@ class AuthorForm(CustomForm): "wikipedia_link": forms.TextInput( attrs={"aria-describedby": "desc_wikipedia_link"} ), + "wikidata": forms.TextInput(attrs={"aria-describedby": "desc_wikidata"}), "website": forms.TextInput(attrs={"aria-describedby": "desc_website"}), "born": forms.SelectDateWidget(attrs={"aria-describedby": "desc_born"}), "died": forms.SelectDateWidget(attrs={"aria-describedby": "desc_died"}), diff --git a/bookwyrm/templates/author/edit_author.html b/bookwyrm/templates/author/edit_author.html index 12ddc4d28..f3e908c9b 100644 --- a/bookwyrm/templates/author/edit_author.html +++ b/bookwyrm/templates/author/edit_author.html @@ -55,6 +55,8 @@

{{ form.wikipedia_link }}

+

{{ form.wikidata }}

+ {% include 'snippets/form_errors.html' with errors_list=form.wikipedia_link.errors id="desc_wikipedia_link" %}

{{ form.website }}

diff --git a/bookwyrm/tests/data/user_import.json b/bookwyrm/tests/data/user_import.json index 0318ddfeb..ffe2e7d9e 100644 --- a/bookwyrm/tests/data/user_import.json +++ b/bookwyrm/tests/data/user_import.json @@ -136,6 +136,7 @@ ], "bio": "

American political scientist and anthropologist

", "wikipediaLink": "https://en.wikipedia.org/wiki/James_C._Scott", + "wikidata": "Q3025403", "website": "", "@context": "https://www.w3.org/ns/activitystreams" } @@ -320,6 +321,7 @@ "aliases": [], "bio": "", "wikipediaLink": "", + "wikidata": "", "website": "", "@context": "https://www.w3.org/ns/activitystreams" } @@ -396,4 +398,4 @@ "https://your.domain.here/user/rat" ], "blocks": ["https://your.domain.here/user/badger"] -} \ No newline at end of file +}