Skip to content

Commit

Permalink
fix sidecar for alternate staticfile storages #718
Browse files Browse the repository at this point in the history
  • Loading branch information
tfranzel committed Jun 3, 2022
1 parent 13ea8e2 commit c43b364
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drf_spectacular/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, Dict

from django.conf import settings
from django.templatetags.static import static
from django.utils import translation
from django.utils.translation import gettext_lazy as _
from rest_framework.renderers import TemplateHTMLRenderer
Expand Down Expand Up @@ -113,7 +114,7 @@ class SpectacularJSONAPIView(SpectacularAPIView):


def _get_sidecar_url(package):
return f'{settings.STATIC_URL}drf_spectacular_sidecar/{package}'
return static(f'drf_spectacular_sidecar/{package}')


class SpectacularSwaggerView(APIView):
Expand Down

0 comments on commit c43b364

Please sign in to comment.