Skip to content
Snippets Groups Projects
Commit f29f6735 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch '406-error-fetch-library' into 'develop'

Fix 406 error when fetching library

See merge request funkwhale/funkwhale!962
parents 85dafcb6 3a25143c
No related branches found
No related tags found
No related merge requests found
......@@ -213,16 +213,19 @@ if PLUGINS:
else:
logger.info("Running with no plugins")
ADDITIONAL_APPS = env.list("ADDITIONAL_APPS", default=[])
INSTALLED_APPS = (
DJANGO_APPS
+ THIRD_PARTY_APPS
+ LOCAL_APPS
+ tuple(["{}.apps.Plugin".format(p) for p in PLUGINS])
+ tuple(ADDITIONAL_APPS)
)
# MIDDLEWARE CONFIGURATION
# ------------------------------------------------------------------------------
MIDDLEWARE = (
ADDITIONAL_MIDDLEWARES_BEFORE = env.list("ADDITIONAL_MIDDLEWARES_BEFORE", default=[])
MIDDLEWARE = tuple(ADDITIONAL_MIDDLEWARES_BEFORE) + (
"django.middleware.security.SecurityMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"corsheaders.middleware.CorsMiddleware",
......
......@@ -40,3 +40,8 @@ if settings.DEBUG:
urlpatterns = [
path("api/__debug__/", include(debug_toolbar.urls))
] + urlpatterns
if "silk" in settings.INSTALLED_APPS:
urlpatterns = [
url(r"^api/silk/", include("silk.urls", namespace="silk"))
] + urlpatterns
......@@ -164,7 +164,7 @@ class MusicLibraryViewSet(
FederationMixin, mixins.RetrieveModelMixin, viewsets.GenericViewSet
):
authentication_classes = [authentication.SignatureAuthentication]
# renderer_classes = renderers.get_ap_renderers()
renderer_classes = renderers.get_ap_renderers()
serializer_class = serializers.LibrarySerializer
queryset = music_models.Library.objects.all().select_related("actor")
lookup_field = "uuid"
......
......@@ -15,3 +15,4 @@ profiling
asynctest==0.12.2
aioresponses==0.6.0
https://github.com/dmclain/django-debug-toolbar-line-profiler/archive/master.zip
django-silk
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment