&引用;运行时出错';$python manage.py collectstatic--noinput“;即使我有我的静态根集

&引用;运行时出错';$python manage.py collectstatic--noinput“;即使我有我的静态根集,python,django,heroku,Python,Django,Heroku,所以,我已经有了我的静态根集,我做了manage.py collectstatic,所以我不确定我在这里做错了什么。我试图将所有内容都推送到heroku,但我一直遇到这样一个错误,即没有指向静态文件的路径。我是否没有提供正确的“静态根”?我把它命名为STATIC\u ROOT=os.path.join(BASE\u DIR,'STATIC') 回溯 remote: Traceback (most recent call last): remote: File &q

所以,我已经有了我的静态根集,我做了
manage.py collectstatic
,所以我不确定我在这里做错了什么。我试图将所有内容都推送到heroku,但我一直遇到这样一个错误,即没有指向静态文件的路径。我是否没有提供正确的“静态根”?我把它命名为
STATIC\u ROOT=os.path.join(BASE\u DIR,'STATIC')

回溯

remote:        Traceback (most recent call last):
remote:          File "manage.py", line 21, in <module>
remote:            main()
remote:          File "manage.py", line 17, in main
remote:            execute_from_command_line(sys.argv)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
remote:            utility.execute()
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
remote:            self.fetch_command(subcommand).run_from_argv(self.argv)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
remote:            self.execute(*args, **cmd_options)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
remote:            output = self.handle(*args, **options)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 188, in handle
remote:            collected = self.collect()
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 114, in collect
remote:            handler(path, prefixed_path, storage)
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 342, in copy_file
remote:            if not self.delete_file(path, prefixed_path, source_storage):
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 249, in delete_file
remote:            if self.storage.exists(prefixed_path):
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/core/files/storage.py", line 310, in exists
remote:            return os.path.exists(self.path(name))
remote:          File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/staticfiles/storage.py", line 44, in path
remote:            raise ImproperlyConfigured("You're using the staticfiles app "
remote:        django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
remote: 
remote:  !     Error while running '$ python manage.py collectstatic --noinput'.
remote:        See traceback above for details.
remote: 
remote:        You may need to update application code to resolve this error.
remote:        Or, you can disable collectstatic for this application:
remote: 
remote:           $ heroku config:set DISABLE_COLLECTSTATIC=1
remote: 
remote:        https://devcenter.heroku.com/articles/django-assets
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to pacific-refuge-35090.
remote: 
To https://git.heroku.com/pacific-refuge-35090.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/pacific-refuge-35090.git'

对于一个非常类似的问题,请按以下方式尝试conf

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)

如果不成功,请更新以下结果:在本地或在开发环境中运行时是否存在相同的错误?

遇到非常类似的问题,请按以下方式尝试配置

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)

如果失败,请更新以下结果:在本地或在开发环境中运行时,是否存在相同的错误?

是否可以更新进度?是否可以更新进度?