You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry @moul, never wrote a single line of code within the Django ecosystem so I can't really help you there. That being said, I'll welcome any contribution to work toward that goal.
As of integrating the Django boilerplate code directly in this repository, it depends on its nature. If it's lightweight and doesn't prevent usage of postal-address as a stand-alone Python module, why not. Else, it might be better to create a side project to wrap postal-address and provide a proper Django field.
A Field is likely not what you want. Fields map to a column in a database. I suspect most people don't want their normalized addresses stuffed into a database as a string.
A more sensible approach would be to make a Django package that wraps this package and supplied a PostalAddress model. Then the individual parts of the address would be represented as independent fields in a table. Now someone could select distinct(country_code) from postal_address or in Django ORM french_connections = PostalAddress.objects.filter(country_count='FR').count().
What anyone interested would need to do is make a django-postal-address package and add a PostalAddress and Territory model. These would look a lot like the objects in this package with additions like date_created. Add a method to the models to create one from the PostalAddress or Territory object and to create a PostalAddress or Territory from the models.
Hi @kdeldycke and @scaleway,
Do you think we could use this library to create a Django
PostalAddressField
?Could you write some documentation, snippet or maybe a library for this?
The text was updated successfully, but these errors were encountered: