django - 我想将三个 js 项目添加到 Django 项目中。谁能指导我如何更新 settings.py 文件并显示目录的树结构
问题描述
这是我的settings.py
文件
STATICFILES_DIRS = [
"/rios/search/static/",
"/rios/user/static/",
"node_modules"
]
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'django_node_assets.finders.NodeModulesFinder',
'npm.finders.NpmFinder'
]
NODE_PACKAGE_JSON = 'package.json'
NODE_MODULES_ROOT = 'node_modules'
我使用了这个库django-node-assets
https://pypi.org/project/django-node-assets/
该图显示了我的文件夹和文件在项目目录我的树结构中的排列方式
解决方案
推荐阅读
- python - 使用列表理解创建数据框时无法更改列名
- flutter - 如何在不更改默认图标的情况下执行 appbar 后退按钮单击操作
- php - 使用 add_filter 将参数传递给函数
- python - 有没有办法将 tkinter 画布嵌入 HTML 网页?
- jpa - JPA:如何将一些实体映射到另一个数据库实例的不同模式?
- rabbitmq - 带有`send_task`的芹菜扇出信号
- linux - curl -SL 有什么作用?
- mysql - 如何统一字段?
- django - 无法修复 django.core.exceptions.AppRegistryNotReady:应用尚未加载
- php - 没有重定向的自定义 404 页面 htaccess