2017-09-11 5 views
0

このトレースバックの最後の数行です: ジャンゴ・パイプラインFileNotFoundError私が行うmanage.py collectstatic

File "C:\PycharmDev\TestVirtualEnv\testEnv1\lib\site-packages\pipeline\compressors\__init__.py", line 247, in execute_command 
    stdin=subprocess.PIPE, stderr=subprocess.PIPE) 
    File "C:\Python34\Lib\subprocess.py", line 859, in __init__ 
    restore_signals, start_new_session) 
    File "C:\Python34\Lib\subprocess.py", line 1112, in _execute_child 
    startupinfo) 
FileNotFoundError: [WinError 2] ... 

そしてsettings.pyで

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 

STATIC_URL = '/static/' 
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' 
STATIC_URL = '/static_prepared/' 
STATIC_ROOT = os.path.join(BASE_DIR, 'static') 
STATICFILES_DIRS = [ 
    os.path.join(BASE_DIR, 'static_prepared'), 
] 
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder', 
    'django.contrib.staticfiles.finders.AppDirectoriesFinder', 
    'pipeline.finders.PipelineFinder', 
) 
PIPELINE = { 
    'STYLESHEETS': { 
     'static_prepared': { 
      'source_filenames': (
       '*.css', 
      ), 
      'output_filename': 'colors.css' 
     }, 
    }, 
    'JAVASCRIPT': { 
     'static_prepared': { 
      'source_filenames': (
       '*.js', 
      ), 
      'output_filename': 'stats.js', 
     } 
    } 
} 

私と一緒に何が問題なのですか?

私はmanage.py collectstaticを使用し、それがパイプラインでは全く動作しません。

何のパイプラインがありませんようにのみ動作しますように思えます。

パイプラインなしと同じ。通常のmanage.py collectstaticです。

なぜこのエラーが発生しましたか?

私はすでに手動でos.path.join(BASE_DIR、...)に静的およびstatic_preparedディレクトリを作りました。

にはどうすれば正しくパイプラインを設定することができますか?

答えて

1

PIPELINE = { 
    'STYLE': { 
     'static_prepared': { 
      'source_filenames': (
       '*.css', 
      ), 
      'output_filename': 'colors.css' 
     }, 
    }, 
    'JSCRIPT': { 
     'static_prepared': { 
      'source_filenames': (
       '*.js', 
      ), 
      'output_filename': 'stats.js', 
     } 
    } 
} 
のような他の名前を置き換え
関連する問題