Am 01.07.20 um 20:28 schrieb charettes:
Do you think that allowing a readonly boolean flag[0] to be specified
in OPTIONS per connection like we do for isolation level[1] could work
for your use case? From my experience this particular problem is
usually dealt with by using database routers to direct read queries to
a connection pointing at read-only replica so it wouldn't be much
different from the usual setup there.
Hi,
may I blend in here, I'd support the "per database connection" way too.
I've got a use case where I tap a Database I have access to with a user
that CAN write, but I want to make ABSOLUTELY sure that Django doesn't
change that database.
All ORM classes that are writeable are in another connection, but, you
know, there could be bugs. And If I mess up that "3rd party" DB, it's
NotGood(TM).
Oh yes, and I can't create a r/o user for that database.
So It would be really cool if I could tell Django in a DATABASES option
that this connection should never be written to.
Christian
--
You received this message because you are subscribed to the Google Groups "Django
developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/17ca0531-8391-7ed1-6864-44225ec3a909%40nerdocs.at.