Changes between Initial Version and Version 1 of Ticket #28107, comment 12
- Timestamp:
- Apr 29, 2017, 6:59:10 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28107, comment 12
initial v1 13 13 }}} 14 14 15 Once this is done you just have to point the `BACKEND` key of your `DATABASES` setting to `chosen_module`. I suggest you have a look at how [https://github.com/carljm/django-transaction-hooks django-transaction-hooks] did it if you need a more concrete example. 16 15 17 Note that this disable the optimization all together. If you want to keep the optimization for managed models you'll have to define your own `SQLCompiler` subclass and override the `collapse_group_by` method which is a bit harder. I suggest you have a look [https://github.com/django/django/blob/e7afef13f594eb667f2709c0ef7bca98452ab32b/django/db/backends/mysql/operations.py#L10 how it's done for the MySQL backend] to figure it out. 16 17 I suggest you have a look at how [https://github.com/carljm/django-transaction-hooks django-transaction-hooks] did it if you need a more concrete example.