-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support "Add new instrument name"; Initialize "Upload image"; #164
base: develop
Are you sure you want to change the base?
Conversation
- remove "instrument-detail" page - add two buttons on each instrument card: "Upload new images" & "View on wikidata" - initialize image upload modal UI Refs: #150
- remove "instrument-detail" page - add two buttons on each instrument card: "Upload new images" & "View on wikidata" - initialize image upload modal UI Refs: #150
- add new instrument name, source, description, and alias by a modal; - optionally publish to wikidata; Refs: #163
Refs: #163
web-app/django/VIM/apps/instruments/templates/instruments/includes/stdView.html
Outdated
Show resolved
Hide resolved
- remove "alias" field from "InstrumentName" model; - move "publish_name" to a separate .py file - use "csrf_protect" decorator for "publish_name" - extract the common code in "mansonryView.html" and "stdView.html" Refs: #163
@@ -15,7 +15,7 @@ class Command(BaseCommand): | |||
|
|||
NOTE: For now, this script only imports instrument names in English and French. It | |||
also only imports a set of previously-curated instruments that have images available. | |||
This list of instruments is stored in startup_data/vim_instruments_with_images-15sept.csv | |||
This list of instruments is stored in startup_data/all_instruments_with_16aug_2024.csv |
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.
No longer the right file name. You could probably just take out this comment and make the file name a command-line argument or a constant.
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'm overall confused by the authentication process for wikidata? You are hardcoding a username and password in this view?
Here's the first documentation I find on authentication with wikidata's API: https://www.wikidata.org/wiki/Wikidata:REST_API/Authentication. Not saying it's necessarily the way to go but I'm wondering where this version came from?
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 previously referred to the documentation on logging in here: https://www.mediawiki.org/wiki/API:Login#Python
Let me take a closer look.
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 think using OAuth is essential, as recommended in the link you provided, to avoid hardcoding credentials. I’ve registered for OAuth and am currently awaiting approval. Based on feedback from last Saturday's project meeting, we also need to offer users a choice between using UMIL’s public account or authorizing their own Wikidata account. I'll create a new issue for this requirement. This pull request can be on hold until the user authentication issue is resolved.
Resolves: #150
Resolves: #160
Resolves: #161
Resolves: #163
Resolves: #165