Comments (4)
/python2.7/site-packages/constance/admin.py in changelist_view
# First load a mapping between config name and default value
if not self.has_change_permission(request, None):
raise PermissionDenied
default_initial = ((name, default) for name, (default, help_text) in settings.CONFIG.items())
# Then update the mapping with actually values from the backend
initial = dict(default_initial,
> **dict(config._backend.mget(settings.CONFIG.keys())))
form = ConstanceForm(initial=initial)
if request.method == 'POST':
form = ConstanceForm(request.POST)
from django-constance.
It seems that I have the same problem. Django 1.7c2 does not work with actual master of constance. It works when constance is in the INSTALLED_APPS list earlier then django-contrib-admin.
If not, the problem occurs because the new ready() function of the admin app is called earlier than the read() function of constance.
Nevertheless I don't like the solution of @LeaFin very much: The Config class instance seems to be instanciated twice. Can we find a solution that the Config class isn't setup in the ready() function but earlier?
from django-constance.
Hi, could you add into documentation information about added 'constance' and (if you use db backend) 'constance.backends.database' in the INSTALLED_APPS list earlier then django-contrib-admin. I spend some few hours, before figure out this.
from django-constance.
This seems to have been a regression when the app loading was rewritten in Django 1.7. This should work with current master again. See 69221ba for the change.
from django-constance.
Related Issues (20)
- Partitioning settings per role? 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 7
- `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
- Include support for updating multiple fields in management command
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.