On Tue, 2006-07-04 at 19:08 +1000, Malcolm Tredinnick wrote: > I was having a discussion today with a client who are using Django > templates inside their own code, without using the ORM or views. > > It initially started out because they were using the old > > os.environ['DJANGO_SETTINGS_MODULE'] = '__main__' > > hack and had discovered that the timezone was being changed on them > throughout. After I pointed out there is manual configuration now, they > rediscovered a bug that I had forgotten to file or fix (yeah, I suck. I > wasn't near a network when I noticed it): we don't set os.environ['TZ'] > when you use manual settings. This is good for this client, since they > want it left alone, but it's technically a bug, since it means the two > config methods behave differently in an undocumented way. > > Two possibilities: > > (1) We add a 'no_environ' parameter to settings.configure(). It defaults > to True. When False, we do not put anything into the environment when > installing the settings (for now, that just means TIME_ZONE, but it may > be other things in the future, I don't know). > > (2) We leave things exactly as they are now on the grounds that somebody > using the manual configuration, on the balance, probably already has > their environment configured nicely and we shouldn't start playing with > it under the covers. We need to fix the docs in this case.
Anybody have thoughts about this? Thinking about it further, I am more and more inclined to go with option #2: don't mess with the environment when running Django components embedded in another application. But I may be insane (the phrase has certainly been used in my presence before. :-( ). Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers -~----------~----~----~----~------~----~------~--~---
