[Django] #22652: create_superuser in contrib.auth.management expects "objects" manager in 1.7b4

11 views
Skip to first unread message

Django

unread,
May 18, 2014, 11:43:52 PM5/18/14
to django-...@googlegroups.com
#22652: create_superuser in contrib.auth.management expects "objects" manager in
1.7b4
-----------------------------+------------------------
Reporter: alexdlaird | Owner: nobody
Type: Bug | Status: new
Component: Core (URLs) | Version: 1.7-beta-2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------
We installed Django 1.7b4 to test compatibility with my application and
came upon what we believe to be a bug when running our regression tests.

In Django 1.6.5, contrib\auth\management\_init_.py line 116 referes
'created_models' in 'UserModel', but in Django 1.7 this appears to be
modified (same file, line 132) to check if UserModel.objects.exists() not.
However, we have renamed our user manager to simply "users", so this
throws an errors when executed.

--
Ticket URL: <https://code.djangoproject.com/ticket/22652>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 19, 2014, 3:09:03 AM5/19/14
to django-...@googlegroups.com
#22652: create_superuser in contrib.auth.management expects "objects" manager in
1.7b4
---------------------------------+--------------------------------------

Reporter: alexdlaird | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 1.7-beta-2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by claudep):

* severity: Normal => Release blocker
* needs_better_patch: => 0
* component: Core (URLs) => contrib.auth
* needs_tests: => 0
* easy: 0 => 1
* needs_docs: => 0
* stage: Unreviewed => Accepted


Comment:

I guess that simply replacing `objects` by `_default_manager` should solve
this.

--
Ticket URL: <https://code.djangoproject.com/ticket/22652#comment:1>

Django

unread,
May 19, 2014, 8:37:02 AM5/19/14
to django-...@googlegroups.com
#22652: create_superuser in contrib.auth.management expects "objects" manager in
1.7b4
---------------------------------+--------------------------------------
Reporter: alexdlaird | Owner: nobody
Type: Bug | Status: closed
Component: contrib.auth | Version: 1.7-beta-2
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"b68fac7e88c08cd0bb3dde86388292ddc863eba5"]:
{{{
#!CommitTicketReference repository=""
revision="b68fac7e88c08cd0bb3dde86388292ddc863eba5"
Fixed #22652 -- Replaced UserModel.objects with
UserModel._default_manager.

Thanks alexdlaird for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22652#comment:2>

Django

unread,
May 19, 2014, 8:37:37 AM5/19/14
to django-...@googlegroups.com
#22652: create_superuser in contrib.auth.management expects "objects" manager in
1.7b4
---------------------------------+--------------------------------------
Reporter: alexdlaird | Owner: nobody

Type: Bug | Status: closed
Component: contrib.auth | Version: 1.7-beta-2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"1e78d132dad66cae93b94e3c854bcb4fd4b49b6e"]:
{{{
#!CommitTicketReference repository=""
revision="1e78d132dad66cae93b94e3c854bcb4fd4b49b6e"
[1.7.x] Fixed #22652 -- Replaced UserModel.objects with
UserModel._default_manager.

Thanks alexdlaird for the report.

Backport of b68fac7e88 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22652#comment:3>

Reply all
Reply to author
Forward
0 new messages