#23931: db_manager() method doesn't increment creation_counter
-------------------------------------+-------------------------------------
Reporter: rhettg | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.7
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by MarkusH):
I looked through the documentation and none of the examples show this as a
feature. I'd rather inherit from Manager and pass a `db` attribute along:
{{{#!python
class ROManager(models.Manager):
def __init__(self, db):
super(ROManager, self).__init__(self)
self._db = db
class MyModel(models.Model):
objects = models.Manager()
ro_objects = ROManager('ro')
}}}
Given that, maybe the `BaseManager` implementation could accept `db` and
`hints` directly.
--
Ticket URL: <https://code.djangoproject.com/ticket/23931#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.3ab78f5e2bff5adb37a423ab0c0194b4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.