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

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -