Opened 12 years ago

Closed 9 years ago

#20203 closed Bug (fixed)

Impossible to have a descriptor named `objects` on an abstract model

Reported by: Alex Gaynor Owned by: Andriy Sokolovskiy
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: me@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This is because of https://github.com/django/django/blob/master/django/db/models/manager.py#L17 , in general the ORM supports having a different name for the default manager, but this blows up with abstract models, which is sad.

Change History (8)

comment:1 by Karol Sikora, 12 years ago

Owner: changed from nobody to Karol Sikora
Status: newassigned

comment:2 by Karol Sikora, 12 years ago

Owner: Karol Sikora removed
Status: assignednew

comment:3 by Andriy Sokolovskiy, 9 years ago

Cc: me@… added
Owner: set to Andriy Sokolovskiy
Status: newassigned
Version: 1.5master

I'm working on this issue

comment:5 by Tim Graham, 9 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Tim Graham <timograham@…>, 9 years ago

In c0cf73a:

Refs #20203 -- Allowed adding custom default manager to the model state

If the only manager on the model is the default manager defined
by Django (objects = models.Manager()), this manager will not
be added to the model state. If it is custom, it needs to be
passed to the model state.

comment:7 by Tim Graham <timograham@…>, 9 years ago

In c31bf8c:

Refs #20203 -- Added tests to check inherited custom default manager

comment:8 by Tim Graham, 9 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top