JavaScript 和 Django, "there is no locally stored liblary for the HTTP"

标签 javascript html pycharm

我在google上搜索,没有结果,怎么解决?

错误消息:

There is no locally stored library for the HTTP link. Checks that URL of an external JavaScript library is associated with a locally stored file used for code completion and navigation. Use 'Download library' quick fix (Alt+Enter) to solve the problem.

我的模板:

{% load staticfiles %}
<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script type="text/javascript" src="{% static "ckeditor/ckeditor/ckeditor.js" %}"></script>
    <script type="text/javascript" src="{% static "ckeditor/ckeditor-init.js" %}"></script>
</head>
<body>
    <form method="post" action="./">
        {% csrf_token %}
        {{ form.as_p }}
        <p><input type="submit" value="post"></p>
    </form>
</body>
</html>

在后面插入“http:”后仍然有这个问题。

最佳答案

确保您已连接到互联网。单击该链接,按 Alt+Enter,然后再次按 Enter。 PyCharm 将下载 JS 文件,将其存储在本地,并使警告消失。

或者,您可以点击链接,然后点击灯泡,然后点击“下载库”。

但是,您不需要本地存储的 JS 库。只要您在线,您的模板就可以正常工作。

关于JavaScript 和 Django, "there is no locally stored liblary for the HTTP",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41942577/

相关文章:

html - 为什么是:hover inside the div not working?

python-3.x - 在 Pycharm 中定义一致(且合法)的导入样式

javascript - 如果localStorage中存在数据,如何返回它,或者执行AJAX请求?

javascript - 使用按钮单击 VueJS 3 专注于输入字段

javascript - 在循环中渲染重复组件

javascript - 如何在谷歌地图中获取经纬度和纬度的总距离

javascript - 导航菜单不粘,有白色间隙

javascript - 拖放 jquery 不工作

python - 如何将 PyCharm 与 Google 计算引擎一起使用

python - 如何让 VSCode 的自动完成功能和 PyCharm 一样强大?