Skip to content

fix(core): use request host in exhibit URL display so dev shows dev.jandig.app (#822)#950

Merged
pablodiegoss merged 1 commit into
memeLab:developfrom
SAY-5:fix/issue-822-exhibit-link-host
May 12, 2026
Merged

fix(core): use request host in exhibit URL display so dev shows dev.jandig.app (#822)#950
pablodiegoss merged 1 commit into
memeLab:developfrom
SAY-5:fix/issue-822-exhibit-link-host

Conversation

@SAY-5
Copy link
Copy Markdown
Contributor

@SAY-5 SAY-5 commented Apr 30, 2026

Fixes #822. Three exhibit-related templates hardcoded https://jandig.app/ for the URL display + share link, so on dev.jandig.app the user saw / copied a link pointing at production.

Files

  • src/core/jinja2/core/exhibit_detail.jinja2, display {{ request.scheme }}://{{ request.get_host() }}/{slug}; anchor href switched to relative /{slug} (zero-cost, more idiomatic, no host concern)
  • src/core/jinja2/core/exhibit_create_ar.jinja2 and exhibit_create_mr.jinja2, url-helper label uses the same dynamic host so the "Your exhibit URL will look like this" preview is honest on dev too

request is already provided to Jinja2 templates by Django (other templates in the repo use request.user / request.LANGUAGE_CODE).

home_v2.jinja2 still has https://jandig.app/docs/... links, those go to the docs site which is canonical-on-prod, intentionally not touched.

Test plan

  • 3-file template change, 4 lines +/-
  • No view/model code touched; production output unchanged because request.get_host() == 'jandig.app' there
  • Dev render now shows dev.jandig.app/<slug>

…andig.app (memeLab#822)

Signed-off-by: SAY-5 <say.apm35@gmail.com>
@pablodiegoss pablodiegoss merged commit 9352e6c into memeLab:develop May 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong link for exhibits on dev

2 participants