django - Pythonanywhere 在部署 django 应用程序期间无法加载静态文件
问题描述
Pythonanywhere 在部署期间无法加载我的静态文件,但在我的本地计算机上一切正常。
- 这是我的应用程序的目录结构和本地电脑上的静态文件设置:
- https://www.screencast.com/t/l0d6ehWWJ 并且 设置文件包含 STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, "static")。
- pythonanywhere 上的 URL 和 DIRECTORY 如下
- URL-/静态/
- 目录-'/home//Myapp/static'
这是显示所有静态文件已复制到静态文件夹的图像https://www.screencast.com/t/p1w1qRz4y
这可能是什么原因?
解决方案
推荐阅读
- javascript - Javascript function(params) 和 function({ params }),一种函数两种调用类型
- excel - 下标超出范围 - 在另一台计算机上找不到打开的工作簿
- machine-learning - 识别时间序列预测算法
- git - Azure DevOps 通过 REST API 获取链接到工作项的提交
- python - python - 如何将列表中的元素除以Python中的整数?
- mysql - SQL 年龄检查到当前日期
- python - psycopg2 cursor.copy_from() 加载重复项?
- sql - 尝试根据与其他 2 个表的连接确定的最大值从表中删除行
- java - 如何将tomcat主页更改为我的应用程序主页
- javascript - 打印选项打不开