django-db-readonly icon indicating copy to clipboard operation
django-db-readonly copied to clipboard

Add decorators and tests

Open jayvdb opened this issue 3 years ago • 1 comments

jayvdb avatar Sep 17 '20 13:09 jayvdb

https://github.com/dabapps/django-zen-queries/blob/master/zen_queries/decorators.py is a better approach, allowing per-connection, but that requires hooking into create_cursor, which is a bit harder, and diverges from the current approach used for the global readonly code (which was not being tested). So I think it is better to stick to one approach at the moment.

jayvdb avatar Sep 17 '20 13:09 jayvdb