That is fine. I'm more worried about people entering offensive words. Full
address is silly, but I doubt people will enter it. Plus it is easy to
clean up. Ideally this code should be bug free as possible, the
pre-formatted address is the best way to get that.
On Jul 4, 2013 2:27 AM, "Kacper Krupa" <notifications@github.com> wrote:

> In july/utils.py:
>
> > @@ -0,0 +1,29 @@
> > +# coding: utf-8
> > +import requests
> > +
> > +def check_location(location):
> > +    resp = requests.get('http://maps.googleapis.com/maps/api/geocode/json',
> > +        params={'address': location, 'sensor': 'false'})
> > +    resp.raise_for_status()
> > +
> > +    data = resp.json()
> > +    if data['status'] == 'ZERO_RESULTS':
> > +        return None
> > +
> > +    try:
> > +        location = data['results'][0]['address_components']
>
> Yeah, but then, when user inputs address with street, it would return:
> "Street, City, Country", do we really need a street name?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/julython/julython.org/pull/87/files#r5026291>
> .
>