mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-10 04:50:16 +02:00
Add help text to State model Remove navbar group headings Fix registration email pluralization Group memberships on state admin page Attempt to prevent resetting of state if set on profile admin manually Embed readthedocs on help page Rename CorpStats API Index to Registration Index Default corputils view to main character's corp if available Correct Application characters listing Correct string coercion of optimers Improve readability of SRP values with intcomma Beautify tables by embeding in panels Replace slugify with py3-friendly python-slugify
613 lines
20 KiB
Python
613 lines
20 KiB
Python
"""
|
|
Django settings for alliance_auth project.
|
|
|
|
Generated by 'django-admin startproject' using Django 1.10.1.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/1.10/topics/settings/
|
|
|
|
For the full list of settings and their values, see
|
|
https://docs.djangoproject.com/en/1.10/ref/settings/
|
|
"""
|
|
|
|
import os
|
|
|
|
import djcelery
|
|
|
|
from django.contrib import messages
|
|
from celery.schedules import crontab
|
|
|
|
INSTALLED_APPS = [
|
|
'django.contrib.admin',
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
'django.contrib.humanize',
|
|
'djcelery',
|
|
'bootstrapform',
|
|
'authentication',
|
|
'services',
|
|
'eveonline',
|
|
'groupmanagement',
|
|
'hrapplications',
|
|
'timerboard',
|
|
'srp',
|
|
'optimer',
|
|
'corputils',
|
|
'fleetactivitytracking',
|
|
'notifications',
|
|
'esi',
|
|
'permissions_tool',
|
|
'geelweb.django.navhelper',
|
|
'bootstrap_pagination',
|
|
|
|
# Services - comment out if not used
|
|
'services.modules.mumble',
|
|
'services.modules.discord',
|
|
'services.modules.discourse',
|
|
'services.modules.ipboard',
|
|
'services.modules.ips4',
|
|
'services.modules.market',
|
|
'services.modules.openfire',
|
|
'services.modules.seat',
|
|
'services.modules.smf',
|
|
'services.modules.phpbb3',
|
|
'services.modules.xenforo',
|
|
'services.modules.teamspeak3',
|
|
]
|
|
|
|
#####################################################
|
|
##
|
|
## Django Project Configuration
|
|
##
|
|
#####################################################
|
|
# You shouldn't need to touch most of this.
|
|
# Scroll down for Auth Configuration
|
|
#####################################################
|
|
|
|
djcelery.setup_loader()
|
|
|
|
# Celery configuration
|
|
BROKER_URL = 'redis://localhost:6379/0'
|
|
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
|
|
CELERYBEAT_SCHEDULE = dict()
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
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',
|
|
'django.middleware.locale.LocaleMiddleware',
|
|
]
|
|
|
|
ROOT_URLCONF = 'alliance_auth.urls'
|
|
|
|
LOCALE_PATHS = (
|
|
os.path.join(BASE_DIR, 'locale/'),
|
|
)
|
|
|
|
ugettext = lambda s: s
|
|
LANGUAGES = (
|
|
('en', ugettext('English')),
|
|
('de', ugettext('German')),
|
|
)
|
|
|
|
TEMPLATES = [
|
|
{
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'DIRS': [
|
|
os.path.join(BASE_DIR, 'customization/templates'),
|
|
os.path.join(BASE_DIR, 'stock/templates'),
|
|
],
|
|
'APP_DIRS': True,
|
|
'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',
|
|
'django.template.context_processors.i18n',
|
|
'django.template.context_processors.media',
|
|
'django.template.context_processors.static',
|
|
'django.template.context_processors.tz',
|
|
'services.context_processors.auth_settings',
|
|
'notifications.context_processors.user_notification_count',
|
|
'authentication.context_processors.states',
|
|
'authentication.context_processors.membership_state',
|
|
'groupmanagement.context_processors.can_manage_groups',
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
WSGI_APPLICATION = 'alliance_auth.wsgi.application'
|
|
|
|
|
|
# Password validation
|
|
# https://docs.djangoproject.com/en/1.10/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',
|
|
},
|
|
]
|
|
|
|
AUTHENTICATION_BACKENDS = ['authentication.backends.StateBackend', 'authentication.backends.ModelBackend']
|
|
LOGIN_URL = 'auth_login_user'
|
|
|
|
# Internationalization
|
|
# https://docs.djangoproject.com/en/1.10/topics/i18n/
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
TIME_ZONE = 'UTC'
|
|
|
|
USE_I18N = True
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# https://docs.djangoproject.com/en/1.10/howto/static-files/
|
|
|
|
STATIC_URL = '/static/'
|
|
STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
|
STATICFILES_DIRS = (
|
|
os.path.join(BASE_DIR, "customization/static"),
|
|
os.path.join(BASE_DIR, "stock/static"),
|
|
)
|
|
|
|
# Bootstrap messaging css workaround
|
|
MESSAGE_TAGS = {
|
|
messages.ERROR: 'danger'
|
|
}
|
|
|
|
CACHES = {
|
|
"default": {
|
|
"BACKEND": "django_redis.cache.RedisCache",
|
|
"LOCATION": "redis://127.0.0.1:6379/1",
|
|
"OPTIONS": {
|
|
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
|
}
|
|
}
|
|
}
|
|
|
|
#####################################################
|
|
##
|
|
## Auth Configuration
|
|
##
|
|
#####################################################
|
|
|
|
###############################
|
|
# Required Django Settings
|
|
###############################
|
|
# SECRET_KEY - Random alphanumeric string for cryptographic signing
|
|
# http://www.miniwebtool.com/django-secret-key-generator/
|
|
# DEBUG - True to display stack traces when errors are encountered.
|
|
# Set this False once auth is installed and working for security.
|
|
# ALLOWED_HOSTS - A list of hosts to serve content on. Wildcards accepted.
|
|
# Requests for hosts not listed here will be rejected.
|
|
# Example: ['example.com', 'auth.example.com']
|
|
# DATABASES - Auth database connection information.
|
|
################################
|
|
SECRET_KEY = ''
|
|
DEBUG = True
|
|
ALLOWED_HOSTS = []
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
'NAME': 'alliance_auth',
|
|
'USER': 'allianceserver',
|
|
'PASSWORD': '',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '3306',
|
|
},
|
|
}
|
|
|
|
####################################
|
|
# SITE_NAME - Name of the auth site.
|
|
####################################
|
|
SITE_NAME = 'Alliance Auth'
|
|
|
|
#################
|
|
# EMAIL SETTINGS
|
|
#################
|
|
# DEFAULT_FROM_EMAIL - no-reply email address
|
|
# DOMAIN - The Alliance Auth domain (or subdomain) address, no leading http://
|
|
# EMAIL_HOST - SMTP Server URL
|
|
# EMAIL_PORT - SMTP Server PORT
|
|
# EMAIL_HOST_USER - Email Username (for gmail, the entire address)
|
|
# EMAIL_HOST_PASSWORD - Email Password
|
|
# EMAIL_USE_TLS - Set to use TLS encryption
|
|
#################
|
|
DEFAULT_FROM_EMAIL = 'no-reply@example.com'
|
|
DOMAIN = 'example.com'
|
|
EMAIL_HOST = 'smtp.gmail.com'
|
|
EMAIL_PORT = 587
|
|
EMAIL_HOST_USER = ''
|
|
EMAIL_HOST_PASSWORD = ''
|
|
EMAIL_USE_TLS = True
|
|
|
|
###################
|
|
# SSO Settings
|
|
###################
|
|
# Get client ID and client secret from registering an app at
|
|
# https://developers.eveonline.com/
|
|
# Callback URL should be https://example.com/sso/callback
|
|
###################
|
|
ESI_SSO_CLIENT_ID = ''
|
|
ESI_SSO_CLIENT_SECRET = ''
|
|
ESI_SSO_CALLBACK_URL = ''
|
|
|
|
#################
|
|
# Login Settings
|
|
#################
|
|
# LOGIN_REDIRECT_URL - default destination when logging in if no redirect specified
|
|
# LOGOUT_REDIRECT_URL - destination after logging out
|
|
# Both of these redirects accept values as per the django redirect shortcut
|
|
# https://docs.djangoproject.com/en/1.10/topics/http/shortcuts/#redirect
|
|
# - url names eg 'authentication:dashboard'
|
|
# - relative urls eg '/dashboard'
|
|
# - absolute urls eg 'http://example.com/dashboard'
|
|
# LOGIN_TOKEN_SCOPES - scopes required on new tokens when logging in. Cannot be blank.
|
|
# ACCOUNT_ACTIVATION_DAYS - number of days email verification tokens are valid for
|
|
##################
|
|
LOGIN_REDIRECT_URL = 'authentication:dashboard'
|
|
LOGOUT_REDIRECT_URL = 'authentication:dashboard'
|
|
LOGIN_TOKEN_SCOPES = ['esi-characters.read_opportunities.v1']
|
|
ACCOUNT_ACTIVATION_DAYS = 1
|
|
|
|
#####################################################
|
|
##
|
|
## Service Configuration
|
|
##
|
|
#####################################################
|
|
|
|
#####################
|
|
# Alliance Market
|
|
#####################
|
|
MARKET_URL = 'http://example.com/market'
|
|
MARKET_DB = {
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
'NAME': 'alliance_market',
|
|
'USER': 'allianceserver-market',
|
|
'PASSWORD': '',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '3306',
|
|
}
|
|
|
|
#####################
|
|
# IPBoard3 Configuration
|
|
#####################
|
|
# IPBOARD_ENDPOINT - Api endpoint if using ipboard
|
|
# IPBOARD_APIKEY - Api key to interact with ipboard
|
|
# IPBOARD_APIMODULE - Module for alliance auth *leave alone*
|
|
#####################
|
|
IPBOARD_ENDPOINT = 'example.com/interface/board/index.php'
|
|
IPBOARD_APIKEY = ''
|
|
IPBOARD_APIMODULE = 'aa'
|
|
|
|
########################
|
|
# XenForo Configuration
|
|
########################
|
|
XENFORO_ENDPOINT = 'example.com/api.php'
|
|
XENFORO_DEFAULT_GROUP = 0
|
|
XENFORO_APIKEY = ''
|
|
#####################
|
|
|
|
######################
|
|
# Jabber Configuration
|
|
######################
|
|
# JABBER_URL - Jabber address url, no leading http://
|
|
# JABBER_PORT - Jabber service portal
|
|
# JABBER_SERVER - Jabber server url (server name, eg 'example.com'), no leading http://
|
|
# OPENFIRE_ADDRESS - Address of the openfire admin console including port
|
|
# Please use http:// with 9090 or https:// with 9091
|
|
# eg 'http://example.com:9090' or 'https://example.com:9091'
|
|
# OPENFIRE_SECRET_KEY - Openfire REST API secret key
|
|
# BROADCAST_USER - Broadcast user username (before @ sign)
|
|
# BROADCAST_USER_PASSWORD - Broadcast user password
|
|
# BROADCAST_SERVICE_NAME - Name of the Openfire service to broadcast to, usually "broadcast"
|
|
######################
|
|
JABBER_URL = ''
|
|
JABBER_PORT = 5223
|
|
JABBER_SERVER = ''
|
|
OPENFIRE_ADDRESS = ''
|
|
OPENFIRE_SECRET_KEY = ''
|
|
BROADCAST_USER = "broadcast" + "@" + JABBER_URL
|
|
BROADCAST_USER_PASSWORD = ''
|
|
BROADCAST_SERVICE_NAME = "broadcast"
|
|
|
|
######################################
|
|
# Mumble Configuration
|
|
######################################
|
|
# MUMBLE_URL - Mumble server url, tolerates leading http://, mumble://, or none
|
|
# eg 'http://example.com', 'mumble://example.com', or 'example.com'
|
|
######################################
|
|
MUMBLE_URL = ''
|
|
|
|
######################################
|
|
# PHPBB3 Configuration
|
|
######################################
|
|
PHPBB3_URL = 'http://example.com/phpbb/'
|
|
PHPBB3_DB = {
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
'NAME': 'alliance_forum',
|
|
'USER': 'allianceserver-phpbb3',
|
|
'PASSWORD': '',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '3306',
|
|
}
|
|
|
|
######################################
|
|
# Teamspeak3 Configuration
|
|
######################################
|
|
# TEAMSPEAK3_SERVER_IP - Teamspeak3 server ip
|
|
# TEAMSPEAK3_SERVER_PORT - Teamspeak3 server port
|
|
# TEAMSPEAK3_SERVERQUERY_USER - Teamspeak3 serverquery username
|
|
# TEAMSPEAK3_SERVERQUERY_PASSWORD - Teamspeak3 serverquery password
|
|
# TEAMSPEAK3_VIRTUAL_SERVER - Virtual server id
|
|
# TEAMSPEAK3_AUTHED_GROUP_ID - Default authed group id
|
|
# TEAMSPEAK3_PUBLIC_URL - teamspeak3 public url used for link creation
|
|
######################################
|
|
TEAMSPEAK3_SERVER_IP = '127.0.0.1'
|
|
TEAMSPEAK3_SERVER_PORT = 10011
|
|
TEAMSPEAK3_SERVERQUERY_USER = 'serveradmin'
|
|
TEAMSPEAK3_SERVERQUERY_PASSWORD = ''
|
|
TEAMSPEAK3_VIRTUAL_SERVER = 1
|
|
TEAMSPEAK3_PUBLIC_URL = ''
|
|
|
|
######################################
|
|
# Discord Configuration
|
|
######################################
|
|
# DISCORD_GUILD_ID - ID of the guild to manage
|
|
# DISCORD_BOT_TOKEN - OAuth token of the app bot user
|
|
# DISCORD_INVITE_CODE - Alphanumeric string invite code to the server
|
|
# Do not include the leading http://discord.gg/
|
|
# DISCORD_APP_ID - OAuth app client ID
|
|
# DISCORD_APP_SECRET - OAuth app secret
|
|
# DISCORD_CALLBACK_URL - OAuth callback url
|
|
# Should be of the form 'http://example.com/discord/callback'
|
|
# DISCORD_SYNC_NAMES - Force discord nicknames to be set to eve char name
|
|
######################################
|
|
DISCORD_GUILD_ID = ''
|
|
DISCORD_BOT_TOKEN = ''
|
|
DISCORD_INVITE_CODE = ''
|
|
DISCORD_APP_ID = ''
|
|
DISCORD_APP_SECRET = ''
|
|
DISCORD_CALLBACK_URL = ''
|
|
DISCORD_SYNC_NAMES = False
|
|
|
|
######################################
|
|
# Discourse Configuration
|
|
######################################
|
|
# DISCOURSE_URL - Web address of the forums (no trailing slash). Include http://
|
|
# DISCOURSE_API_USERNAME - API account username
|
|
# DISCOURSE_API_KEY - API Key
|
|
# DISCOURSE_SSO_SECRET - SSO secret key
|
|
######################################
|
|
DISCOURSE_URL = ''
|
|
DISCOURSE_API_USERNAME = ''
|
|
DISCOURSE_API_KEY = ''
|
|
DISCOURSE_SSO_SECRET = ''
|
|
|
|
#####################################
|
|
# IPS4 Configuration
|
|
#####################################
|
|
# IPS4_URL - Base URL of the IPS4 install (no trailing slash). Include http://
|
|
#####################################
|
|
IPS4_URL = ''
|
|
IPS4_DB = {
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
'NAME': 'alliance_ips4',
|
|
'USER': 'allianceserver-ips4',
|
|
'PASSWORD': '',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '3306',
|
|
}
|
|
|
|
#####################################
|
|
# SEAT Configuration
|
|
#####################################
|
|
# SEAT_URL - Base URL of the seat install (no trailing slash). Include http://
|
|
# SEAT_XTOKEN - API key X-Token provided by SeAT
|
|
#####################################
|
|
SEAT_URL = ''
|
|
SEAT_XTOKEN = ''
|
|
|
|
######################################
|
|
# SMF Configuration
|
|
######################################
|
|
# SMF_URL - Web address of the forums. Include leading http://
|
|
######################################
|
|
SMF_URL = ''
|
|
SMF_DB = {
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
'NAME': 'alliance_smf',
|
|
'USER': 'allianceserver-smf',
|
|
'PASSWORD': '',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': '3306',
|
|
}
|
|
|
|
######################################
|
|
# Fleet-Up Configuration
|
|
######################################
|
|
# FLEETUP_APP_KEY - The app key from http://fleet-up.com/Api/MyApps
|
|
# FLEETUP_USER_ID - The user id from http://fleet-up.com/Api/MyKeys
|
|
# FLEETUP_API_ID - The API id from http://fleet-up.com/Api/MyKeys
|
|
# FLEETUP_GROUP_ID - The id of the group you want to pull data from, see http://fleet-up.com/Api/Endpoints#groups_mygroupmemberships
|
|
######################################
|
|
FLEETUP_APP_KEY = ''
|
|
FLEETUP_USER_ID = ''
|
|
FLEETUP_API_ID = ''
|
|
FLEETUP_GROUP_ID = ''
|
|
|
|
#####################################################
|
|
##
|
|
## Logging Configuration
|
|
##
|
|
#####################################################
|
|
# Set log_file and console level to desired state:
|
|
# DEBUG - basically stack trace, explains every step
|
|
# INFO - model creation, deletion, updates, etc
|
|
# WARN - unexpected function outcomes that do not impact user
|
|
# ERROR - unexcpeted function outcomes which prevent user from achieving desired outcome
|
|
# EXCEPTION - something critical went wrong, unhandled
|
|
#####################################
|
|
# Recommended level for log_file is INFO, console is DEBUG
|
|
# Change log level of individual apps below to narrow your debugging
|
|
#####################################
|
|
LOGGING = {
|
|
'version': 1,
|
|
'disable_existing_loggers': False,
|
|
'formatters': {
|
|
'verbose': {
|
|
'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
|
|
'datefmt' : "%d/%b/%Y %H:%M:%S"
|
|
},
|
|
'simple': {
|
|
'format': '%(levelname)s %(message)s'
|
|
},
|
|
},
|
|
'handlers': {
|
|
'log_file': {
|
|
'level': 'INFO', # edit this line to change logging level to file
|
|
'class': 'logging.handlers.RotatingFileHandler',
|
|
'filename': os.path.join(BASE_DIR,'log/allianceauth.log'),
|
|
'formatter': 'verbose',
|
|
'maxBytes': 1024*1024*5, # edit this line to change max log file size
|
|
'backupCount': 5, # edit this line to change number of log backups
|
|
},
|
|
'console': {
|
|
'level': 'DEBUG', # edit this line to change logging level to console
|
|
'class': 'logging.StreamHandler',
|
|
'formatter': 'verbose',
|
|
},
|
|
'notifications': { # creates notifications for users with logging_notifications permission
|
|
'level': 'ERROR', # edit this line to change logging level to notifications
|
|
'class': 'notifications.handlers.NotificationHandler',
|
|
'formatter': 'verbose',
|
|
},
|
|
},
|
|
'loggers': {
|
|
'authentication': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'celerytask': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'eveonline': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'groupmanagement': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'hrapplications': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'portal': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'registration': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'services': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'srp': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'timerboard': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'sigtracker': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'optimer': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'corputils': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'fleetactivitytracking': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'ERROR',
|
|
},
|
|
'util': {
|
|
'handlers': ['log_file', 'console', 'notifications'],
|
|
'level': 'DEBUG',
|
|
},
|
|
'django': {
|
|
'handlers': ['log_file', 'console'],
|
|
'level': 'ERROR',
|
|
},
|
|
}
|
|
}
|
|
|
|
#####################################################
|
|
##
|
|
## Magic Block
|
|
##
|
|
#####################################################
|
|
# This block automagically inserts needed settings if
|
|
# certain services are installed.
|
|
# Don't touch.
|
|
#########################################
|
|
|
|
# Conditionally add databases only if configured
|
|
if 'services.modules.phpbb3' in INSTALLED_APPS:
|
|
DATABASES['phpbb3'] = PHPBB3_DB
|
|
if 'services.modules.smf' in INSTALLED_APPS:
|
|
DATABASES['smf'] = SMF_DB
|
|
if 'services.modules.market' in INSTALLED_APPS:
|
|
DATABASES['market'] = MARKET_DB
|
|
if 'services.modules.ips4' in INSTALLED_APPS:
|
|
DATABASES['ips4'] = IPS4_DB
|
|
|
|
|
|
# Conditionally add periodic tasks for services if installed
|
|
if 'services.modules.teamspeak3' in INSTALLED_APPS:
|
|
CELERYBEAT_SCHEDULE['run_ts3_group_update'] = {
|
|
'task': 'services.modules.teamspeak3.tasks.run_ts3_group_update',
|
|
'schedule': crontab(minute='*/30'),
|
|
}
|
|
|
|
if 'services.modules.seat' in INSTALLED_APPS:
|
|
CELERYBEAT_SCHEDULE['run_seat_api_sync'] = {
|
|
'task': 'services.modules.seat.tasks.run_api_sync',
|
|
'schedule': crontab(minute='*/30'),
|
|
}
|