Use url_for for form action instead of hardcoded path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Edward Betts 2026-05-15 15:18:39 +00:00
parent b430411b7e
commit 132b881b08

View file

@ -40,7 +40,7 @@
<h1 class="mb-1">Geocode to Commons Category</h1>
<p class="text-muted mb-3">Convert latitude/longitude to a Wikidata item and Wikimedia Commons category.</p>
<form class="d-flex gap-2 align-items-center mb-3" action="/">
<form class="d-flex gap-2 align-items-center mb-3" action="{{ url_for('index') }}">
<label for="q" class="text-nowrap text-muted small">Lat, Lon</label>
<input id="q" name="q" class="form-control form-control-sm" style="max-width:18rem" placeholder="e.g. 54.375, -2.999">
<button type="submit" class="btn btn-sm btn-primary">Go</button>