Comments (2)
Hello, there is no such feature in constance.
How I see different approaches to store project settings:
- Store settings in code or env vars. Env vars are defined on server. Settings are changed by developers or admins.Settings are static.
- Store settings in database (like constance). They can be changed by developers, admin, managers, staff and so on. Settings are dynamic.
So your request is to store some static settings in dynamic approach. Env vars solve this problem. I do not see the reason for this feature.
from django-constance.
For anyone who's interested, I was able to implement this on top of Constance pretty easily by storing role-specific values in a pipe-delimited list in standard Constance value, and then subclassing constance.base.Config
and overriding __getattr__()
to split and return the correct value based on the current role defined in the env.
from django-constance.
Related Issues (20)
- Race-condition caused by when constance registers Django checks HOT 2
- Data loss using DatabaseBackend when db connection unstable. HOT 9
- Setting image_field value with CLI (Question) HOT 8
- collectstatic is broken by latest version HOT 2
- Can't update constance field programatically from the signal handler
- KeyError on constance after changing cache to PyMemcacheCache HOT 3
- Add installation extra for db backend HOT 2
- Doc demo error : from constance.forms import ConstanceForm
- No way to get many values (only getting all values)
- @override_config decorator RuntimeWarning wih async test
- Create 3.0 release HOT 8
- Values are not updated from the admin page HOT 3
- Caching getting multiple values
- data loss upgrading from 2.9.1 to 3.1.0 with database backend HOT 9
- `override_config` decorator doesn't work for pytest classes
- Settings change on page reload HOT 1
- All config variables are shown to user when server raise 500 and DEBUG=True HOT 2
- Ajax Load/Save? HOT 1
- Unmodified value isn't set to new default when default is changed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-constance.