Python PipelineStorage IOError:[Errno 21]
我开始使用Django,我想要一个SASS编译器,所以我找到了Django管道。我遵循了教程中的步骤,并设法进入了静态步骤。当我运行命令时Python PipelineStorage IOError:[Errno 21],python,django,django-pipeline,Python,Django,Django Pipeline,我开始使用Django,我想要一个SASS编译器,所以我找到了Django管道。我遵循了教程中的步骤,并设法进入了静态步骤。当我运行命令时 manage.py collectstatic 然后键入“是”,我会收到以下错误: (全部回溯) 我也安装了Yuglify。当此行位于settings.py中时会发生错误: STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage' 删除它我没有收到任何错误,所有文件都被复制到静态根目录,但不知何故,
manage.py collectstatic
然后键入“是”,我会收到以下错误:
(全部回溯)
我也安装了Yuglify。当此行位于settings.py中时会发生错误:
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
删除它我没有收到任何错误,所有文件都被复制到静态根目录,但不知何故,我觉得这一行很重要,应该省略
"""
Django settings for blog project.
Generated by 'django-admin startproject' using Django 1.8.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '#35hy+0t97*x8sgk5yf91ff3_my8u9ljs5-p^jxb3l0i0zc9^)'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'moj_blog',
'pipeline',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
# 'django.middleware.security.SecurityMiddleware',
)
ROOT_URLCONF = 'blog.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['templates', ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'blog.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'blog',
'USER': 'root',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '3306',
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = '/home/vedran/Development/django/blog/collectstatic'
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
)
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
PIPELINE_CSS = {
'colors': {
'source_filenames': (
'style.css'
),
'output_filename': 'colors.css',
},
}
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'