Hi All, I need your help in one task. I have created a address form in Django 2.0.6 + Python3.6. In this form once user entered the address, the location field is auto filled with latitude,longitude as below screen shot-
<https://lh3.googleusercontent.com/-zFrYeNJBvQk/Wyt_0NYnnyI/AAAAAAAAMLI/Fk7a7XvlucQeiRCYEN15WffXrp6WITtYwCLcBGAs/s1600/addStore.JPG> Now I want to write a python function which can fetch Latitude and Longitude values from the Location field and can save them in respective Latitude/Longitude fields. My models.py code is as below: class Store(models.Model): postal_code = models.CharField(max_length=6) address = models.TextField() location = PlainLocationField(based_fields=['address'], zoom=7, null=True) phone = models.CharField(max_length=60, blank=True, null=True) latitude = models.FloatField() longitude = models.FloatField() class Meta: managed = False db_table = 'store' admin.py: class StoreAdmin(admin.ModelAdmin): list_display = ('postal_code', 'address','phone', 'latitude', 'longitude') Can anyone help me to achieve this functionality? -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c453ba82-7e0a-4fc1-8c8e-0a588b857627%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.