2017-09-11 3 views
0

Es ist zuletzt ein paar Zeilen von Traceback:django-Pipeline FileNotFoundError wenn ich manage.py ausführen 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] ... 

Und in 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', 
     } 
    } 
} 

Was ist los mit mir?

Wenn ich manage.py Collectstatic, funktioniert es überhaupt nicht mit Pipeline.

Es scheint nur funktioniert, als gäbe es keine Pipeline.

Das gleiche wie ohne Pipeline. Normal manage.py Collectstatic.

Warum ist dieser Fehler aufgetreten?

Ich habe bereits statische und static_prepared Verzeichnis auf os.path.join (BASE_DIR, ...) manuell gemacht.

Wie kann ich die Pipeline korrekt einstellen?

Antwort

1

ersetzen andere Namen wie

PIPELINE = { 
    'STYLE': { 
     'static_prepared': { 
      'source_filenames': (
       '*.css', 
      ), 
      'output_filename': 'colors.css' 
     }, 
    }, 
    'JSCRIPT': { 
     'static_prepared': { 
      'source_filenames': (
       '*.js', 
      ), 
      'output_filename': 'stats.js', 
     } 
    } 
} 
Verwandte Themen