Server-side access to Client Browser's Latitude/Longitude using Django.
- by ZenGyro
Hello,
So i am writing a little app that compares a user's position against a database on web-based server written
using Django and performs some functions with it.
Accessing the browser's geolocation data (in supported browsers ) is fairly trivial using JavaScript. But what is the best way to allow
the Django server to access the longitude and latitude variables? Is it best to wrap them up as a JSON object and
send to the server via POST? Or is there some easier (Geo)Django-based way to access the Navigator.geolocation browser
object.
Please forgive a newbie a question like this, but my Google-Fuing only seems to find ways to insert variables into
JavaScript via template tag, whereas I need it to work the other way!
Any advice or code snippets greatly appreciated. Feel free to talk to me like I am an idiot.