Base
hypha.settings.base
¶
Hypha project base settings.
INSTALLED_APPS
module-attribute
¶
INSTALLED_APPS = ['scout_apm.django', 'hypha.cookieconsent', 'hypha.images', 'hypha.core.apps.CoreAppConfig', 'hypha.apply.activity', 'hypha.apply.categories', 'hypha.apply.funds', 'hypha.apply.dashboard', 'hypha.apply.flags', 'hypha.home', 'hypha.apply.users', 'hypha.apply.review', 'hypha.apply.determinations', 'hypha.apply.stream_forms', 'hypha.apply.todo', 'hypha.apply.translate', 'hypha.apply.utils.apps.UtilsConfig', 'hypha.apply.projects.apps.ProjectsConfig', 'hypha.public.funds', 'hypha.public.home', 'hypha.public.navigation', 'hypha.public.news', 'hypha.public.people', 'hypha.public.projects', 'hypha.public.standardpages', 'hypha.public.forms', 'hypha.public.utils', 'hypha.public.partner', 'social_django', 'django_htmx', 'heroicons', 'django_web_components', 'wagtail.contrib.modeladmin', 'wagtail.contrib.settings', 'wagtail.contrib.forms', 'wagtail.contrib.redirects', 'wagtail.embeds', 'wagtail.sites', 'wagtail.users', 'wagtail.snippets', 'wagtail.documents', 'wagtail.images', 'wagtail.search', 'wagtail.admin', 'wagtail', 'anymail', 'modelcluster', 'taggit', 'django_extensions', 'tinymce', 'django_tables2', 'django_filters', 'django_select2', 'hypha.addressfield', 'django_nh3', 'django_fsm', 'django_slack', 'django_otp', 'django_otp.plugins.otp_totp', 'django_otp.plugins.otp_static', 'two_factor', 'rest_framework', 'rest_framework_api_key', 'django_file_form', 'rolepermissions', 'hijack', 'elevate', 'pagedown', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.humanize', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.postgres', 'django.contrib.staticfiles', 'django.contrib.sitemaps', 'django.forms', 'formtools']
MIDDLEWARE
module-attribute
¶
MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', 'django.middleware.common.CommonMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'elevate.middleware.ElevateMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django_referrer_policy.middleware.ReferrerPolicyMiddleware', 'django_otp.middleware.OTPMiddleware', 'hypha.apply.users.middleware.TwoFactorAuthenticationMiddleware', 'hijack.middleware.HijackUserMiddleware', 'hypha.apply.users.middleware.SocialAuthExceptionMiddleware', 'wagtail.contrib.redirects.middleware.RedirectMiddleware', 'hypha.apply.middleware.HandleProtectionErrorMiddleware', 'django_htmx.middleware.HtmxMiddleware', 'hypha.core.middleware.htmx.HtmxMessageMiddleware']
LOGGING
module-attribute
¶
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'handlers': {'console': {'level': 'INFO', 'class': 'logging.StreamHandler', 'formatter': 'verbose'}}, 'formatters': {'verbose': {'format': '[%(asctime)s][%(process)d][%(levelname)s][%(name)s] %(message)s'}}, 'loggers': {'hypha': {'handlers': ['console'], 'level': 'INFO', 'propagate': False}, 'wagtail': {'handlers': ['console'], 'level': 'INFO', 'propagate': False}, 'django': {'handlers': ['console'], 'level': 'ERROR', 'propagate': False}, 'django.request': {'handlers': ['console'], 'level': 'WARNING', 'propagate': False}, 'django.security': {'handlers': ['console'], 'level': 'WARNING', 'propagate': False}}}
AUTH_PASSWORD_VALIDATORS
module-attribute
¶
AUTH_PASSWORD_VALIDATORS = [{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 'OPTIONS': {'min_length': 12}}, {'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'}, {'NAME': 'pwned_passwords_django.validators.PwnedPasswordsValidator', 'OPTIONS': {'error_message': gettext_lazy('This password has previously appeared in a data breach and should not be used. Please choose a different password.'), 'help_message': gettext_lazy('Your password must not have been detected in a major security breach.')}}]
DATETIME_INPUT_FORMATS
module-attribute
¶
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%dT%H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
CUSTOM_AUTH_BACKEND
module-attribute
¶
AUTHENTICATION_BACKENDS
module-attribute
¶
AUTHENTICATION_BACKENDS = ('social_core.backends.google.GoogleOAuth2', CUSTOM_AUTH_BACKEND)
FILE_ALLOWED_EXTENSIONS
module-attribute
¶
FILE_ALLOWED_EXTENSIONS = ['doc', 'docx', 'odp', 'ods', 'odt', 'pdf', 'ppt', 'pptx', 'rtf', 'txt', 'xls', 'xlsx']
FILE_ACCEPT_ATTR_VALUE
module-attribute
¶
FILE_ACCEPT_ATTR_VALUE = join(['.' + ext for ext in FILE_ALLOWED_EXTENSIONS])
GIVE_STAFF_LEAD_PERMS
module-attribute
¶
SUBMISSIONS_ARCHIVED_VIEW_ACCESS_STAFF
module-attribute
¶
SUBMISSIONS_ARCHIVED_VIEW_ACCESS_STAFF_ADMIN
module-attribute
¶
SUBMISSIONS_ARCHIVED_VIEW_ACCESS_STAFF_ADMIN = bool('SUBMISSIONS_ARCHIVED_ACCESS_STAFF_ADMIN', True)
SUBMISSION_TITLE_TEXT_TEMPLATE
module-attribute
¶
SUBMISSION_TITLE_TEXT_TEMPLATE = env('SUBMISSION_TITLE_TEMPLATE', default='{title} (#{public_id})')
SUBMISSIONS_ARCHIVED_ACCESS_STAFF
module-attribute
¶
SUBMISSIONS_ARCHIVED_ACCESS_STAFF_ADMIN
module-attribute
¶
SEND_READY_FOR_REVIEW
module-attribute
¶
STAFF_UPLOAD_CONTRACT
module-attribute
¶
SLACK_DESTINATION_ROOM
module-attribute
¶
SLACK_DESTINATION_ROOM_COMMENTS
module-attribute
¶
SLACK_ENDPOINT_URL
module-attribute
¶
ACTIVITY_DIGEST_RECIPIENT_EMAILS
module-attribute
¶
HIDE_IDENTITY_FROM_REVIEWERS
module-attribute
¶
SUBMISSIONS_DRAFT_ACCESS_STAFF
module-attribute
¶
SUBMISSIONS_DRAFT_ACCESS_STAFF_ADMIN
module-attribute
¶
SUBMISSIONS_EXPORT_ACCESS_STAFF
module-attribute
¶
SUBMISSIONS_EXPORT_ACCESS_STAFF_ADMIN
module-attribute
¶
SUBMISSIONS_TABLE_EXCLUDED_FIELDS
module-attribute
¶
SUBMISSIONS_TABLE_EXCLUDED_FIELDS = list('SUBMISSIONS_TABLE_EXCLUDED_FIELDS', ['organization_name'])
TRANSITION_AFTER_ASSIGNED
module-attribute
¶
TRANSITION_AFTER_REVIEWS
module-attribute
¶
REVIEW_VISIBILITY_DEFAULT
module-attribute
¶
SUBMISSION_PREVIEW_REQUIRED
module-attribute
¶
DATABASES
module-attribute
¶
DATABASES = {'default': config(default=f'postgres:///{APP_NAME}', conn_max_age=600, conn_health_checks=True)}
APPLICATION_TRANSLATIONS_ENABLED
module-attribute
¶
PASSWORD_RESET_TIMEOUT
module-attribute
¶
PASSWORDLESS_LOGIN_TIMEOUT
module-attribute
¶
FORCE_LOGIN_FOR_APPLICATION
module-attribute
¶
PASSWORDLESS_SIGNUP_TIMEOUT
module-attribute
¶
TEMPLATES
module-attribute
¶
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [join(PROJECT_DIR, 'templates_custom'), join(PROJECT_DIR, 'templates'), join(PROJECT_DIR, 'apply', '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', 'wagtail.contrib.settings.context_processors.settings', 'social_django.context_processors.backends', 'social_django.context_processors.login_redirect', 'hypha.apply.projects.context_processors.projects_enabled', 'hypha.cookieconsent.context_processors.cookies_accepted', 'hypha.core.context_processors.global_vars'], 'builtins': ['django_web_components.templatetags.components']}}]
CACHE_CONTROL_S_MAXAGE
module-attribute
¶
CACHES
module-attribute
¶
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.db.DatabaseCache', 'LOCATION': 'database_cache'}}
STATICFILES_STORAGE
module-attribute
¶
STATICFILES_DIRS
module-attribute
¶
STATICFILES_DIRS = [join(PROJECT_DIR, 'static_compiled'), join(PROJECT_DIR, '../public')]
WAGTAILIMAGES_FEATURE_DETECTION_ENABLED
module-attribute
¶
WAGTAIL_USER_EDIT_FORM
module-attribute
¶
WAGTAIL_USER_CREATION_FORM
module-attribute
¶
WAGTAILADMIN_RICH_TEXT_EDITORS
module-attribute
¶
WAGTAILADMIN_RICH_TEXT_EDITORS = {'default': {'WIDGET': 'wagtail.admin.rich_text.DraftailRichTextArea', 'OPTIONS': {'features': ['bold', 'italic', 'h1', 'h2', 'h3', 'h4', 'h5', 'ol', 'ul', 'link']}}}
WAGTAILSEARCH_BACKENDS
module-attribute
¶
WAGTAILFRONTENDCACHE
module-attribute
¶
WAGTAILFRONTENDCACHE = {'cloudflare': {'BACKEND': 'wagtail.contrib.frontend_cache.backends.CloudflareBackend', 'BEARER_TOKEN': str('CLOUDFLARE_BEARER_TOKEN'), 'ZONEID': str('CLOUDFLARE_API_ZONEID')}}
SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS
module-attribute
¶
SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS = list('SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS', STAFF_EMAIL_DOMAINS)
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY
module-attribute
¶
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET
module-attribute
¶
SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL
module-attribute
¶
SOCIAL_AUTH_PIPELINE
module-attribute
¶
SOCIAL_AUTH_PIPELINE = ('social_core.pipeline.social_auth.social_details', 'social_core.pipeline.social_auth.social_uid', 'social_core.pipeline.social_auth.auth_allowed', 'social_core.pipeline.social_auth.social_user', 'social_core.pipeline.social_auth.associate_by_email', 'social_core.pipeline.user.create_user', 'social_core.pipeline.social_auth.associate_user', 'social_core.pipeline.social_auth.load_extra_data', 'social_core.pipeline.user.user_details')
NH3_ALLOWED_TAGS
module-attribute
¶
NH3_ALLOWED_TAGS = ['a', 'b', 'big', 'blockquote', 'br', 'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'ins', 'li', 'ol', 'p', 'pre', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'th', 'thead', 'tr', 'ul']
NH3_ALLOWED_ATTRIBUTES
module-attribute
¶
NH3_ALLOWED_ATTRIBUTES = {'*': ['class', 'colspan', 'href', 'rowspan', 'target', 'title', 'width', 'data-tippy-content']}
HIJACK_DECORATOR
module-attribute
¶
HIJACK_PERMISSION_CHECK
module-attribute
¶
DEFAULT_FILE_STORAGE
module-attribute
¶
PRIVATE_FILE_STORAGE
module-attribute
¶
AWS_PUBLIC_BUCKET_NAME
module-attribute
¶
AWS_PUBLIC_BUCKET_NAME = str('AWS_PUBLIC_BUCKET_NAME', AWS_STORAGE_BUCKET_NAME)
AWS_PRIVATE_BUCKET_NAME
module-attribute
¶
AWS_PRIVATE_BUCKET_NAME = str('AWS_PRIVATE_BUCKET_NAME', AWS_STORAGE_BUCKET_NAME)
AWS_PRIVATE_CUSTOM_DOMAIN
module-attribute
¶
AWS_QUERYSTRING_EXPIRE
module-attribute
¶
AWS_PUBLIC_CUSTOM_DOMAIN
module-attribute
¶
AWS_MIGRATION_BUCKET_NAME
module-attribute
¶
AWS_MIGRATION_ACCESS_KEY_ID
module-attribute
¶
AWS_MIGRATION_SECRET_ACCESS_KEY
module-attribute
¶
APPLY_NAV_SUBMISSIONS_ITEMS
module-attribute
¶
APPLY_NAV_PROJECTS_ITEMS
module-attribute
¶
BASIC_AUTH_WHITELISTED_HTTP_HOSTS
module-attribute
¶
BASIC_AUTH_WHITELISTED_IP_NETWORKS
module-attribute
¶
SESSION_COOKIE_AGE_LONG
module-attribute
¶
WAGTAILADMIN_BASE_URL
module-attribute
¶
WAGTAILADMIN_BASE_URL = str('WAGTAILADMIN_BASE_URL', None) or f'https://{PRIMARY_HOST}' if PRIMARY_HOST else None
SECURE_PROXY_SSL_HEADER
module-attribute
¶
SECURE_BROWSER_XSS_FILTER
module-attribute
¶
SECURE_CONTENT_TYPE_NOSNIFF
module-attribute
¶
REST_FRAMEWORK
module-attribute
¶
REST_FRAMEWORK = {'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'PAGE_SIZE': 10, 'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.SessionAuthentication'), 'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated')}