-
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
I got an error pasting the example OpenApiAuthenticationExtension
into my settings file, it complained about circular imports.
#307
Comments
@revmischa i moved this here as it is a different issue. can you give a bit more details? which example pasted where? |
Ah sorry, I pasted the example class MyAuthenticationScheme(OpenApiAuthenticationExtension):
target_class = 'my_app.MyAuthentication' # full import path OR class ref
name = 'MyAuthentication' # name used in the schema
def get_security_definition(self, auto_schema):
return {
'type': 'apiKey',
'in': 'header',
'name': 'api_key',
} Into my |
ok so i'm pretty sure that importing into loading that class likely triggers retrieval of settings, while those are not loaded yet as you are still parsing settings.py. personally, i just put all that stuff in |
improved the documentation. hope this works now for you. i'll close but feel free to circle back |
I got an error pasting the example
OpenApiAuthenticationExtension
into my settings file, it complained about circular imports.Originally posted by @revmischa in #264 (comment)
The text was updated successfully, but these errors were encountered: