Commit 10a56e95 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Update webproject default settings

- Removed settings that change based on entry_point hooks
- Other minor default values improvements
parent b0afa33c
......@@ -36,14 +36,46 @@ from synnefo.webproject.settings.default import *
from synnefo.util.entry_points import extend_list_from_entry_point, \
extend_dict_from_entry_point
# Provide common django settings and extend them from entry_point hooks
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'south',
'synnefo.webproject'
)
INSTALLED_APPS = extend_list_from_entry_point(INSTALLED_APPS, 'synnefo', \
'web_apps')
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'django.core.context_processors.i18n',
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.media'
)
TEMPLATE_CONTEXT_PROCESSORS = extend_list_from_entry_point(
TEMPLATE_CONTEXT_PROCESSORS, 'synnefo', 'web_context_processors')
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'synnefo.lib.middleware.LoggingConfigMiddleware'
)
MIDDLEWARE_CLASSES = extend_list_from_entry_point(MIDDLEWARE_CLASSES, \
'synnefo', 'web_middleware')
STATIC_FILES = extend_dict_from_entry_point(STATIC_FILES, 'synnefo', \
'web_static')
TEMPLATE_CONTEXT_PROCESSORS = extend_list_from_entry_point(
TEMPLATE_CONTEXT_PROCESSORS, 'synnefo', 'web_context_processors')
LOGGING_SETUP['loggers'] = \
extend_dict_from_entry_point(LOGGING_SETUP['loggers'], 'synnefo', \
'loggers')
# -*- coding: utf-8 -*-
# Copyright 2011 GRNET S.A. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above
# copyright notice, this list of conditions and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# The views and conclusions contained in the software and
# documentation are those of the authors and should not be
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
#
# Core Django settings
# Core Django project settings
##################################
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'south',
'synnefo.webproject'
)
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'django.core.context_processors.i18n',
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.media'
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'synnefo.lib.middleware.LoggingConfigMiddleware'
)
# This is a django project setting, do not change this unless you know
# what you're doing
ROOT_URLCONF = 'synnefo.webproject.urls'
# Additional template dirs.
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates"
# or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'/usr/share/synnefo/templates/'
)
LANGUAGES = (
#('el', u'Ελληνικά'),
('en', 'English'),
)
......
# -*- coding: utf-8 -*-
#
# Database settings
####################
import os
DEFAULT_DB_PATH = '/usr/share/synnefo/'
DATABASES = {
'default': {
# 'postgresql_psycopg2', 'postgresql','mysql', 'sqlite3' or 'oracle'
# Available values 'postgresql_psycopg2', 'postgresql','mysql',
# 'sqlite3' or 'oracle'
'ENGINE': 'sqlite3',
# ATTENTION: This *must* be the absolute path if using sqlite3.
# See: http://docs.djangoproject.com/en/dev/ref/settings/#name
'NAME': os.path.join(DEFAULT_DB_PATH, 'database.sqlite'),
'NAME': '/usr/share/synnefo/synnefo_database.sqlite',
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
# Set to empty string for localhost. Not used with sqlite3.
'HOST': '',
# Set to empty string for default. Not used with sqlite3.
'PORT': '',
# Uncomment the following lines if you use mysql database
#'OPTIONS': {
# 'init_command': 'SET storage_engine=INNODB; ' +
# 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
#}
}
}
if DATABASES['default']['ENGINE'].endswith('mysql'):
DATABASES['default']['OPTIONS'] = {
'init_command': 'SET storage_engine=INNODB; ' +
'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
}
# -*- coding: utf-8 -*-
#
# Deployment
# Deployment settings
##################################
DEBUG = False
TEMPLATE_DEBUG = DEBUG
TEMPLATE_DEBUG = False
# You should always change this setting.
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'ly6)mw6a7x%n)-e#zzk4jo6f2=uqu!1o%)2-(7lo+f9yd^k^bg'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment