|
|
|
"""
|
|
|
|
Django settings for mamweb project.
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
|
|
https://docs.djangoproject.com/en/1.7/topics/settings/
|
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
|
https://docs.djangoproject.com/en/1.7/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__))
|
|
|
|
|
|
|
|
# Application definition
|
|
|
|
|
|
|
|
SITE_ID = 1
|
|
|
|
ROOT_URLCONF = 'mamweb.urls'
|
|
|
|
WSGI_APPLICATION = 'mamweb.wsgi.application'
|
|
|
|
|
|
|
|
APPEND_SLASH = False
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/1.7/topics/i18n/
|
|
|
|
|
|
|
|
LANGUAGE_CODE = 'cs'
|
|
|
|
TIME_ZONE = 'Europe/Prague'
|
|
|
|
USE_I18N = False
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
|
# https://docs.djangoproject.com/en/1.7/howto/static-files/
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
MEDIA_URL = '/media/'
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
|
|
|
|
|
|
|
STATICFILES_FINDERS = (
|
|
|
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
|
|
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
|
|
|
)
|
|
|
|
|
|
|
|
# Modules configuration
|
|
|
|
|
|
|
|
AUTHENTICATION_BACKENDS = (
|
|
|
|
'django.contrib.auth.backends.ModelBackend',
|
|
|
|
)
|
|
|
|
|
|
|
|
TEMPLATE_LOADERS = (
|
|
|
|
('django.template.loaders.cached.Loader', (
|
|
|
|
'django.template.loaders.filesystem.Loader',
|
|
|
|
'django.template.loaders.app_directories.Loader',
|
|
|
|
'django.template.loaders.eggs.Loader'
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
|
|
|
|
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',
|
|
|
|
)
|
|
|
|
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
|
|
|
'django.contrib.auth.context_processors.auth',
|
|
|
|
'django.contrib.messages.context_processors.messages',
|
|
|
|
'django.core.context_processors.i18n',
|
|
|
|
'django.core.context_processors.debug',
|
|
|
|
'django.core.context_processors.request',
|
|
|
|
'django.core.context_processors.media',
|
|
|
|
'django.core.context_processors.csrf',
|
|
|
|
'django.core.context_processors.tz',
|
|
|
|
'sekizai.context_processors.sekizai',
|
|
|
|
'django.core.context_processors.static',
|
|
|
|
)
|
|
|
|
|
|
|
|
INSTALLED_APPS = (
|
|
|
|
|
|
|
|
|
|
|
|
# Basic
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.sites',
|
|
|
|
'django.contrib.staticfiles',
|
|
|
|
|
|
|
|
# Utilities
|
|
|
|
'sekizai',
|
|
|
|
'reversion',
|
|
|
|
'django_countries',
|
|
|
|
'solo',
|
|
|
|
'ckeditor',
|
|
|
|
'taggit',
|
|
|
|
'autocomplete_light',
|
|
|
|
|
|
|
|
'fluent_comments',
|
|
|
|
'crispy_forms',
|
|
|
|
'threadedcomments',
|
|
|
|
'django_comments',
|
|
|
|
|
|
|
|
# MaMweb
|
|
|
|
'mamweb',
|
|
|
|
'seminar',
|
|
|
|
|
|
|
|
# Admin upravy:
|
|
|
|
|
|
|
|
# 'material',
|
|
|
|
# 'material.admin',
|
|
|
|
# 'admin_tools',
|
|
|
|
# 'admin_tools.theming',
|
|
|
|
# 'admin_tools.menu',
|
|
|
|
# 'admin_tools.dashboard',
|
|
|
|
'flat',
|
|
|
|
|
|
|
|
'django.contrib.admin',
|
|
|
|
)
|
|
|
|
|
|
|
|
DEBUG_TOOLBAR_CONFIG = {
|
|
|
|
'SHOW_COLLAPSED': True,
|
|
|
|
}
|
|
|
|
|
|
|
|
SUMMERNOTE_CONFIG = {
|
|
|
|
'iframe': False,
|
|
|
|
'airMode': False,
|
|
|
|
'attachment_require_authentication': True,
|
|
|
|
'width': '80%',
|
|
|
|
# 'height': '30em',
|
|
|
|
'toolbar': [
|
|
|
|
['style', ['style']],
|
|
|
|
['font', ['bold', 'italic', 'superscript', 'subscript', 'clear']],
|
|
|
|
['color', ['color']],
|
|
|
|
['para', ['ul', 'ol', 'paragraph']],
|
|
|
|
['table', ['table']],
|
|
|
|
['insert', ['link', 'picture', 'hr']],
|
|
|
|
['view', ['fullscreen', 'codeview']],
|
|
|
|
['help', ['help']],
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
CKEDITOR_UPLOAD_PATH = "uploads/"
|
|
|
|
CKEDITOR_IMAGE_BACKEND = 'pillow'
|
|
|
|
#CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
|
|
|
|
CKEDITOR_CONFIGS = {
|
|
|
|
'default': {
|
|
|
|
'toolbar': [
|
|
|
|
['Source', 'ShowBlocks', '-', 'Maximize'],
|
|
|
|
['Bold', 'Italic', 'Subscript', 'Superscript', '-', 'RemoveFormat'],
|
|
|
|
['NumberedList','BulletedList','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
|
|
|
['Link', 'Unlink', 'Anchor', '-', 'Image', 'Table', 'HorizontalRule'],
|
|
|
|
['Format'],
|
|
|
|
|
|
|
|
],
|
|
|
|
# 'toolbar': 'full',
|
|
|
|
'height': '40em',
|
|
|
|
'width': '100%',
|
|
|
|
'toolbarStartupExpanded': False
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Comments
|
|
|
|
|
|
|
|
COMMENTS_APP = 'fluent_comments'
|
|
|
|
#COMMENTS_APP = 'threadedcomments'
|
|
|
|
FLUENT_COMMENTS_EXCLUDE_FIELDS = ('name', 'email', 'url', 'title')
|
|
|
|
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
|
# Create file 'django.secret' in every install (it is not kept in git)
|
|
|
|
|
|
|
|
try:
|
|
|
|
with open(os.path.join(os.path.dirname(__file__), '..', 'django.secret')) as f:
|
|
|
|
SECRET_KEY = f.readline().strip()
|
|
|
|
except:
|
|
|
|
SECRET_KEY = '12345zmr_k53a*@f4q_+ji^o@!pgpef*5&8c7zzdqwkdlkj'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# MaM specific
|
|
|
|
|
|
|
|
SEMINAR_RESENI_DIR = os.path.join(BASE_DIR, 'media', 'reseni')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|