Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8246 closed (fixed)

Subpackage Settings Fix

Reported by: Adam Gomaa Owned by: Russell Keith-Magee
Component: Core (Management commands) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


r8282 introduces a regression by adding a line like so:


I don't know why this line is used, but since __import__ returns the first package, even in a dotted expression like settings.development, this line has the net effect of running setup_environ on settings.__init__ instead of settings.development, which has, as you can imagine, negative effects - like breaking runserver (since it can't find any settings), and any management command that spawn a subprocess (which captures the new, incorrect DJANGO_SETTINGS_MODULE environment variable).

The attached patch fixes this.

(I'm guessing on the assignee, forgive me if I'm wrong.)

Attachments (1)

fix_subpackage_settings.patch (1022 bytes) - added by Adam Gomaa 8 years ago.
A patch to fix this issue.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Adam Gomaa

A patch to fix this issue.

comment:1 Changed 8 years ago by Brian Rosner

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Brian Rosner

milestone: 1.0

comment:3 Changed 8 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [8323]) Fixed #8246 -- Corrected the handling of settings files. Thanks to AdamG and chrj for their parallel reports and fixes.

comment:4 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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