2014-05-08 16:59:35 +00:00
|
|
|
"""
|
|
|
|
Django settings for {{ project_name }} project.
|
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
Generated by 'django-admin startproject' using Django {{ django_version }}.
|
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
For more information on this file, see
|
|
|
|
https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/
|
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
|
https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/
|
|
|
|
"""
|
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
import os
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
2015-05-03 17:55:57 +00:00
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
# Quick-start development settings - unsuitable for production
|
|
|
|
# See https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/checklist/
|
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
|
SECRET_KEY = '{{ secret_key }}'
|
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
DEBUG = True
|
|
|
|
|
2021-05-11 11:47:33 +00:00
|
|
|
ALLOWED_HOSTS = []
|
2015-05-03 17:55:57 +00:00
|
|
|
|
|
|
|
# Application definition
|
|
|
|
|
|
|
|
INSTALLED_APPS = [
|
|
|
|
# django-orchestra apps
|
|
|
|
'orchestra',
|
|
|
|
'orchestra.contrib.accounts',
|
2016-03-04 10:04:29 +00:00
|
|
|
'orchestra.contrib.systemusers',
|
2015-05-03 17:55:57 +00:00
|
|
|
'orchestra.contrib.contacts',
|
|
|
|
'orchestra.contrib.orchestration',
|
2016-03-04 10:04:29 +00:00
|
|
|
'orchestra.contrib.bills',
|
|
|
|
'orchestra.contrib.payments',
|
|
|
|
'orchestra.contrib.tasks',
|
|
|
|
'orchestra.contrib.mailer',
|
|
|
|
'orchestra.contrib.history',
|
|
|
|
'orchestra.contrib.issues',
|
|
|
|
'orchestra.contrib.services',
|
|
|
|
'orchestra.contrib.plans',
|
|
|
|
'orchestra.contrib.orders',
|
2015-05-03 17:55:57 +00:00
|
|
|
'orchestra.contrib.domains',
|
|
|
|
'orchestra.contrib.mailboxes',
|
|
|
|
'orchestra.contrib.lists',
|
|
|
|
'orchestra.contrib.webapps',
|
|
|
|
'orchestra.contrib.websites',
|
2016-03-11 14:20:28 +00:00
|
|
|
'orchestra.contrib.letsencrypt',
|
2015-05-03 17:55:57 +00:00
|
|
|
'orchestra.contrib.databases',
|
|
|
|
'orchestra.contrib.vps',
|
|
|
|
'orchestra.contrib.saas',
|
|
|
|
'orchestra.contrib.miscellaneous',
|
2023-11-21 12:40:18 +00:00
|
|
|
'orchestra.contrib.musician',
|
2015-10-01 17:11:05 +00:00
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
# Third-party apps
|
|
|
|
'django_extensions',
|
|
|
|
'djcelery',
|
|
|
|
'fluent_dashboard',
|
|
|
|
'admin_tools',
|
|
|
|
'admin_tools.theming',
|
|
|
|
'admin_tools.menu',
|
|
|
|
'admin_tools.dashboard',
|
|
|
|
'rest_framework',
|
|
|
|
'rest_framework.authtoken',
|
2021-06-08 08:02:59 +00:00
|
|
|
'django_filters',
|
2015-05-03 17:55:57 +00:00
|
|
|
'passlib.ext.django',
|
|
|
|
'django_countries',
|
2015-05-04 14:19:58 +00:00
|
|
|
# 'debug_toolbar',
|
2023-11-23 11:53:33 +00:00
|
|
|
'bootstrap4',
|
2015-10-01 17:11:05 +00:00
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
# Django.contrib
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.staticfiles',
|
|
|
|
'django.contrib.admin.apps.SimpleAdminConfig',
|
2015-10-01 17:11:05 +00:00
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
# Last to load
|
|
|
|
'orchestra.contrib.resources',
|
|
|
|
'orchestra.contrib.settings',
|
2015-10-02 17:17:56 +00:00
|
|
|
# 'django_nose',
|
2015-05-03 17:55:57 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2021-05-11 11:47:33 +00:00
|
|
|
MIDDLEWARE = [
|
|
|
|
'django.middleware.security.SecurityMiddleware',
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
|
|
|
|
'orchestra.core.caches.RequestCacheMiddleware',
|
|
|
|
# also handles transations, ATOMIC_REQUESTS does not wrap middlewares
|
|
|
|
'orchestra.contrib.orchestration.middlewares.OperationsMiddleware',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
ROOT_URLCONF = '{{ project_name }}.urls'
|
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
TEMPLATES = [
|
|
|
|
{
|
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
|
'DIRS': [],
|
|
|
|
'OPTIONS': {
|
|
|
|
'context_processors': [
|
|
|
|
'django.template.context_processors.debug',
|
|
|
|
'django.template.context_processors.request',
|
|
|
|
'django.contrib.auth.context_processors.auth',
|
|
|
|
'django.contrib.messages.context_processors.messages',
|
2015-05-03 21:34:23 +00:00
|
|
|
'orchestra.core.context_processors.site',
|
2015-05-03 17:55:57 +00:00
|
|
|
],
|
2016-05-03 20:24:15 +00:00
|
|
|
'loaders': [
|
|
|
|
'admin_tools.template_loaders.Loader',
|
|
|
|
'django.template.loaders.filesystem.Loader',
|
|
|
|
'django.template.loaders.app_directories.Loader',
|
|
|
|
],
|
2015-05-03 17:55:57 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2015-05-03 18:33:07 +00:00
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
WSGI_APPLICATION = '{{ project_name }}.wsgi.application'
|
|
|
|
|
|
|
|
|
|
|
|
# Database
|
|
|
|
# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases
|
|
|
|
|
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
2015-05-03 17:55:57 +00:00
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
|
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
2015-05-03 21:45:46 +00:00
|
|
|
'USER': '', # Not used with sqlite3.
|
|
|
|
'PASSWORD': '', # Not used with sqlite3.
|
|
|
|
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
|
2014-05-08 16:59:35 +00:00
|
|
|
'PORT': '', # Set to empty string for default. Not used with sqlite3.
|
2015-05-03 21:45:46 +00:00
|
|
|
'CONN_MAX_AGE': 60*10 # Enable persistent connections
|
2014-05-08 16:59:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-29 09:39:38 +00:00
|
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2021-05-11 11:48:26 +00:00
|
|
|
# Password validation
|
|
|
|
# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators
|
|
|
|
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
|
|
{
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2015-05-03 17:55:57 +00:00
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/
|
|
|
|
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
|
2015-10-04 19:57:00 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
TIME_ZONE = open('/etc/timezone', 'r').read().strip()
|
|
|
|
except IOError:
|
|
|
|
TIME_ZONE = 'UTC'
|
2015-05-03 17:55:57 +00:00
|
|
|
|
|
|
|
USE_I18N = True
|
|
|
|
|
|
|
|
USE_L10N = True
|
|
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
|
# https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
|
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
# Absolute path to the directory static files should be collected to.
|
|
|
|
# Don't put anything in this directory yourself; store your static files
|
|
|
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
|
|
|
# Example: "/home/media/media.lawrence.com/static/"
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
|
|
|
|
2015-06-02 12:59:49 +00:00
|
|
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2015-03-29 16:10:07 +00:00
|
|
|
# Path used for database translations files
|
|
|
|
LOCALE_PATHS = (
|
|
|
|
os.path.join(BASE_DIR, 'locale'),
|
|
|
|
)
|
|
|
|
|
2015-04-05 22:34:47 +00:00
|
|
|
ORCHESTRA_SITE_NAME = '{{ project_name }}'
|
2015-05-03 18:33:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
AUTH_USER_MODEL = 'accounts.Account'
|
|
|
|
|
|
|
|
|
|
|
|
AUTHENTICATION_BACKENDS = [
|
|
|
|
'orchestra.permissions.auth.OrchestraPermissionBackend',
|
|
|
|
'django.contrib.auth.backends.ModelBackend',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2015-10-01 17:11:05 +00:00
|
|
|
EMAIL_BACKEND = 'orchestra.contrib.mailer.backends.EmailBackend'
|
2015-05-04 14:46:03 +00:00
|
|
|
|
|
|
|
|
2016-10-22 07:23:45 +00:00
|
|
|
# Needed for Bulk operations
|
|
|
|
DATA_UPLOAD_MAX_NUMBER_FIELDS = None
|
|
|
|
|
|
|
|
|
2023-11-21 12:56:09 +00:00
|
|
|
############################
|
|
|
|
## MUSICIAN CONFIGURATION ##
|
|
|
|
############################
|
|
|
|
|
|
|
|
# Direcction than go when you login
|
|
|
|
LOGIN_REDIRECT_URL = 'musician:dashboard'
|
|
|
|
|
|
|
|
# Where requests are redirected for login
|
|
|
|
LOGIN_URL = 'musician:login'
|
|
|
|
|
|
|
|
# The URL or named URL pattern where requests are redirected after logout
|
|
|
|
LOGOUT_REDIRECT_URL = 'musician:login'
|
|
|
|
|
|
|
|
|
2023-11-23 18:59:14 +00:00
|
|
|
USER_SUPPORT_EMAIL = "support@example.com"
|
|
|
|
|
2015-05-03 18:33:07 +00:00
|
|
|
#################################
|
2023-11-21 12:56:09 +00:00
|
|
|
## 3RD PARTY APPS CONFIGURATION ##
|
2015-05-03 18:33:07 +00:00
|
|
|
#################################
|
|
|
|
|
|
|
|
# Admin Tools
|
|
|
|
ADMIN_TOOLS_MENU = 'orchestra.admin.menu.OrchestraMenu'
|
|
|
|
|
|
|
|
# Fluent dashboard
|
|
|
|
ADMIN_TOOLS_INDEX_DASHBOARD = 'orchestra.admin.dashboard.OrchestraIndexDashboard'
|
|
|
|
FLUENT_DASHBOARD_ICON_THEME = '../orchestra/icons'
|
|
|
|
|
|
|
|
|
|
|
|
# Django-celery
|
|
|
|
import djcelery
|
2023-11-29 09:39:38 +00:00
|
|
|
|
2015-05-03 18:33:07 +00:00
|
|
|
djcelery.setup_loader()
|
2015-05-03 20:08:32 +00:00
|
|
|
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
|
2015-10-01 17:11:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
# rest_framework
|
|
|
|
REST_FRAMEWORK = {
|
|
|
|
'DEFAULT_PERMISSION_CLASSES': (
|
|
|
|
'orchestra.permissions.api.OrchestraPermissionBackend',
|
|
|
|
),
|
|
|
|
'DEFAULT_AUTHENTICATION_CLASSES': (
|
|
|
|
'rest_framework.authentication.SessionAuthentication',
|
|
|
|
'rest_framework.authentication.TokenAuthentication',
|
|
|
|
),
|
|
|
|
'DEFAULT_FILTER_BACKENDS': (
|
2021-05-06 08:57:11 +00:00
|
|
|
('django_filters.rest_framework.DjangoFilterBackend',)
|
2015-10-01 17:11:05 +00:00
|
|
|
),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Use a UNIX compatible hash
|
|
|
|
PASSLIB_CONFIG = (
|
|
|
|
"[passlib]\n"
|
|
|
|
"schemes = sha512_crypt, django_pbkdf2_sha256, django_pbkdf2_sha1, "
|
|
|
|
" django_bcrypt, django_bcrypt_sha256, django_salted_sha1, des_crypt, "
|
|
|
|
" django_salted_md5, django_des_crypt, hex_md5, bcrypt, phpass\n"
|
|
|
|
"default = sha512_crypt\n"
|
|
|
|
"deprecated = django_pbkdf2_sha1, django_salted_sha1, django_salted_md5, "
|
|
|
|
" django_des_crypt, des_crypt, hex_md5\n"
|
|
|
|
"django_pbkdf2_sha256__min_rounds = 10000\n"
|
|
|
|
"sha512_crypt__min_rounds = 80000\n"
|
|
|
|
"staff__django_pbkdf2_sha256__default_rounds = 12500\n"
|
|
|
|
"staff__sha512_crypt__default_rounds = 100000\n"
|
|
|
|
"superuser__django_pbkdf2_sha256__default_rounds = 15000\n"
|
|
|
|
"superuser__sha512_crypt__default_rounds = 120000\n"
|
|
|
|
)
|
2016-05-11 12:56:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
SHELL_PLUS_PRE_IMPORTS = (
|
|
|
|
('orchestra.contrib.orchestration.managers', ('orchestrate',)),
|
|
|
|
)
|