vishwajeet singh
2009-09-16 17:51:54 UTC
Hi,
Below is the content of __init__.py
import sys
from django.core.signals import got_request_exception
from . import log
logger = log._get_logger()
def got_request_exception_callback(sender, **kwargs):
"""Logging all unhandled exceptions."""
type, exception, traceback = sys.exc_info()
logger.error(unicode(exception))
got_request_exception.connect(got_request_exception_callback)
My question here is that what does *from . import log* doing I can see a
module name log in the same folder.
This import statement is throwing an error ImportError: cannot import name
log.
Thanks for all your help
Below is the content of __init__.py
import sys
from django.core.signals import got_request_exception
from . import log
logger = log._get_logger()
def got_request_exception_callback(sender, **kwargs):
"""Logging all unhandled exceptions."""
type, exception, traceback = sys.exc_info()
logger.error(unicode(exception))
got_request_exception.connect(got_request_exception_callback)
My question here is that what does *from . import log* doing I can see a
module name log in the same folder.
This import statement is throwing an error ImportError: cannot import name
log.
Thanks for all your help
--
Cheers,
Vishwajeet
http://www.singhvishwajeet.com
Cheers,
Vishwajeet
http://www.singhvishwajeet.com