django管道错误:无法找到文件build / fonts / glyphicons-halflings-regular.eot'与<pipeline.storage.pipelinecachedstorage object =“”

时间:2016-02-18 20:25:53

标签: django-pipeline

=“”< p =“”>我正在使用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>.

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

1 个答案:

答案 0 :(得分: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'