Fix settings.py to work when no args are passed to manage.py

(imported from commit bdcfa78464322624c36fc59797906f2dd3624aef)
This commit is contained in:
Leo Franchi
2013-11-06 13:35:48 -05:00
parent 82ef17207a
commit 83679b14a6

View File

@@ -280,7 +280,7 @@ STATIC_URL = '/static/'
PIPELINE = not DEBUG
# Use prod settings if exporting static files in build-local-server-tarball
COLLECTSTATIC = 'manage.py' in sys.argv[0] and sys.argv[1] == 'collectstatic'
COLLECTSTATIC = 'manage.py' in sys.argv[0] and (len(sys.argv) > 1 and sys.argv[1] == 'collectstatic')
if DEBUG and not COLLECTSTATIC:
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'