В чём может быть проблема? Уже и права на каталог static сделал = 777, всё равно выскакивает такая ошибка.
# -*- coding: utf-8 -*-
import os.path
import os
import cbsettings
from cbsettings import DjangoDefaults, switcher
_ROOT = os.path.abspath(os.path.dirname(__file__))
class Base(DjangoDefaults):
DEBUG = TEMPLATE_DEBUG = False
# Задаются в local_settings
#
SECRET_KEY = ""
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'var/data.db',
}
}
FIXTURE_DIRS = (
)
TIME_ZONE = 'Europe/Moscow'
LANGUAGE_CODE = 'ru'
SITE_ID = 1
USE_I18N = USE_L10N = True
MEDIA_ROOT = './var/media'
MEDIA_URL = '/media/'
UPLOAD_TO = os.path.join(MEDIA_ROOT)
STATICFILES_DIRS = (
("", os.path.join(_ROOT, 'core/static/')),
)
STATIC_URL = '/static/'
STATIC_ROOT = '/static/'
CKEDITOR_UPLOAD_PATH = "project/core/uploads"
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
'project.structure.context_processors.current_node',
)
ROOT_URLCONF = 'project.urls'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
TEMPLATE_DIRS = (
os.path.join(_ROOT, 'templates'),
)
LOGIN_URL = '/accounts/login'
LOGOUT_URL = '/accounts/logout'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.staticfiles',
'ckeditor',
'mptt',
'project.core',
'project.structure',
'project.main',
)
class Dev(Base):
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = "sdsadasdasdasdas="
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': './var/data.db',
}
}
class Prod(Base):
SECRET_KEY = "asdsad30e23093uiojrlkwkewe="
DEBUG = False
TEMPLATE_DEBUG = DEBUG
import sys
pathname, scriptname = os.path.split(sys.argv[0])
_PATH = os.path.abspath(pathname)
switcher.register(Dev, lambda: os.path.exists( os.path.join(_PATH, ".dev" )))
switcher.register(Prod, lambda: os.path.exists( os.path.join(_PATH, ".prod" )))
switcher.register(Prod, hostnames=['example.com'])
switcher.register(Dev, lambda: not (os.path.exists( os.path.join(_PATH, ".dev" ) or os.path.exists( os.path.join(_PATH, ".dev" ) ) )) )
Поможите чем можите). Заранее спасибо.