Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#24000 closed Bug (fixed)

create_default_site 'db' kwarg should be 'using'

Reported by: tkhyn Owned by: Tim Graham
Component: contrib.sites Version: 1.7
Severity: Release blocker Keywords: sites multidb
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by tkhyn)

Almost a non-bug as it only prevents the creation of the 'example.com' entry in the django_site table when this table does not lie in the default database (in case of a multi-db setup).

As the post_migrate signal uses the keyword using, it is indeed not picked up by create_default_site which uses db.

Trivial patch attached.

Attachments (1)

create_default_site_patch.patch (2.5 KB ) - added by tkhyn 10 years ago.

Download all attachments as: .zip

Change History (8)

by tkhyn, 10 years ago

comment:1 by tkhyn, 10 years ago

Description: modified (diff)

comment:2 by Tim Graham, 10 years ago

Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

I think we need a backwards compatibility shim to check db as well since that's used by the post_syncdb signal. Could you also add a regression test?

comment:3 by Tim Graham, 10 years ago

Severity: NormalRelease blocker

comment:4 by Tim Graham, 10 years ago

Owner: changed from nobody to Tim Graham
Status: newassigned
Version: master1.7

comment:5 by Tim Graham, 10 years ago

Needs tests: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Actually, it doesn't seem that a backwards compatibility shim is required.

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

Resolution: fixed
Status: assignedclosed

In 89e2c60f4396241c667b7a1de37765b7c96d702f:

Fixed #24000 -- Corrected contrib.sites default site creation in a multiple database setup.

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

In a79012f6d88a8cd67bd35c54b91d826f2b7a4cb2:

[1.7.x] Fixed #24000 -- Corrected contrib.sites default site creation in a multiple database setup.

Backport of 89e2c60f4396241c667b7a1de37765b7c96d702f from master

Note: See TracTickets for help on using tickets.
Back to Top