Skip to content

Django

hypha.settings.django

Django settings for hypha project.

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.')}}]

TIME_ZONE module-attribute

TIME_ZONE = 'UTC'

USE_I18N module-attribute

USE_I18N = True

USE_L10N module-attribute

USE_L10N = False

USE_TZ module-attribute

USE_TZ = True

DATE_FORMAT module-attribute

DATE_FORMAT = 'N j, Y'

DATETIME_FORMAT module-attribute

DATETIME_FORMAT = 'N j, Y, H:i'

SHORT_DATE_FORMAT module-attribute

SHORT_DATE_FORMAT = 'Y-m-d'

SHORT_DATETIME_FORMAT module-attribute

SHORT_DATETIME_FORMAT = 'Y-m-d H:i'

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']

AUTH_USER_MODEL module-attribute

AUTH_USER_MODEL = 'users.User'

LOGIN_URL module-attribute

LOGIN_URL = 'users:passwordless_login_signup'

LOGIN_REDIRECT_URL module-attribute

LOGIN_REDIRECT_URL = 'dashboard:dashboard'

ELEVATE_URL module-attribute

ELEVATE_URL = 'users:elevate'

ELEVATE_REDIRECT_URL module-attribute

ELEVATE_REDIRECT_URL = LOGIN_REDIRECT_URL

CUSTOM_AUTH_BACKEND module-attribute

CUSTOM_AUTH_BACKEND = 'hypha.apply.users.backends.CustomModelBackend'

AUTHENTICATION_BACKENDS module-attribute

AUTHENTICATION_BACKENDS = ('social_core.backends.google.GoogleOAuth2', CUSTOM_AUTH_BACKEND)

ROLEPERMISSIONS_MODULE module-attribute

ROLEPERMISSIONS_MODULE = 'hypha.apply.users.roles'

DEFAULT_AUTO_FIELD module-attribute

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

ROOT_URLCONF module-attribute

ROOT_URLCONF = 'hypha.urls'

FORM_RENDERER module-attribute

FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'

WSGI_APPLICATION module-attribute

WSGI_APPLICATION = 'hypha.wsgi.application'