237 lines
5.1 KiB
Python
237 lines
5.1 KiB
Python
# coding: utf-8
|
|
"""
|
|
Django settings for fmartingrcom project.
|
|
"""
|
|
|
|
# python
|
|
import os
|
|
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
|
|
|
# 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 = []
|
|
|
|
|
|
#
|
|
# APPLICATIONS
|
|
#
|
|
INSTALLED_APPS = (
|
|
'suit',
|
|
'solo',
|
|
'django.contrib.admin',
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
|
|
'compressor',
|
|
|
|
'reversion',
|
|
|
|
# Self
|
|
# 'fmartingrcom.apps._core',
|
|
# 'fmartingrcom.apps.homepage',
|
|
'fmartingrcom.apps.config',
|
|
'fmartingrcom.apps.blog',
|
|
'fmartingrcom.apps.projects',
|
|
|
|
'django_jinja',
|
|
'django_jinja.contrib._easy_thumbnails',
|
|
|
|
'ckeditor',
|
|
|
|
'easy_thumbnails',
|
|
)
|
|
|
|
|
|
#
|
|
# MIDDLEWARE
|
|
#
|
|
MIDDLEWARE_CLASSES = (
|
|
'reversion.middleware.RevisionMiddleware',
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.middleware.common.CommonMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
)
|
|
|
|
ROOT_URLCONF = 'fmartingrcom.urls'
|
|
|
|
WSGI_APPLICATION = 'fmartingrcom.wsgi.application'
|
|
|
|
|
|
#
|
|
# 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/
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
TIME_ZONE = 'Europe/Madrid'
|
|
|
|
USE_I18N = False
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
#
|
|
# STATIC FILES
|
|
#
|
|
|
|
STATICFILES_FINDERS = (
|
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
|
'compressor.finders.CompressorFinder',
|
|
)
|
|
|
|
STATICFILES_DIRS = (
|
|
'{}/themes/v1/static/'.format(BASE_DIR),
|
|
)
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
|
|
|
COMPRESS_PRECOMPILERS = (
|
|
('text/less', 'lessc {infile} {outfile}'),
|
|
('text/x-sass', 'sass {infile} {outfile}'),
|
|
('text/x-scss', 'sass --scss {infile} {outfile}'),
|
|
('text/coffeescript', 'coffee --compile --stdio --no-header'),
|
|
)
|
|
|
|
THUMBNAIL_ALIASES = {
|
|
'': {
|
|
'project_thumb': {'size': (150, 150), 'crop': True},
|
|
},
|
|
}
|
|
|
|
#
|
|
# MEDIA FILES
|
|
#
|
|
MEDIA_URL = '/media/'
|
|
|
|
CKEDITOR_UPLOAD_PATH = 'ckeditor/'
|
|
|
|
CKEDITOR_CONFIGS = {
|
|
'default': {
|
|
'toolbar': 'Standard',
|
|
'width': '100%',
|
|
'stylesSet': (
|
|
{
|
|
'name': 'Code',
|
|
'element': 'code',
|
|
},
|
|
{
|
|
'name': 'Code block',
|
|
'element': 'pre',
|
|
'attributes': {'class': 'prettyprint'}
|
|
},
|
|
{
|
|
'name': 'Code block (Bash)',
|
|
'element': 'pre',
|
|
'attributes': {'class': 'lang-bash prettyprint'}
|
|
},
|
|
{
|
|
'name': 'Code block (Python)',
|
|
'element': 'pre',
|
|
'attributes': {'class': 'lang-python prettyprint'}
|
|
},
|
|
)
|
|
},
|
|
}
|
|
|
|
|
|
#
|
|
# TEMPLATES
|
|
#
|
|
TEMPLATE_LOADERS = (
|
|
'django_jinja.loaders.AppLoader',
|
|
'django_jinja.loaders.FileSystemLoader',
|
|
)
|
|
|
|
|
|
TEMPLATE_DIRS = (
|
|
'{}/themes/v1/templates/'.format(BASE_DIR),
|
|
)
|
|
|
|
JINJA2_EXTENSIONS = [
|
|
"jinja2.ext.do",
|
|
"jinja2.ext.loopcontrols",
|
|
"jinja2.ext.with_",
|
|
"jinja2.ext.i18n",
|
|
"jinja2.ext.autoescape",
|
|
"django_jinja.builtins.extensions.CsrfExtension",
|
|
"django_jinja.builtins.extensions.CacheExtension",
|
|
"django_jinja.builtins.extensions.TimezoneExtension",
|
|
"django_jinja.builtins.extensions.UrlsExtension",
|
|
"django_jinja.builtins.extensions.StaticFilesExtension",
|
|
"django_jinja.builtins.extensions.DjangoFiltersExtension",
|
|
"django_jinja.builtins.extensions.DjangoExtraFiltersExtension",
|
|
"compressor.contrib.jinja2ext.CompressorExtension",
|
|
]
|
|
|
|
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.core.context_processors.request",
|
|
"django.contrib.messages.context_processors.messages",
|
|
"fmartingrcom.apps.config.context_processors.config"
|
|
)
|
|
|
|
#
|
|
# ADMIN
|
|
#
|
|
SUIT_CONFIG = {
|
|
'ADMIN_NAME': 'fmartingr.com',
|
|
'SEARCH_URL': '',
|
|
'MENU': (
|
|
{
|
|
'app': 'auth',
|
|
'label': 'Authorization',
|
|
'icon': 'icon-lock',
|
|
'models': ('user', 'group')
|
|
},
|
|
{
|
|
'app': 'config',
|
|
'label': 'Settings',
|
|
'icon': 'icon-cog',
|
|
},
|
|
{
|
|
'app': 'blog',
|
|
'label': 'Blog',
|
|
'icon': 'icon-book',
|
|
},
|
|
{
|
|
'app': 'projects',
|
|
'label': 'Projects',
|
|
'icon': 'icon-folder',
|
|
}
|
|
),
|
|
}
|