Opened 6 years ago

Closed 6 years ago

#29776 closed New feature (needsinfo)

Pulling part of django.conf.settings from the database

Reported by: Sven R. Kunze Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords: settings database
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be great to have a way to specify settings variables (for instance EMAIL_HOST or EMAIL_PORT) e.g. in the admin interface (key-value store or json table).

Change History (4)

comment:1 by Carlton Gibson, 6 years ago

Resolution: wontfix
Status: newclosed

This isn’t something that would be added to core. There are various third-party apps that do things in this area. See Django Packages Live Settings grid for examples.

Additionally, for Email, your example, you could (e.g.) subclass the SMTP backend to take it’s configuration from the DB instead of the settings file.

I hope one of those routes help.

comment:2 by Sven R. Kunze, 6 years ago

Resolution: wontfix
Status: closednew

See ​Django Packages Live Settings grid for examples.

I checked them out and any active one of these break compatibility :-(

from django.conf import settings  # won't work anymore

for Email, your example

I don't see why Email should be special.

This isn’t something that would be added to core.

Which is unfortunate given the plethora of 3rd-party apps, including many old betas. If you change your mind, I can contribute pull requests.

To me it seems like a rather tiny but very core functionality (also enabling dynamic plugin apps etc).

Last edited 6 years ago by Sven R. Kunze (previous) (diff)

comment:3 by Carlton Gibson, 6 years ago

Searching mailing list for “dynamic settings” returns a long list of historical discussions of this sort of suggestion. (Including dynamic app plugins and everything else.)

At this point I think it’s fair to say it’s been considered, and rejected as not feasible or worth the complications.

To push it forward I think it would require a proof-of-concept in the form of a working thrid-party application. That those that have been attempted in the past are abandoned—if that’s true across the board—should tell us something. If you’re able to pick one up and make it work then a post to django-developers discussing whether it could be brought into core would be reasonable.

Version 0, edited 6 years ago by Carlton Gibson (next)

comment:4 by Sven R. Kunze, 6 years ago

Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top