CENTER_PROJECT_RENEWAL_HELP_URL = ENV.str('CENTER_PROJECT_RENEWAL_HELP_URL', default='') CENTER_BASE_URL = ENV.str('CENTER_BASE_URL', default='') #------------------------------------------------------------------------------ # Enable Project Review #------------------------------------------------------------------------------ PROJECT_ENABLE_PROJECT_REVIEW = ENV.bool('PROJECT_ENABLE_PROJECT_REVIEW', default=True) #------------------------------------------------------------------------------ # Allocation related #------------------------------------------------------------------------------ ALLOCATION_ENABLE_CHANGE_REQUESTS_BY_DEFAULT = ENV.bool( 'ALLOCATION_ENABLE_CHANGE_REQUESTS', default=True) ALLOCATION_CHANGE_REQUEST_EXTENSION_DAYS = ENV.list( 'ALLOCATION_CHANGE_REQUEST_EXTENSION_DAYS', cast=int, default=[30, 60, 90]) ALLOCATION_ENABLE_ALLOCATION_RENEWAL = ENV.bool( 'ALLOCATION_ENABLE_ALLOCATION_RENEWAL', default=True) ALLOCATION_FUNCS_ON_EXPIRE = [ 'coldfront.core.allocation.utils.test_allocation_function', ] # This is in days ALLOCATION_DEFAULT_ALLOCATION_LENGTH = ENV.int( 'ALLOCATION_DEFAULT_ALLOCATION_LENGTH', default=365) #------------------------------------------------------------------------------ # Allow user to select account name for allocation #------------------------------------------------------------------------------ ALLOCATION_ACCOUNT_ENABLED = ENV.bool('ALLOCATION_ACCOUNT_ENABLED', default=False)
from coldfront.config.base import INSTALLED_APPS from coldfront.config.env import ENV INSTALLED_APPS += [ 'coldfront.plugins.slurm', ] SLURM_SACCTMGR_PATH = ENV.str('SLURM_SACCTMGR_PATH', default='/usr/bin/sacctmgr') SLURM_NOOP = ENV.str('SLURM_NOOP', False) SLURM_IGNORE_USERS = ENV.list('SLURM_IGNORE_USERS', default=['root']) SLURM_IGNORE_ACCOUNTS = ENV.list('SLURM_IGNORE_ACCOUNTS', default=[])
""" Base Django settings for ColdFront project. """ import os import coldfront from django.core.exceptions import ImproperlyConfigured from django.core.management.utils import get_random_secret_key from coldfront.config.env import ENV, PROJECT_ROOT #------------------------------------------------------------------------------ # Base Django config for ColdFront #------------------------------------------------------------------------------ VERSION = coldfront.VERSION BASE_DIR = PROJECT_ROOT() ALLOWED_HOSTS = ENV.list('ALLOWED_HOSTS', default=['*']) DEBUG = ENV.bool('DEBUG', default=False) WSGI_APPLICATION = 'coldfront.config.wsgi.application' ROOT_URLCONF = 'coldfront.config.urls' SECRET_KEY = ENV.str('SECRET_KEY', default='') if len(SECRET_KEY) == 0: SECRET_KEY = get_random_secret_key() #------------------------------------------------------------------------------ # Locale settings #------------------------------------------------------------------------------ LANGUAGE_CODE = ENV.str('LANGUAGE_CODE', default='en-us') TIME_ZONE = ENV.str('TIME_ZONE', default='America/New_York') USE_I18N = True USE_L10N = True USE_TZ = True
from coldfront.config.env import ENV #------------------------------------------------------------------------------ # Email/Notification settings #------------------------------------------------------------------------------ EMAIL_ENABLED = ENV.bool('EMAIL_ENABLED', default=False) EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = ENV.str('EMAIL_HOST', default='localhost') EMAIL_PORT = ENV.int('EMAIL_PORT', default=25) EMAIL_HOST_USER = ENV.str('EMAIL_HOST_USER', default='') EMAIL_HOST_PASSWORD = ENV.str('EMAIL_HOST_PASSWORD', default='') EMAIL_USE_TLS = ENV.bool('EMAIL_USE_TLS', default=False) EMAIL_TIMEOUT = ENV.int('EMAIL_TIMEOUT', default=3) EMAIL_SUBJECT_PREFIX = ENV.str('EMAIL_SUBJECT_PREFIX', default='[ColdFront]') EMAIL_ADMIN_LIST = ENV.list('EMAIL_ADMIN_LIST') EMAIL_SENDER = ENV.str('EMAIL_SENDER') EMAIL_TICKET_SYSTEM_ADDRESS = ENV.str('EMAIL_TICKET_SYSTEM_ADDRESS') EMAIL_DIRECTOR_EMAIL_ADDRESS = ENV.str('EMAIL_DIRECTOR_EMAIL_ADDRESS') EMAIL_PROJECT_REVIEW_CONTACT = ENV.str('EMAIL_PROJECT_REVIEW_CONTACT') EMAIL_DEVELOPMENT_EMAIL_LIST = ENV.list('EMAIL_DEVELOPMENT_EMAIL_LIST') EMAIL_OPT_OUT_INSTRUCTION_URL = ENV.str('EMAIL_OPT_OUT_INSTRUCTION_URL', default='') EMAIL_ALLOCATION_EXPIRING_NOTIFICATION_DAYS = ENV.list( 'EMAIL_ALLOCATION_EXPIRING_NOTIFICATION_DAYS', cast=int, default=[7, 14, 30]) EMAIL_SIGNATURE = ENV.str('EMAIL_SIGNATURE', default='', multiline=True)