【问题标题】:django pipeline Error: The file build/fonts/glyphicons-halflings-regular.eot' could not be found with <pipeline.storage.PipelineCachedStorage objectdjango 管道错误:无法使用 <pipeline.storage.PipelineCachedStorage 对象找到文件 build/fonts/glyphicons-halflings-regular.eot'
【发布时间】:2016-02-18 20:25:52
【问题描述】:

我正在使用 django-pipeline,在运行“sudo python manage.py collectstatic”时

收到此错误:

Traceback (most recent call last): 
File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) 
File "/Users/office/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line utility.execute() 
File "/Users/office/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute self.fetch_command(subcommand).run_from_argv(self.argv) 
File "/Users/office/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv self.execute(*args, **cmd_options) 
File "/Users/office/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute output = self.handle(*args, **options) 
File "/Users/office/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 168, in handle collected = self.collect() 
File "/Users/office/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 120, in collect raise processed ValueError: The file 'bower_components/eonasdan-bootstrap-datetimepicker/build/fonts/glyphicons-halflings-regular.eot' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x10d274e10>.

知道如何解决这个问题吗?

【问题讨论】:

    标签: django-pipeline


    【解决方案1】:

    使用 django-pipeline-forgiving(https://pypi.python.org/pypi/django-pipeline-forgiving) 解决了这个问题。

    • pip install django-pipeline-forgiving
    • 在您的 settings.py 中设置:STATICFILES_STORAGE = 'django_pipeline_forgiving.storages.PipelineForgivingStorage'

    【讨论】:

    • 听起来您并没有解决根本问题,而只是消除了错误。
    猜你喜欢
    • 1970-01-01
    • 2019-01-29
    • 2015-04-25
    • 2015-11-24
    • 2015-07-29
    • 1970-01-01
    • 2016-04-08
    • 2020-09-07
    • 2016-11-20
    相关资源
    最近更新 更多