Skip to content

Settings not loading if you import from an app in settings.py #8854

Discussion options

You must be logged in to vote

After digging deep, I found the issue. Turns out it was some sort of "circular import", as in that loading the imported function loaded some DRF stuff "hidden" away in an __init__.py file without reaching DRF settings yet.

To clarify: this was an issue in my end where I was importing things from the DRF module BEFORE the REST_FRAMEWORK setting being declared/exectuted.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PedroPerpetua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant