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

Changing settings with django @override_settings decorator doesn't work #67

Open
M1ha-Shvn opened this issue Apr 25, 2017 · 1 comment

Comments

@M1ha-Shvn
Copy link

M1ha-Shvn commented Apr 25, 2017

To be concrete, I've tried to change production database with test one in UnitTests by changing the value of ELASTICSEARCH_DEFAULT_INDEX variable. The problem is, that EsIndexable.Elasticsearch.index is substituted from settings only once on class creation, and any changes in django.settings doesn't affect it. The solution is writing dynamic property.
I'm not sure, but this problem may also occure with other SETTING's variables.

@lauxley
Copy link
Contributor

lauxley commented Apr 26, 2017

Hello, this is indeed a very valid problem, thank you for reporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants