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


Ignore:
Timestamp:
Jun 24, 2013, 4:24:06 PM (11 years ago)
Author:
loic84

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20625, comment 11

    initial v1  
    11@charettes' proposal is pretty much identical to mine (as opposed to the 2 patterns described in comment:5), except for the factory which if I understand correctly wouldn't be needed anymore if this made it into core.
    22
    3 I picked an opt-in strategie with `QuerySet.method.manager=True` but we could just as well pick the following opt-out strategie:
     3I picked an opt-in strategy with `QuerySet.method.manager=True` but we could just as well pick the following opt-out strategy:
    44
    55- Accept by default if `QuerySet.method.manager` is not present and the method name doesn't start with an underscore (thus protecting private and  magic methods)
    66- `QuerySet.method.manager=False` for public methods that don't make sense at the `Manager` level (i.e. `QuerySet.delete()`)
    77- `QuerySet.method.manager=True` to opt in for private methods.
     8
     9Edit: Implementation of the opt-out strategy https://github.com/loic/django/compare/ticket20625_optout.
Back to Top