Re: Why 1 key per domain and wheres all the world data
peter wrote:
> The other issue is I face is that we are only able to register a key
> per domain, I dont see why Google couldnt offer a service whereby I
> register as many domains I like under a single key. I might be missing
> something but in our case on greenpeace I am faced to register a key
> for every domain and we use several different ones for development,
> testing, staging, and production. Couldnt we have a testing key? or
> some work around so that I dont have to do what I am just about to do
> which is to detect the current domain in my javascript and
> appropriately construct the right key, thats lots of 'iffy' code!!!
> I will let you know if I get any answers with all this.
> Meanwhile you can check out our progress weekly at
> :http://melt.staging.greenpeace.org/ (we are using django and python
> for our development)
I had this same problem on chicagocrime.org -- which also uses Django
(djangoproject.com) and Python. One way to solve the problem is by
making the API key a Django setting (say, GOOGLE_MAPS_API_KEY) and
passing that to the template. Each of your server arrangements --
testing, staging and production -- would get a separate settings file,
which is where you'd put the API key setting.
Hope this helps!
Adrian
--
Adrian Holovaty
chicagocrime.org
0 Comments:
Yorum Gönder
<< Home