-
Notifications
You must be signed in to change notification settings - Fork 35
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
How do i pass file to load the settings using LazySettings. #140
Comments
It sounds like a python path problem. You could share a simple example to help to found a solution? Meanwhile (if it's not a problem) you can use another strategy to read settings (yaml, json, toml, etc). |
@drgarcia1986 Thanks for your quick reply. |
hi @BHAUTIK04 any news? |
Hi @drgarcia1986 , Sorry I did not get time to get back regarding the issue. Here I have created an example structure and attached.
|
This was pythonpath problem, to run the project from sample_settings.zip I had to do this:
Take a look what is the path to settings:
Now forget about simple-settings for the moment and run this:
And then type:
There is no way to import settings/one.py from p3, this is how python works. That being said you can do this:
With big caveat, that PYTHONPATH points to the root of the project and not inidvidual sub-projects (i.e. folder that contains p1, p2 and p3 and not p1, p2, p3 itself). |
I am using simple-settings module for my app. In one scenario, app has 2 different module and both has settings file with same naming convention(settings/dev.py). In this case when i load module by LazzySettings(settings.dev) at two different places, where it loads same first module. Is there any way we can pass file name with absolute path to load the settings.
The text was updated successfully, but these errors were encountered: