-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Spectacular ignores settings #768
Comments
Hi, that sounds really suspicious. Are you 100% certain those two commands run under the exact same shell/environment? This has come up a couple of times and every time it was some misconfigured This works for a lot of people so i'm quite confident it is something in your setup. If you can provide a reproduction I can certainly take a deeper look. |
@tfranzel thanks for the reply. I am almost not believing its not my setups fault, but I spent so many hours trying everything to see if I can get it to work - but no cigar. I am confident its the same shell. I am sure the settings.py is loaded, when I remove I have no minimal way to reproduce it at hand, because I am not sure which part of my setup actually causes the problems and I fail to see how I can get more debug information. But luckily the whole setup is public, so I can link it. Here is my settings.py: https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/develop/api/config/settings/local.py An example run in CI is also available: https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/109712 I know this is a lot of information and I can try to answer more questions. I'd just really appreciate your help since I am lost and my next idea would be to dig in the code, where you are likely way more familiar with. So thank you for any hint in advance :) |
So I gave it a look and I believe it is a problem with the import order. You import related issue #307. We fixed the circular import issues back then, but apparently that does not mean it will work correctly. Putting arbitrary imports in the Let me know if that was the issue. |
@tfranzel Cool, this works perfectly. Thank you for checking it and sorry for not noticing this FAQ before. |
Describe the bug
I set some parameters in my settings.py
SPECTACULAR_SETTINGS
but it wont get picked upTo Reproduce
I placed the example from the docs in my settings.py:
I confirmed its part of the settings using
python manage.py shell
and printedsettings.SPECTACULAR_SETTINGS
and the settings are there. But runningpython manage.py spectacular
I get an openapi definition without title, description or version.Expected behavior
The generated specification contains all above specified parameters.
The text was updated successfully, but these errors were encountered: