Skip to content
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

App settings interfere #74

Open
nesnoj opened this issue Jul 4, 2019 · 3 comments
Open

App settings interfere #74

nesnoj opened this issue Jul 4, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@nesnoj
Copy link
Member

nesnoj commented Jul 4, 2019

If more than one app use the same settings variables, they conflict (last loaded app rules).

Current problem in FRED: rl-institut/WAM_APP_FRED#49

Reason: The WAM reads the settings.py of each app which mays contain module config stuff like this one. So it's not a per-app config but a global (module) one.

This is a general WAM issue we have to solve!
Ideas, @henhuy ?

@henhuy
Copy link
Contributor

henhuy commented Jul 4, 2019

I will write a WAM-function for adding new packages, which will check for duplicates.
This function should be called in settings.py or app_settings.py (not sure yet).

@nesnoj
Copy link
Member Author

nesnoj commented Jul 4, 2019

Your PR solves the multiple app problem but we still have the settings' var overwrite problem.
@henhuy Do you have a good idea to solve this without workarounds for single apps (e.g. for leaflet as mentioned in rl-institut/WAM_APP_FRED#49) ?

As packages such as django-leaflet expect specific config variables in the settings, we neither can put the app-specific vars e.g. in a dict nor rename them without package forks...

nesnoj added a commit to rl-institut/WAM_APP_stemp_abw that referenced this issue Jul 4, 2019
@nesnoj
Copy link
Member Author

nesnoj commented Jul 4, 2019

I implemented a solution for this specific django-leaflet-related issue in rl-institut/WAM_APP_stemp_abw#66 using a simple settings override. Everything's fine for now.

But this does not not solve the general problem of conflicting settings. Right now this makes the WAM quite fragile and we cannot detect those problems via automated tests, only manually.

Also, there's the same problem with the templates #12.

Sounds like another reason for a WAM circle ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants