Wednesday, June 19, 2019

Help with Address app https://github.com/furious-luke/django-address

Hi I am trying to link the address app. When i follow the instruction on the doc it says to just add as below

  from address.models import AddressField      class MyModel(models.Model):      address1 = AddressField()      address2 = AddressField(related_name='+', blank=True, null=True)

which i have tried to follow as below:

from address.models import AddressField, Address

    address1        = AddressField()
    address2        = AddressField(related_name='+', blank=True, null=True)

and

    address1        = models.ForeignKey(Address, on_delete=models.CASCADE, related_name='addresses', blank=False, null=False)
    address2        = AddressField(related_name='Address', on_delete=models.CASCADE, blank=False, null=False)

but i am unable to get it to work. Where it has a google api which starts with "None" for everything else it shows the plain text field like on the screenshot below.


Also if someone could help me as to how do i go about getting the individual fields within the address app to display no the template should be create. Thank you very much for the help in advice.

--
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+unsubscribe@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/07fbabce-a772-45ee-8794-34e39c9824e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment