Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x views.py需要为Google地图api nearbysearch停止一秒钟吗?_Python 3.x_Google Maps_Google Places Api_Django 3.0 - Fatal编程技术网

Python 3.x views.py需要为Google地图api nearbysearch停止一秒钟吗?

Python 3.x views.py需要为Google地图api nearbysearch停止一秒钟吗?,python-3.x,google-maps,google-places-api,django-3.0,Python 3.x,Google Maps,Google Places Api,Django 3.0,我是用谷歌地图api程序创建的。 我没有在开发中限制api。 我将程序部署到服务器,然后打开api限制。 程序看起来有点慢,有时会错过响应。 我需要停一下看节目吗 还是设置不好? 回应小姐: { "error_message" : "API keys with referer restrictions cannot be used with this API.", "html_attributions" : [], "results" : [], "status"

我是用谷歌地图api程序创建的。
我没有在开发中限制api。



我将程序部署到服务器,然后打开api限制。
程序看起来有点慢,有时会错过响应。

我需要停一下看节目吗
还是设置不好?

回应小姐:

{
   "error_message" : "API keys with referer restrictions cannot be used with this API.",
   "html_attributions" : [],
   "results" : [],
   "status" : "REQUEST_DENIED"
}
设置:localhost未在限制下工作

http://127.0.0.1:8000/*
http://www.henojiya.net/*
网站:

用了大约200次。

您正在使用附近的搜索API web服务,该服务无法使用HTTP引用限制的API密钥。您需要第二个API密钥,受IP地址限制

此外,如果您的API密钥在生产中公开使用,请不要将其限制为localhost,因为这意味着任何人都可以从自己的localhost使用它(并在您的帐户上产生费用)

有关详细信息,请查看以下相关答案:


希望这有帮助

如何查询附近的搜索?以什么速度?当它“未响应”时,您会遇到什么错误?您是否检查了安装位置,并确保您的使用符合要求?谢谢。我在帖子底部添加了错误信息。用谷歌搜索错误!这比在这里打开一个问题并等待有人在“帮助”页面上向您指出问题所需的时间要少得多。非常感谢。我发布了来自谷歌api控制台的官方问题。我收到回复后会发到这里。我已经从你的答案中删除了你的API密钥。请不要在公共站点上共享私有API密钥,并确保按照“谢谢”对其进行限制。第二把不同的钥匙!我会思考并尝试它。
{
   "error_message" : "API keys with referer restrictions cannot be used with this API.",
   "html_attributions" : [],
   "results" : [],
   "status" : "REQUEST_DENIED"
}
http://127.0.0.1:8000/*
http://www.henojiya.net/*
http://www.henojiya.net/gmarker/