X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/b9055c7fc8caed025fd28c12532bd462edb8c78d..b76e3141680a898e8b57c57fd5a40dbce6b23e94:/redakcja/settings/__init__.py diff --git a/redakcja/settings/__init__.py b/redakcja/settings/__init__.py index e6ee2038..39823f5d 100644 --- a/redakcja/settings/__init__.py +++ b/redakcja/settings/__init__.py @@ -1,23 +1,33 @@ +# -*- coding: utf-8 -*- +# +# This file is part of MIL/PEER, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from __future__ import absolute_import -from .common import * +from os import path +from redakcja.settings.common import * -DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. -DATABASE_NAME = PROJECT_ROOT + '/dev.sqlite' # Or path to database file if using sqlite3. -DATABASE_USER = '' # Not used with sqlite3. -DATABASE_PASSWORD = '' # Not used with sqlite3. -DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. -DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': path.join(PROJECT_ROOT, 'dev.sqlite'), + 'USER': '', # Not used with sqlite3. + 'PASSWORD': '', # Not used with sqlite3. + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. + } +} -try: - from localsettings import * -except ImportError: - pass +CONSTANCE_CONFIG = { + 'NOTIFY_EMAIL': ('zofia.radziwill@nowoczesnapolska.org.pl', + 'e-mail addresses (separated with semicolons) to be notified about new organizations ' + 'and published documents'), +} -try: - LOGGING_CONFIG_FILE -except NameError: - LOGGING_CONFIG_FILE = os.path.join(PROJECT_ROOT, 'config', - ('logging.cfg' if not DEBUG else 'logging.cfg.dev')) +CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend' + + +LOGGING_CONFIG_FILE = os.path.join(PROJECT_ROOT, 'config', ('logging.cfg' if not DEBUG else 'logging.cfg.dev')) try: import logging @@ -27,6 +37,11 @@ try: else: import sys logging.basicConfig(stream=sys.stderr) -except ImportError as exc: +except (ImportError,), exc: raise + +try: + from redakcja.localsettings import * +except ImportError: + pass