Saving the values is the easy part.  The format you use depends on what you 
want to do with them.  If you are only displaying them to users, CharField 
might be okay.  If you are going to do any processing, you should probably 
convert them.  My storage is done like this:

    gpsLatitude = models.FloatField("Latitude", blank=True, null=True,
>         help_text="degrees, floating point, South is negative")
>     gpsLongitude = models.FloatField("Longtitude", blank=True, null=True,
>         help_text="degrees, floating point, West is negative")
>

Getting the values may be a problem. I do not understand what you mean by 
"displayed in map using marker".  Is what you have is a graphical image 
with a marker icon somewhere on it?  Or are you using a Google api which  
can be asked to give you more information?
--

On Tuesday, June 4, 2013 1:49:06 PM UTC+1, Sivaram R 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.


Reply via email to