
Ask HN: How to limit my web app to a particular city? - oliv__
Hello HN,<p>I am building a web app (with Django as a backend) where users can create objects with a &quot;where&quot; field that is meant to inform other users viewing the object of its location.
Right now, it is a simple dumb text field, so there is no &quot;geo-validation&quot; of the input.<p>For the launch, I&#x27;d like to limit the creation of objects to a certain city.  How could I do so and what do you think would be the best&#x2F;simplest way?<p>I&#x27;ve thought of a) setting up city-specific subdomains (like craigslist) or b) making that field &quot;smart&quot; so that it would &quot;verify&quot; the address given (like when you type in google maps) and then filter from there to only include addresses from a particular city, but the idea was to keep it simple and that seems like it would bring more problems in (what if the address is not recognized?).<p>If you have any thoughts or experience with this, I&#x27;d love to hear it. Thanks.
======
omardelmo
I think your input should come with a map then. Integrate google maps into
your application, then save the latitude and longitude values, then before
saving the object, validate the address, if its not within the city then don't
save it, flash a message.

~~~
oliv__
Hi-- thanks for the answer, it seems a lot clearer now that you've written it
down. I don't really have a need for the whole map though but if I could
integrate a google maps powered input with suggestions, that would be ideal.
Is that possible?

