I was able to work around this behaviour by overriding the constructor and
setting the features property explicitly:
https://github.com/citusdata/django-multitenant/pull/150/files#diff-
0d077af5d4e86f31f478785458ea6a03768a15aea077f49b9a79ffca8b0fe4beR37
This isn't very intuitive as other database backends will respect setting
the `_class` properties to instantiate classes.
--
Ticket URL: <https://code.djangoproject.com/ticket/34344>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by davidjayb):
Here is a patch to fix the issue:
https://github.com/django/django/pull/16563
--
Ticket URL: <https://code.djangoproject.com/ticket/34344#comment:1>
* status: new => closed
* resolution: => needsinfo
Comment:
Thanks for this ticket, however using `features_class`, `ops_class`, and
`introspection_class` will cause initializing PostGIS stuff for non-db
connections (see 7e714827ead50f77aa82394cc2511ff96ab67fa4 and #16969) as
they will be initialized in `PsycopgDatabaseWrapper.__init__()` and
`NO_DB_ALIAS`-branch doesn't change anything anymore. Is there a way to
use `features_class`, `ops_class`, and `introspection_class` in a backward
compatible way?
--
Ticket URL: <https://code.djangoproject.com/ticket/34344#comment:2>
Comment (by David Buhler):
Hello Mariusz, I've updated the PR to be backwards compatible. In the
`init` method I've reset the `*_class` properties to the original
postgresql versions and moved the call to `super().__init__(*args,
**kwargs)` to below the conditional check for `NO_DB_ALIAS`.
--
Ticket URL: <https://code.djangoproject.com/ticket/34344#comment:3>
* status: closed => new
* resolution: needsinfo =>
--
Ticket URL: <https://code.djangoproject.com/ticket/34344#comment:4>
* owner: nobody => David Buhler
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/34344#comment:5>
* has_patch: 1 => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/34344#comment:6>
* has_patch: 0 => 1
* stage: Accepted => Ready for checkin
Comment:
[https://github.com/django/django/pull/16580 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/34344#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"a91e59e4a0fa9cbc6c662feaad6ac17b0f07ce9a" a91e59e]:
{{{
#!CommitTicketReference repository=""
revision="a91e59e4a0fa9cbc6c662feaad6ac17b0f07ce9a"
Fixed #34344 -- Allowed PostGIS DatabaseWrapper subclasses to customize
(features/introspection/ops)_class classes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34344#comment:8>