Add enum overrides

This commit is contained in:
Ciarán Ainsworth 2022-07-18 00:46:30 +02:00
parent fc3fa79e9f
commit 1a12159c28
1 changed files with 6 additions and 0 deletions

View File

@ -132,6 +132,12 @@ SPECTACULAR_SETTINGS = {
"OAUTH2_AUTHORIZATION_URL": "/authorize",
"OAUTH2_TOKEN_URL": "/api/v1/oauth/token/",
"PREPROCESSING_HOOKS": ["config.schema.custom_preprocessing_hook"],
"ENUM_NAME_OVERRIDES": {
"FederationChoiceEnum": "funkwhale_api.federation.models.TYPE_CHOICES",
"ReportTypeEnum": "funkwhale_api.moderation.models.REPORT_TYPES",
"PrivacyLevelEnum": "funkwhale_api.common.fields.PRIVACY_LEVEL_CHOICES",
"LibraryPrivacyLevelEnum": "funkwhale_api.music.models.LIBRARY_PRIVACY_LEVEL_CHOICES",
},
}
if env.bool("WEAK_PASSWORDS", default=False):