settings/base: refactor - pep8, also added djangocms-blog parler conf
Signed-off-by: rscnt <rascnt@gmail.com>
This commit is contained in:
parent
c502021b15
commit
cc9959d632
1 changed files with 37 additions and 27 deletions
|
@ -5,14 +5,13 @@ Copyright 2015 ungleich.
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
import os
|
import os
|
||||||
import logging
|
|
||||||
import django.db.backends.postgresql_psycopg2
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
# dotenv
|
# dotenv
|
||||||
import dotenv
|
import dotenv
|
||||||
|
|
||||||
gettext = lambda s: s
|
gettext = lambda s: s
|
||||||
|
|
||||||
|
|
||||||
def env(env_name):
|
def env(env_name):
|
||||||
return os.environ.get(env_name)
|
return os.environ.get(env_name)
|
||||||
|
|
||||||
|
@ -36,8 +35,8 @@ LOGIN_URL = None
|
||||||
LOGOUT_URL = None
|
LOGOUT_URL = None
|
||||||
LOGIN_REDIRECT_URL = None
|
LOGIN_REDIRECT_URL = None
|
||||||
|
|
||||||
EMAIL_HOST="localhost"
|
EMAIL_HOST = "localhost"
|
||||||
EMAIL_PORT=25
|
EMAIL_PORT = 25
|
||||||
|
|
||||||
SECRET_KEY = env('DJANGO_SECRET_KEY')
|
SECRET_KEY = env('DJANGO_SECRET_KEY')
|
||||||
|
|
||||||
|
@ -56,7 +55,7 @@ INSTALLED_APPS = (
|
||||||
'treebeard', # utilities for implementing a tree
|
'treebeard', # utilities for implementing a tree
|
||||||
'menus', # helper for model independent hierarchical website navigation
|
'menus', # helper for model independent hierarchical website navigation
|
||||||
'sekizai', # for javascript and css management
|
'sekizai', # for javascript and css management
|
||||||
#django-cms plugins
|
# django-cms plugins
|
||||||
'djangocms_flash',
|
'djangocms_flash',
|
||||||
'djangocms_googlemap',
|
'djangocms_googlemap',
|
||||||
'djangocms_inherit',
|
'djangocms_inherit',
|
||||||
|
@ -64,7 +63,7 @@ INSTALLED_APPS = (
|
||||||
'djangocms_snippet',
|
'djangocms_snippet',
|
||||||
'djangocms_teaser',
|
'djangocms_teaser',
|
||||||
'djangocms_page_meta',
|
'djangocms_page_meta',
|
||||||
#django-filer
|
# django-filer
|
||||||
'cmsplugin_filer_file',
|
'cmsplugin_filer_file',
|
||||||
'cmsplugin_filer_folder',
|
'cmsplugin_filer_folder',
|
||||||
'cmsplugin_filer_link',
|
'cmsplugin_filer_link',
|
||||||
|
@ -72,7 +71,7 @@ INSTALLED_APPS = (
|
||||||
'cmsplugin_filer_video',
|
'cmsplugin_filer_video',
|
||||||
# versioning
|
# versioning
|
||||||
'reversion',
|
'reversion',
|
||||||
#ck-editor
|
# ck-editor
|
||||||
'djangocms_text_ckeditor',
|
'djangocms_text_ckeditor',
|
||||||
# djangocms-blog
|
# djangocms-blog
|
||||||
'filer',
|
'filer',
|
||||||
|
@ -230,20 +229,20 @@ CMS_PLACEHOLDER_CONF = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'content': {
|
'content': {
|
||||||
'name' : _('Content'),
|
'name': _('Content'),
|
||||||
'default_plugins':[
|
'default_plugins': [
|
||||||
{
|
{
|
||||||
'plugin_type':'TextPlugin',
|
'plugin_type': 'TextPlugin',
|
||||||
'values':{'body':'<p></p>'},
|
'values': {'body': '<p></p>'},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'post_content': {
|
'post_content': {
|
||||||
'name' : _('Content'),
|
'name': _('Content'),
|
||||||
'default_plugins':[
|
'default_plugins': [
|
||||||
{
|
{
|
||||||
'plugin_type':'TextPlugin',
|
'plugin_type': 'TextPlugin',
|
||||||
'values':{'body':'<p></p>'},
|
'values': {'body': '<p></p>'},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -325,7 +324,9 @@ THUMBNAIL_PROCESSORS = (
|
||||||
)
|
)
|
||||||
|
|
||||||
# django-cms-text-ckeditor
|
# django-cms-text-ckeditor
|
||||||
TEXT_SAVE_IMAGE_FUNCTION='cmsplugin_filer_image.integrations.ckeditor.create_image_plugin'
|
TEXT_SAVE_IMAGE_FUNCTION = (
|
||||||
|
'cmsplugin_filer_image.integrations.ckeditor.create_image_plugin'
|
||||||
|
)
|
||||||
TEXT_ADDITIONAL_TAGS = ('iframe',)
|
TEXT_ADDITIONAL_TAGS = ('iframe',)
|
||||||
TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder')
|
TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder')
|
||||||
USE_X_FORWARDED_HOST = True
|
USE_X_FORWARDED_HOST = True
|
||||||
|
@ -340,19 +341,23 @@ BOOTSTRAP3 = {
|
||||||
# The Bootstrap base URL
|
# The Bootstrap base URL
|
||||||
'base_url': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/',
|
'base_url': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/',
|
||||||
|
|
||||||
# The complete URL to the Bootstrap CSS file (None means derive it from base_url)
|
# The complete URL to the Bootstrap CSS file
|
||||||
|
# (None means derive it from base_url)
|
||||||
'css_url': None,
|
'css_url': None,
|
||||||
|
|
||||||
# The complete URL to the Bootstrap CSS file (None means no theme)
|
# The complete URL to the Bootstrap CSS file (None means no theme)
|
||||||
'theme_url': None,
|
'theme_url': None,
|
||||||
|
|
||||||
# The complete URL to the Bootstrap JavaScript file (None means derive it from base_url)
|
# The complete URL to the Bootstrap JavaScript file
|
||||||
|
# (None means derive it from base_url)
|
||||||
'javascript_url': None,
|
'javascript_url': None,
|
||||||
|
|
||||||
# Put JavaScript in the HEAD section of the HTML document (only relevant if you use bootstrap3.html)
|
# Put JavaScript in the HEAD section of the HTML document
|
||||||
|
# (only relevant if you use bootstrap3.html)
|
||||||
'javascript_in_head': False,
|
'javascript_in_head': False,
|
||||||
|
|
||||||
# Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags)
|
# Include jQuery with Bootstrap JavaScript
|
||||||
|
# (affects django-bootstrap3 template tags)
|
||||||
'include_jquery': False,
|
'include_jquery': False,
|
||||||
|
|
||||||
# Label class to use in horizontal forms
|
# Label class to use in horizontal forms
|
||||||
|
@ -376,11 +381,13 @@ BOOTSTRAP3 = {
|
||||||
# Class to indicate error (better to set this in your Django form)
|
# Class to indicate error (better to set this in your Django form)
|
||||||
'error_css_class': 'has-error',
|
'error_css_class': 'has-error',
|
||||||
|
|
||||||
# Class to indicate success, meaning the field has valid input (better to set this in your Django form)
|
# Class to indicate success, meaning the field has valid input
|
||||||
|
# (better to set this in your Django form)
|
||||||
'success_css_class': 'has-success',
|
'success_css_class': 'has-success',
|
||||||
|
|
||||||
# Renderers (only set these if you have studied the source and understand the inner workings)
|
# Renderers (only set these if you have studied the source and understand
|
||||||
'formset_renderers':{
|
# the inner workings)
|
||||||
|
'formset_renderers': {
|
||||||
'default': 'bootstrap3.renderers.FormsetRenderer',
|
'default': 'bootstrap3.renderers.FormsetRenderer',
|
||||||
},
|
},
|
||||||
'form_renderers': {
|
'form_renderers': {
|
||||||
|
@ -396,18 +403,21 @@ BOOTSTRAP3 = {
|
||||||
|
|
||||||
BLOG_ENABLE_COMMENTS = False
|
BLOG_ENABLE_COMMENTS = False
|
||||||
BLOG_USE_PLACEHOLDER = True
|
BLOG_USE_PLACEHOLDER = True
|
||||||
BLOG_IMAGE_THUMBNAIL_SIZE = {'size': '120x120', 'crop': True,'upscale': False}
|
BLOG_IMAGE_THUMBNAIL_SIZE = {'size': '120x120', 'crop': True, 'upscale': False}
|
||||||
BLOG_IMAGE_FULL_SIZE = {'size': '640x120', 'crop': True,'upscale': False}
|
BLOG_IMAGE_FULL_SIZE = {'size': '640x120', 'crop': True, 'upscale': False}
|
||||||
BLOG_PAGINATION = 4
|
BLOG_PAGINATION = 4
|
||||||
BLOG_LATEST_POSTS = BLOG_PAGINATION
|
BLOG_LATEST_POSTS = BLOG_PAGINATION
|
||||||
BLOG_POSTS_LIST_TRUNCWORDS_COUNT = 100
|
BLOG_POSTS_LIST_TRUNCWORDS_COUNT = 100
|
||||||
BLOG_MULTISITE = True
|
BLOG_MULTISITE = True
|
||||||
BLOG_AUTHOR_DEFAULT = True
|
BLOG_AUTHOR_DEFAULT = True
|
||||||
|
|
||||||
#django-meta
|
# django-meta
|
||||||
META_SITE_PROTOCOL = "https"
|
META_SITE_PROTOCOL = "https"
|
||||||
META_SITE_DOMAIN = "ungleich.ch"
|
META_SITE_DOMAIN = "ungleich.ch"
|
||||||
META_SITE_TYPE = "website"
|
META_SITE_TYPE = "website"
|
||||||
META_SITE_NAME = "ungleich"
|
META_SITE_NAME = "ungleich"
|
||||||
META_INCLUDE_KEYWORDS = ["ungleich", "hosting", "switzerland", "Schweiz", "Swiss", "cdist"]
|
META_INCLUDE_KEYWORDS = ["ungleich", "hosting", "switzerland",
|
||||||
|
"Schweiz", "Swiss", "cdist"]
|
||||||
META_USE_SITES = True
|
META_USE_SITES = True
|
||||||
|
|
||||||
|
PARLER_LANGUAGES = {1: ({'code': 'en-us'}, {'code': 'de'}, )}
|
||||||
|
|
Loading…
Reference in a new issue