Exemple #1
0
try:
    from local.local_settings import *  # noqa
except ImportError:
    logging.warning("No local_settings file found.")

# Ensure that we always have a SECRET_KEY set, even when no local_settings.py
# file is present.
# THIS IS A BACKPORT FROM HORIZON https://github.com/openstack/horizon
if not SECRET_KEY:
    if not LOCAL_PATH:
        LOCAL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                  'local')

    from webvirtmgr.utils import secret_key

    SECRET_KEY = secret_key.generate_or_read_from_file(
        os.path.join(LOCAL_PATH, '.secret_key_store'))

# list taken from http://qemu.weilnetz.de/qemu-doc.html#sec_005finvocation
QEMU_KEYMAPS = [
    'ar', 'da', 'de', 'de-ch', 'en-gb', 'en-us', 'es', 'et', 'fi', 'fo', 'fr',
    'fr-be', 'fr-ca', 'fr-ch', 'hr', 'hu', 'is', 'it', 'ja', 'lt', 'lv', 'mk',
    'nl', 'nl-be', 'no', 'pl', 'pt', 'pt-br', 'ru', 'sl', 'sv', 'th', 'tr'
]

# Installed Apps shouldn't be overridden
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
Exemple #2
0
try:
    from local.local_settings import *  # noqa
except ImportError:
    logging.warning("No local_settings file found.")

# Ensure that we always have a SECRET_KEY set, even when no local_settings.py
# file is present.
# THIS IS A BACKPORT FROM HORIZON https://github.com/openstack/horizon
if not SECRET_KEY:
    if not LOCAL_PATH:
        LOCAL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "local")

    from webvirtmgr.utils import secret_key

    SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, ".secret_key_store"))

# list taken from http://qemu.weilnetz.de/qemu-doc.html#sec_005finvocation
QEMU_KEYMAPS = [
    "ar",
    "da",
    "de",
    "de-ch",
    "en-gb",
    "en-us",
    "es",
    "et",
    "fi",
    "fo",
    "fr",
    "fr-be",