Changes between Initial Version and Version 1 of Ticket #34165, comment 11


Ignore:
Timestamp:
Dec 20, 2022, 4:04:54 AM (2 years ago)
Author:
David Wobrock

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34165, comment 11

    initial v1  
    1414What would be the most ''Django-y'' way?
    1515- Passing it through the model constructor => this has quite a large impact, as a keyword argument would possibly shadow existing field names: `Permission(..., db=using)`. Quite risky in terms of backward compatibility I guess.
    16 - Adding a method to `Model`? Something like: `Permission(...).using(db)`, which could perhaps then be re-used in other places also.
     16- Adding a method to `Model`? Something like: `Permission(...).using(db)`, which could perhaps then be re-used in other places also. (EDIT: which wouldn't work, as the setting the FK happens before setting the DB alias.)
    1717
    1818What do you think ? :) Or am I missing other solutions?
Back to Top