166 lines
3.8 KiB
Python
166 lines
3.8 KiB
Python
"""
|
|
Django settings for shelfzilla project.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/1.6/topics/settings/
|
|
|
|
For the full list of settings and their values, see
|
|
https://docs.djangoproject.com/en/1.6/ref/settings/
|
|
"""
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
import os
|
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
|
|
|
_ = lambda x: x
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
SECRET_KEY = '0123456789'
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
DEBUG = True
|
|
|
|
TEMPLATE_DEBUG = True
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
# Application definition
|
|
|
|
INSTALLED_APPS = (
|
|
# Longer username to use the email!
|
|
'longerusername',
|
|
|
|
# Admin
|
|
'suit',
|
|
'django.contrib.admin',
|
|
|
|
# Django
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
|
|
# Files
|
|
"filer",
|
|
"mptt",
|
|
"easy_thumbnails",
|
|
|
|
# DDBB
|
|
'reversion',
|
|
'south',
|
|
|
|
# Apps
|
|
'shelfzilla.apps.homepage',
|
|
'shelfzilla.apps.landing',
|
|
'shelfzilla.apps.manga',
|
|
)
|
|
|
|
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.core.context_processors.tz',
|
|
'django.contrib.messages.context_processors.messages',
|
|
'django.core.context_processors.request',
|
|
|
|
'shelfzilla.context_processors.pjax',
|
|
'shelfzilla.apps.manga.context_processors.user_have_volumes',
|
|
'shelfzilla.apps.manga.context_processors.user_wishlisted_volumes',
|
|
)
|
|
|
|
MIDDLEWARE_CLASSES = (
|
|
'reversion.middleware.RevisionMiddleware',
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.middleware.common.CommonMiddleware',
|
|
'django.middleware.locale.LocaleMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
'shelfzilla.middleware.BetaMiddleware',
|
|
)
|
|
|
|
TEMPLATE_DIRS = (
|
|
os.path.join(BASE_DIR, "themes", "_base"),
|
|
os.path.join(BASE_DIR, "themes", "bootflat", "templates"),
|
|
)
|
|
|
|
ROOT_URLCONF = 'shelfzilla.urls'
|
|
|
|
WSGI_APPLICATION = 'shelfzilla.wsgi.application'
|
|
|
|
|
|
# Database
|
|
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
|
}
|
|
}
|
|
|
|
# Internationalization
|
|
# https://docs.djangoproject.com/en/1.6/topics/i18n/
|
|
|
|
LANGUAGES = (
|
|
('es', _('Spanish')),
|
|
)
|
|
|
|
LANGUAGE_CODE = 'es'
|
|
|
|
LOCALE_PATHS = (
|
|
os.path.join(BASE_DIR, 'locale'),
|
|
)
|
|
|
|
TIME_ZONE = 'Europe/Madrid'
|
|
|
|
USE_I18N = True
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# https://docs.djangoproject.com/en/1.6/howto/static-files/
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
|
STATIC_URL = "/static/"
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
|
|
MEDIA_URL = '/media/'
|
|
|
|
# Additional locations of static files
|
|
STATICFILES_DIRS = (
|
|
os.path.join(BASE_DIR, "themes", "bootflat", "static"),
|
|
)
|
|
|
|
# Max username length (longerusername)
|
|
MAX_USERNAME_LENGTH = 75
|
|
|
|
# Beta settings
|
|
BETA_ACCESS_GROUP_ID = 1
|
|
BETA_ACCESS_ALLOW_URLS = (
|
|
'/landing/',
|
|
'/login/',
|
|
)
|
|
|
|
# filer
|
|
THUMBNAIL_PROCESSORS = (
|
|
'easy_thumbnails.processors.colorspace',
|
|
'easy_thumbnails.processors.autocrop',
|
|
#'easy_thumbnails.processors.scale_and_crop',
|
|
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
|
|
'easy_thumbnails.processors.filters',
|
|
)
|