Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use static templatetag for drf-spectacular-sidecar files #1701

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

glennmatthews
Copy link
Contributor

Closes: #N/A

What's Changed

Work around for tfranzel/drf-spectacular#718. Since we already have a custom page template for the Swagger UI view, and we know that in Nautobot's case we always are using drf-spectacular-sidecar, we can directly use the static templatetag, bypassing drf-spectacular's currently more-flexible (since it can use CDNs as well as drf-spectacular-sidecar) but less-robust (because it doesn't handle STATICFILES_STORAGE yet) calculation of the paths to the relevant static files.

Copy link
Member

@bryanculver bryanculver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed final image still works as expected.

@bryanculver bryanculver merged commit 11f7bf0 into develop Apr 27, 2022
bryanculver added a commit that referenced this pull request Apr 27, 2022
@glennmatthews glennmatthews deleted the gfm-spectacular-static branch July 29, 2022 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants