Server-side access to Client Browser's Latitude/Longitude using Django.
Posted
by ZenGyro
on Stack Overflow
See other posts from Stack Overflow
or by ZenGyro
Published on 2010-04-11T18:57:37Z
Indexed on
2010/04/11
19:03 UTC
Read the original article
Hit count: 219
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.
© Stack Overflow or respective owner