Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8246 closed (fixed)

Subpackage Settings Fix

Reported by: AdamG Owned by: russellm
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 AdamG 6 years ago.
A patch to fix this issue.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by AdamG

A patch to fix this issue.

comment:1 Changed 6 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by brosner

  • milestone set to 1.0

comment:3 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:4 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.