Switching settings, in a non-webapp?

2015-05-11 Thread Doug Blank
Django users, We are using Django for two purposes: its ORM for a single-user desktop app, and for a regular Django webapp. For the desktop ORM, is there a way to switch between different settings.py? For example, we'd like to be able to load the default settings, but then later unload everything

Re: Switching settings, in a non-webapp?

2015-05-11 Thread David Sieger
If restarting the whole http service is an option, you could think about a setting up a separate service that is capable of stopping/starting your http service. You could then order this new service from within the http service to restart the http service with a different settings module. (I'm thin

Re: Switching settings, in a non-webapp?

2015-05-11 Thread Doug Blank
On Mon, May 11, 2015 at 4:44 PM, David Sieger wrote: > If restarting the whole http service is an option, you could think about > a setting up a separate service that is capable of stopping/starting your > http service. You could then order this new service from within the http > service to rest

Re: Switching settings, in a non-webapp?

2015-05-11 Thread David Sieger
I think I understand now. Never mind, then. ;-) Am 12.05.2015 um 00:00 schrieb Doug Blank: > On Mon, May 11, 2015 at 4:44 PM, David Sieger > wrote: > > If restarting the whole http service is an option, you could think > about a setting up a separate servic

Re: Switching settings, in a non-webapp?

2015-05-11 Thread Doug Blank
This ended up being just a simple Python3 issue, and the solution below works fine, as far as I can tell so far. I post it here in case anyone finds it useful: I defined a "modules checkpoint" to which I can roll back to: >>> from modules_checkpoint import ModulesCheckpoint >>> checkpoint = Modul