Has anyone gotten the new dark mode support to work with drf-spectacular-sidecar? #10716
Unanswered
ian-twilightcoder
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using drf-spectacular-sidecar to get Swagger, which has version 5.31 with dark mode support. However, I can't figure out how to get the dark mode toggle on my API page. I tried using the standalone preset:
But that just made my page not render at all. Do I need to do something on my
SpectacularSwaggerView? I tried adding'SwaggerUIStandalonePreset'to SwaggerUIBundle(...presets...) in drf_spectacular/swagger_ui.js but that didn't make a difference. If I addclass="dark mode"to the<html>tag in drf_spectacular/swagger_ui.html then that works, but then it's just stuck in dark mode without a toggle.Has anyone gotten dark mode to work with drf-spectacular-sidecar? Their docs are really sparse on how to customize their UI.
Beta Was this translation helpful? Give feedback.
All reactions