-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
link olid macro #9348
base: master
Are you sure you want to change the base?
link olid macro #9348
Conversation
openlibrary/macros/OLID.html
Outdated
$def with (q="#") | ||
|
||
$ edition = query_param('edition', q) | ||
$ results = find_matches(olid, q) |
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.
find_matches isn't a public function that's available here. It either needs to be passed in as a parameter, made a @public
function, or be added to plugins/openlibrary/code.py as a template global: https://github.com/internetarchive/openlibrary/blob/master/openlibrary/plugins/openlibrary/code.py#L1146-L1171
I think though that find_matches is probably just the wrong function to use. We likely want to use some existing global function to do a web.ctx.site.things get for the specific olid (open library id)
@psyren99 please see code review comments, see if you can find a |
for more information, see https://pre-commit.ci
…y into 2283/linking_to_olid
for more information, see https://pre-commit.ci
Is this still open? |
I believe this may need a rebase, then we can throw on testing and if it works, merge :) |
Closes #2283
Create a macro for linking to an OLID
Technical
/macros/OLID.html added
/plugins/upstream/models.py
Testing
/plugins/upstream/tests/test_models.py
Screenshot
Stakeholders