Update settings
This commit is contained in:
parent
b2f63ec20f
commit
b39f67a8ac
1 changed files with 65 additions and 2 deletions
|
@ -13,6 +13,7 @@ import dotenv
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
@ -41,8 +42,19 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
'bootstrap3',
|
'bootstrap3',
|
||||||
|
'compressor',
|
||||||
'guardian',
|
'guardian',
|
||||||
'hosting',
|
'hosting',
|
||||||
|
'membership',
|
||||||
|
'utils',
|
||||||
|
'cms',
|
||||||
|
'menus',
|
||||||
|
'easy_thumbnails',
|
||||||
|
'treebeard',
|
||||||
|
'filer',
|
||||||
|
'datacenterlight',
|
||||||
|
'opennebula_api',
|
||||||
|
'sekizai'
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
@ -53,6 +65,7 @@ MIDDLEWARE = [
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
|
'django.middleware.locale.LocaleMiddleware',
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'dynamicweb2.urls'
|
ROOT_URLCONF = 'dynamicweb2.urls'
|
||||||
|
@ -76,7 +89,7 @@ TEMPLATES = [
|
||||||
"django.template.context_processors.static", # Updated import
|
"django.template.context_processors.static", # Updated import
|
||||||
"django.template.context_processors.tz", # Updated import
|
"django.template.context_processors.tz", # Updated import
|
||||||
"django.contrib.messages.context_processors.messages",
|
"django.contrib.messages.context_processors.messages",
|
||||||
'hosting.context_processor.google_analytics',
|
'sekizai.context_processors.sekizai',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -137,6 +150,7 @@ STATIC_ROOT = os.path.join(PROJECT_DIR, 'static')
|
||||||
STATICFILES_FINDERS = (
|
STATICFILES_FINDERS = (
|
||||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
|
'compressor.finders.CompressorFinder'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
|
@ -184,7 +198,7 @@ STRIPE_API_PRIVATE_KEY_TEST = env('STRIPE_API_PRIVATE_KEY_TEST')
|
||||||
|
|
||||||
GUARDIAN_GET_INIT_ANONYMOUS_USER = 'hosting.models.get_anonymous_user_instance'
|
GUARDIAN_GET_INIT_ANONYMOUS_USER = 'hosting.models.get_anonymous_user_instance'
|
||||||
|
|
||||||
AUTH_USER_MODEL = 'hosting.CustomUser'
|
AUTH_USER_MODEL = 'membership.CustomUser'
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = (
|
AUTHENTICATION_BACKENDS = (
|
||||||
'dynamicweb2.backend.UngleichLDAPBackend',
|
'dynamicweb2.backend.UngleichLDAPBackend',
|
||||||
|
@ -271,3 +285,52 @@ VM_BASE_PRICE = float(env('VM_BASE_PRICE'))
|
||||||
# # Handle the case where the site doesn't exist
|
# # Handle the case where the site doesn't exist
|
||||||
# pass
|
# pass
|
||||||
|
|
||||||
|
# The oneadmin user name of the OpenNebula infrastructure
|
||||||
|
OPENNEBULA_USERNAME = env('OPENNEBULA_USERNAME')
|
||||||
|
|
||||||
|
# The oneadmin password of the OpenNebula infrastructure
|
||||||
|
# The default credentials of the Sandbox OpenNebula VM is
|
||||||
|
# oneadmin:opennebula
|
||||||
|
OPENNEBULA_PASSWORD = env('OPENNEBULA_PASSWORD')
|
||||||
|
|
||||||
|
# The protocol is generally http or https
|
||||||
|
OPENNEBULA_PROTOCOL = env('OPENNEBULA_PROTOCOL')
|
||||||
|
|
||||||
|
# The ip address or the domain name of the opennebula infrastructure
|
||||||
|
OPENNEBULA_DOMAIN = env('OPENNEBULA_DOMAIN')
|
||||||
|
|
||||||
|
# The port to connect in order to send an xmlrpc request. The default
|
||||||
|
# port is 2633
|
||||||
|
OPENNEBULA_PORT = env('OPENNEBULA_PORT')
|
||||||
|
|
||||||
|
# The endpoint to which the XML RPC request needs to be sent to. The
|
||||||
|
# default value is /RPC2
|
||||||
|
OPENNEBULA_ENDPOINT = env('OPENNEBULA_ENDPOINT')
|
||||||
|
|
||||||
|
# The public ssh key of the oneadmin user
|
||||||
|
ONEADMIN_USER_SSH_PUBLIC_KEY = env('ONEADMIN_USER_SSH_PUBLIC_KEY')
|
||||||
|
|
||||||
|
CELERY_MAX_RETRIES = 1
|
||||||
|
|
||||||
|
BYPASS_OPENNEBULA = True
|
||||||
|
|
||||||
|
SITE_ID = 1
|
||||||
|
|
||||||
|
ANONYMOUS_USER_NAME = 'anonymous@ungleich.ch'
|
||||||
|
|
||||||
|
GUARDIAN_GET_INIT_ANONYMOUS_USER = 'membership.models.get_anonymous_user_instance'
|
||||||
|
|
||||||
|
LANGUAGES = (
|
||||||
|
('en-us', _('English')),
|
||||||
|
('de', _('Deutsch')),
|
||||||
|
)
|
||||||
|
|
||||||
|
LANGUAGE_CODE = 'en-us'
|
||||||
|
|
||||||
|
USE_I18N = True
|
||||||
|
|
||||||
|
USE_L10N = True
|
||||||
|
|
||||||
|
LOCALE_PATHS = [
|
||||||
|
os.path.join(PROJECT_DIR, 'locale'),
|
||||||
|
]
|
Loading…
Reference in a new issue