python - 找不到页面(404)jquery django python
问题描述
jquery 不加载 - 找不到页面 (404)
base.html
{% load static %}
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="{% static 'bootstrap-5.0.0/css/bootstrap.css' %}" rel="stylesheet">
<link href="{% static 'css/style.css' %}" rel="stylesheet">
<!-- jQuery -->
<script src="{% static 'jquery/jquery.js' %}"></script>
</head>
设置.py
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'ServiceCRM3/static'),]
- 创建的静态文件夹
- 脚本在路径static/jquery/jquery.js
- 引导程序在同一个文件夹中正常
- 服务器重新启动
怎么了?
解决方案
推荐阅读
- oracle - Oracle 数据库读取监视器或计数器
- javascript - 为什么这个for循环运行了这么多次
- jupyter-notebook - 安装 Jupyter Lab Git 扩展的问题:前端/后端版本不匹配
- xaml - UWP:如何在绘画前获取元素大小
- python - 如何替换 Zeep 的默认布尔序列化程序?
- sqlalchemy - AttributeError:模块“sqlalchemy”没有属性“二进制”
- android - 缩略图在 RecyclerView (Android) 中保持空白。我正确使用 Glide 吗?
- .net - In Braintree Net How do I generate a PaymentNonce
- c++ - How can I increase the height of a basic-widget and a belonging vertical layout when I add other widgets to the basic-widget using Qt/C++?
- r - R - I have a for loop to identify outliers in each row for one column - how to loop to look across every column?