T406950: add Wikimedia Commons link support to work pages
Changes
-
pdclasses.py: Added
commons_linkattribute in Work class to extract 'commonswiki' sitelink. -
app.py: Updated work_page route to pass
work_commons_linkto the template. - work.html: Displayed Wikidata, Wikipedia, and Wikimedia Commons links inline with conditional logic.
Testing
- Verified with work IDs such as Q42 (Douglas Adams).
- Confirmed 404 error resolved.
- Verified proper rendering of "Wikidata | Wikipedia | Wikimedia Commons" section.
Result
Work pages now display links to all relevant Wikimedia resources.
Task: T406950 (Outreachy microtask)

