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

Provide a way to enable readonly mode through admin interface #1

Open
domenkozar opened this issue Sep 4, 2011 · 4 comments
Open
Labels

Comments

@domenkozar
Copy link

Goal is to avoid restarting server instance

@streeter
Copy link
Owner

streeter commented Sep 4, 2011

Yeah, I've wanted this too. The thing that is tricky about it is you don't want to write to the database to turn if off. So you need another way to persistently store the setting. Memcache could be an option, but it isn't the best option.

@domenkozar
Copy link
Author

Maybe just check if specific file exists?

On Mon, Sep 5, 2011 at 12:28 AM, streeter <
reply@reply.github.com>wrote:

Yeah, I've wanted this too. The thing that is tricky about it is you don't
want to write to the database to turn if off. So you need another way to
persistently store the setting. Memcache could be an option, but it isn't
the best option.

Reply to this email directly or view it on GitHub:

#1 (comment)

@pdr
Copy link

pdr commented Mar 1, 2012

You can use django-constance for dynamic settings. I realize this might only be a good option for those who already have redis running.

@jayvdb
Copy link

jayvdb commented Sep 17, 2020

#22 starts the process, allowing turning it on and off programatically, and there is a note there for how we might be able to have it per-connection instead of all connections.

If we can make it per-connection, the default connection could be turned off, and another connection used only for this app using per-app routing. c.f. https://github.com/just-work/django-database-routing and many other db routers that support that.

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

No branches or pull requests

4 participants