﻿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
4884	django.conf.settings doesn't work if setattr is used before getattr	Noam Raphael <spam.noam@…>	Jacob	"Hello,

If you set DJANGO_SETTINGS_MODULE manually, and then do

{{{
from django.conf import settings
settings.DATABASE_NAME = 'hello'
}}}

You get an exception.

It turns out that !LazySettings initializes _target only on getattr, and not on setattr.

The attached two-line patch initializes it also on setattr.

(I really encountered this bug!)

Thanks,
Noam
"		closed	Uncategorized	dev		fixed			Ready for checkin	1	0	0	0	0	0
