Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8256 closed (duplicate)

Changeset [8282] broke settings.py

Reported by: chrj Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When doing manage.py runserver it seems the settings in settings.py is ignored. I traced the error to the a change in [8282]. When doing __import__("projectname.settings") it is actually the projectname(/__init__.py) that gets imported. From help(__import__):

    When importing a module from a package, note that __import__('A.B', ...)
    returns package A when fromlist is empty, but its submodule B when
    fromlist is not empty.

I came up with a solution in the diff attached, which works for me.

Regards,

Christian

Attachments (1)

project_directory.diff (714 bytes) - added by chrj 6 years ago.
diff agains r8320

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by chrj

diff agains r8320

comment:1 Changed 6 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #8246.

comment:2 Changed 3 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.