GeoDjango: Extract Latitude and Longitude from PointField

3,303 views
Skip to first unread message

Alfonso

unread,
Jan 14, 2009, 12:49:30 PM1/14/09
to Django users
Hey,

Must be missing something extraordinarily simple - how do I
individually parse the latitude and longitude values from a PointField
entry into my app's templates? I just want...

<div>
Latitude:
Longitude:
</div>

Thanks,

Al

J. Cliff Dyer

unread,
Jan 14, 2009, 1:03:08 PM1/14/09
to django...@googlegroups.com

{{ Point.y }}
{{ Point.x }}

should do the trick.

Cheers,
Cliff


Ariel Mauricio Nunez Gomez

unread,
Jan 14, 2009, 1:03:46 PM1/14/09
to django...@googlegroups.com
...  
    point = models.PointField()
...
Longitude: {{point.x}}
Latitude: {{point.y}}
Reply all
Reply to author
Forward
0 new messages