I think you'd at least want to use either a DecimalField or FloatField for
the lat & long numbers.
There's a nice GIS package in django called GeoDjango, it has lots of built
in functionality for all kinds of geographical things.
This may be over kill for your application but I thought I'd let you know
it exists.
One thing it allows you to do is query the DB based on location, i.e.
distance between points with lat & long.
You could compute this using a standard norm calculation but its slow
compared to using a native DB query.


On Tue, Jun 4, 2013 at 8:49 AM, Sivaram R <sivaram2...@gmail.com> wrote:

> models.py
>
> class Geolocation(models.Model):
>     user = models.ForeignKey(User, null=False)
>     location_latitude = models.CharField('Latitude', max_length=20, 
> null=True, blank=True)
>     location_longitude = models.CharField('Longitude', max_length=20, 
> null=True, blank=True)
>
> In my application,i am using google map using Javascript.Latitude and
> longitude values are displayed in map using marker,i need to get both
> values from map and save to database using Python.
>
> 1.I want to know how to get the values from map and save.
>
> 2.How to right view function and form.
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to