settings.py gets imported twice. This is bad, if you want to
set up the logging module, since you register the handler twice
and you get all log messages twice.

Here are the stacktraces I created for debugging this:

===> python manage.py test admin
import logconfig
Traceback (most recent call last):
  File "manage.py", line 12, in ?
    import settings # Assumed to be in the same directory.

Traceback (most recent call last):
  File "manage.py", line 19, in ?
  File "/localhome/user/myproject/django/core/management/__init__.py", line 
277, in execute_manager
  File "/localhome/user/myproject/django/core/management/__init__.py", line 
225, in execute
  File "/localhome/user/myproject/django/core/management/__init__.py", line 
177, in fetch_command
  File "/localhome/user/myproject/django/core/management/__init__.py", line 86, 
in get_commands
    for app_name in settings.INSTALLED_APPS:
  File "/localhome/user/myproject/django/conf/__init__.py", line 28, in 
  File "/localhome/user/myproject/django/conf/__init__.py", line 57, in 
    self._target = Settings(settings_module)
  File "/localhome/user/myproject/django/conf/__init__.py", line 83, in __init__
    mod = __import__(self.SETTINGS_MODULE, {}, {}, [''])
  File "/localhome/user/myproject/settings.py", line 147, in ?

This shnippet has a workaround:
(I have not tested it yet)

I think it would be better to avoid a second import.

Any hints?


Thomas Güttler, http://www.tbz-pariv.de/ 
Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917
TBZ-PARIV GmbH  Geschäftsführer: Dr. Reiner Wohlgemuth
Sitz der Gesellschaft: Chemnitz Registergericht: Chemnitz HRB 8543

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to