python - Django template with 2 'inputs' -
i have simple django view, can (correctly) map coordinates (lat, lng) url, , wish pass them onto template named 'test.html'. right pass latitude along:
#views.py ... def testview(request, lat, lng): return render(request, 'polls/test.html', {'lat':lat})
and works fine.
my issue how pass longitude (lng) along. have learned how pass solo input official django documentation, can't find mention on how multiple inputs.
just include in context dictionary first one:
def testview(request, lat, lng): return render(request, 'polls/test.html', {'lat':lat, 'lng': lng}) # ^^^^^^^^^
Comments
Post a Comment