From 42b2a33a47904f891638ec40a2076a2038fa22b4 Mon Sep 17 00:00:00 2001 From: Thomas Uher Date: Tue, 1 Nov 2022 14:01:30 +0100 Subject: [PATCH] remove LAZY_TAXONOMY_SOURCES from settings --- localcosmos_server/settings.py | 2 -- localcosmos_server/taxonomy/lazy.py | 3 ++- localcosmos_server/urls.py | 4 ++-- setup.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/localcosmos_server/settings.py b/localcosmos_server/settings.py index e359ada..d9fb2ad 100644 --- a/localcosmos_server/settings.py +++ b/localcosmos_server/settings.py @@ -10,8 +10,6 @@ FORM_RENDERER = 'django.forms.renderers.TemplatesSetting' -LAZY_TAXONOMY_SOURCES = [] - AUTHENTICATION_BACKENDS = ( 'rules.permissions.ObjectPermissionBackend', 'django.contrib.auth.backends.ModelBackend', diff --git a/localcosmos_server/taxonomy/lazy.py b/localcosmos_server/taxonomy/lazy.py index 3902049..ce80f05 100644 --- a/localcosmos_server/taxonomy/lazy.py +++ b/localcosmos_server/taxonomy/lazy.py @@ -78,7 +78,8 @@ def get_taxon_source(self, instance): #self.taxon_source = 'taxonomy.sources.%s' % instance._meta.app_label if taxon_source not in SUPPORTED_LAZY_TAXONOMY_SOURCES: - raise ValueError('unsupported taxonomic source passed to LazyTaxon: {0}'.format(taxon_source)) + supported_taxonomic_sources = ','.join(SUPPORTED_LAZY_TAXONOMY_SOURCES) + raise ValueError('unsupported taxonomic source passed to LazyTaxon. {0} not in {1}'.format(taxon_source, supported_taxonomic_sources)) return taxon_source diff --git a/localcosmos_server/urls.py b/localcosmos_server/urls.py index 8e1f6af..72acd83 100644 --- a/localcosmos_server/urls.py +++ b/localcosmos_server/urls.py @@ -22,8 +22,8 @@ path('api/', include('localcosmos_server.online_content.api.urls')), path('api/anycluster/', include('localcosmos_server.anycluster_schema_urls')), - path('schema/', SpectacularAPIView.as_view(), name='schema'), - path('docs/', SpectacularSwaggerView.as_view(template_name='swagger-ui.html', url_name='schema'), name='swagger-ui'), + path('api/schema/', SpectacularAPIView.as_view(), name='schema'), + path('api/docs/', SpectacularSwaggerView.as_view(template_name='swagger-ui.html', url_name='schema'), name='swagger-ui'), ] if getattr(settings, 'LOCALCOSMOS_ENABLE_GOOGLE_CLOUD_API', False) == True: diff --git a/setup.py b/setup.py index 20d9ef0..94bbe99 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setup( name='localcosmos_server', - version='0.10.4', + version='0.11.0', description='LocalCosmos Private Server. Run your own server for localcosmos.org apps.', long_description=long_description, long_description_content_type="text/markdown",