﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14720	Settings imported twice as separate modules when manage.py is used	Piotr Czachur	Brett Haydon	"Some people may be surprised that settings are loaded twice under different names in sys.modules:
 - import 1) as 'settings' (manage.py, imported in same-dir fashion)
 - import 2) as ""projectname.settings"" (import_module() triggered when LazySettings is accessed first time; '''projectname/!__init!__.py is loaded''')

Simple solution is to replace
{{{
    import settings # Assumed to be in the same directory.
}}}
with
{{{
    # Project module is known during manage.py creation, because it's django-admin startproject parameter.
    from project_module import settings
}}}
'''This change affects package/module loading order:
projecname/!__init!__.py will be executed during importing of settings inside manage.py.'''

"	Cleanup/optimization	closed	Core (Other)	dev	Normal	fixed			Someday/Maybe	0	0	0	0	0	0
