VirtualenvやGunicornなどを使用してUbunutuでDjango 1.8.2プロジェクトを実行しています。何らかの理由でcollectstaticは管理メディアを取得しませんが、osxのローカル開発環境では動作します。
問題がどこから来たのかわかりませんか?設定ですか?しかし、なぜ私のUbuntuサーバーではなくosxで動作するのでしょうか?
ここに私の設定があります:
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '123'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
SITE_ID = 1
ALLOWED_HOSTS = ['localhost', '127.0.0.1']
ADMINS = (
)
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'djcelery',
'djangobower',
'client',
'billable',
'recurring_invoice',
'company',
'app',
)
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',
)
STATICFILES_FINDERS = (
"django.contrib.staticfiles.finders.FileSystemFinder",
'djangobower.finders.BowerFinder',
)
ROOT_URLCONF = 'stem.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 = 'stem.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# 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_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
BOWER_COMPONENTS_ROOT = os.path.join(BASE_DIR, 'components')
import djcelery
djcelery.setup_loader()
CELERY_IMPORTS = ('recurring_invoice.tasks',)
BROKER_URL = "amqp://guest:guest@localhost:5672//"
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']
BOWER_INSTALLED_APPS = (
'jquery',
'underscore',
'angular#1.3.16',
'moment',
)