Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.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 Django依赖项中缺少staticfiles清单项_Python 3.x_Django_Django Staticfiles_Python 3.9 - Fatal编程技术网

Python 3.x Django依赖项中缺少staticfiles清单项

Python 3.x Django依赖项中缺少staticfiles清单项,python-3.x,django,django-staticfiles,python-3.9,Python 3.x,Django,Django Staticfiles,Python 3.9,我正在处理一个django项目(我们称之为django项目)和一个抽象依赖项(我们称之为django依赖项)。该依赖项包含一些静态文件,这些文件也显示在其清单中django dependency安装在环境中,并且文件都在那里,manage findstatic django dependency/js/some file.js在环境中成功找到该文件 django项目在调试为真且不对STATICFILES\u存储进行更改时工作正常。 但是,当在管理面板中以DEBUG=False保存对象时,出现错误

我正在处理一个django项目(我们称之为
django项目
)和一个抽象依赖项(我们称之为
django依赖项
)。该依赖项包含一些静态文件,这些文件也显示在其
清单中
django dependency
安装在环境中,并且文件都在那里,
manage findstatic django dependency/js/some file.js
在环境中成功找到该文件

django项目
在调试为真且不对
STATICFILES\u存储进行更改时工作正常。
但是,当在管理面板中以DEBUG=False保存对象时,出现错误500,并显示消息:
缺少'django dependecy/js/some file.js'的staticfiles清单条目。
manage.py collectstatic
使用默认的
STATICFILES\u存储

当我将
STATICFILES\u STORAGE
更改为
django.contrib.STATICFILES.STORAGE.ManifestStaticFilesStorage
时,也会发生同样的情况。我无法
manage.py collectstatic
甚至
manage.py findstatic
(我收到与上面相同的错误)。当
STATICFILES\u STORAGE
为默认值时,我可以执行
findstatic
但是如上所述,当保存某些对象时,应用程序会中断(django dependency是一个管理小部件)<当
django项目
能够运行时,code>django依赖项
工作正常(功能如预期)

django项目的静态文件配置:

STATIC\u URL='/STATIC/'
STATIC\u ROOT=os.path.join(BASE\u DIR,'files','public','STATIC')
STATICFILES_DIRS=[os.path.join(BASE_DIR,'files','dist')]
我是否应该以某种方式配置django dependency的静态文件?Manifest.in是否已包含所需的静态文件?我真的不知道。以下是django依赖项中文件的使用方式:

class DjangoWidget(forms.Textarea):
班级媒体:
js=[
static('django-dependency/js/some file.js'),#再次:使用findstatic正确找到
]
css={
'all':[static('django-dependency/js/some file.css'),
}