Thanks for the quick reply. I discovered exactly what you said about 2 seconds after pressing the submit on my query.
On Oct 29, 4:50 pm, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Thu, Oct 29, 2009 at 10:37 PM, Johan <djjord...@gmail.com> wrote: > > > Hi. In django\template\__init__.py on line 54 there is a line of > > code : from django.conf import settings. Firstly there is no > > settings.py file in django\conf, ther is however a file called > > global_settings.py. In my context the is issue is fxed by changing the > > line to from django.conf import global_settings as settings. I am > > wanting to use the template engine outside the context of a django > > project so I would not have a settings file anywhere on my path. I am > > assuming that the code works in a project context since the project > > would import settings and this 'broken' import would just fail > > silently ?? Is this a bug? Is my fix going to break anything else? > > What you are reporting is not a bug. You need to look closer at what > is happening with django.conf. django/conf/__init__.py contains a > variable named settings that is the lazy evaluator of the setting > file. THis is the object that is obtained when you call 'from > django.conf import settings" > > Your "fix" will break quite a bit of code - including, potentially, > your own. It would results in the template system only ever using the > global defaults. This wouldn't be a problem, except for the fact that > there are a couple of settings that affect the way that templates are > rendered. > > Django's dependence on DJANGO_SETTINGS_MODULE is an oft-lamented > problem. Suggestions on how to address this constraint are most > welcome. However, it isn't a simple problem to fix. > > Yours, > Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---