Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8246 closed (fixed)

Subpackage Settings Fix

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

Description

r8282 introduces a regression by adding a line like so:

setup_environ(__import__(settings.SETTINGS_MODULE)) 

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 16 years ago.
A patch to fix this issue.

Download all attachments as: .zip

Change History (5)

by Adam Gomaa, 16 years ago

A patch to fix this issue.

comment:1 by Brian Rosner, 16 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Brian Rosner, 16 years ago

milestone: 1.0

comment:3 by Russell Keith-Magee, 16 years ago

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 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

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