Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add location fields validation #50

Open
lechup opened this issue Feb 10, 2017 · 8 comments
Open

Add location fields validation #50

lechup opened this issue Feb 10, 2017 · 8 comments

Comments

@lechup
Copy link
Contributor

lechup commented Feb 10, 2017

As stated by @zen we could add some validation for location fields in Station and Project models.

My idea would be use Google Maps Geocoding API to verify if given location exists I don't know how reliable it would be.

@grillazz @khasinski @zen any other ideas?

@zen
Copy link
Member

zen commented Feb 10, 2017

I would go even further and make it choice fields down to city level

@lechup
Copy link
Contributor Author

lechup commented Feb 10, 2017

I think it would be to complicated - should we support adding unexisting cities / regions?

We definately need some research or guadiance by someone who tested location libraries. I know only django-cities but I doubt that geonamed database is comparable with Google Maps Geocoding API...

Let's wait for others, maybe they will have better ideas?

@zen
Copy link
Member

zen commented Feb 11, 2017

Why support adding unexisting places?

@lechup
Copy link
Contributor Author

lechup commented Feb 12, 2017

I guess there is no lib that guarantees having full support for location names. It will be quite likely we would need to support adding Kozia Wólka or other places we won't have in lib database.

@khasinski
Copy link
Member

Google Geocoding API should be OK. We might want to use GPS coordinates as well when adding a new station to reduce the number of mistakes. Also this: https://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/

@zen
Copy link
Member

zen commented Feb 12, 2017

Couple of libs I checked were backed by official national location names databases. They supported every location that was official.

@lechup
Copy link
Contributor Author

lechup commented Feb 13, 2017

@zen can You recommend any location lib for django You would use? What was the result of Your research?

PS: So I see You do not want to support adding any location that is not in chosen lib.

@zen
Copy link
Member

zen commented Feb 14, 2017

Unfortunately I don't remember what libraries I was checking. As for adding locations, I don't have hard opinion here, but I think it would be easier to use some library and only allow existing placed to be added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants