#4884: django.conf.settings doesn't work if setattr is used before getattr
-----------------------------------------------+----------------------------
Reporter:  Noam Raphael <[EMAIL PROTECTED]>  |       Owner:  jacob        
  Status:  new                                 |   Component:  Uncategorized
 Version:  SVN                                 |    Keywords:               
   Stage:  Unreviewed                          |   Has_patch:  0            
-----------------------------------------------+----------------------------
 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

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4884>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to