title: Cannot register custom logging handler class with Django dictConfig
body: <p>My goal is to create a "log" app, apart from my main app, that will be used for several custom handler classes, filters, etc, and other error and stat reporting. But when running the dev server for my Django project, I receive the error:</p>
  
  <pre><code>  File "/Library/Python/2.7/site-packages/Django-1.3-py2.7.egg/django/conf/__init__.py", line 42, in _setup
      self._wrapped = Settings(settings_module)
    File "/Library/Python/2.7/site-packages/Django-1.3-py2.7.egg/django/conf/__init__.py", line 139, in __init__
      logging_config_func(self.LOGGING)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/config.py", line 776, in dictConfig
      dictConfigClass(config).configure()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/config.py", line 575, in configure
      '%r: %s' % (name, e))
  ValueError: Unable to configure handler 'db_handler': Unable to configure handler 'db_handler': 'module' object has no attribute 'models'
  </code></pre>
  
  <p>My LOGGING directive in settings looks like:</p>
  
  <pre><code>LOGGING = {
      'version': 1,
      'disable_existing_loggers': False,
      'formatters': {
          'default': {
              'format': '[%(asctime)s] %(levelname)s::(%(process)d %(thread)d)::%(module)s - %(message)s'
          },
      },
      'handlers': {
          'db_handler': {
              'level': 'DEBUG',
              'class': 'Project.log.handlers.db_handler'
          },
          'file_handler': {
              'level': 'DEBUG',
              'formatter':'default',
              'class': 'logging.TimedRotatingFileHandler',
              'filename':'Custom_log',
              'when':'midnight',
              'interval':1
          },
      },
      'loggers': {
          'django.request': {
              'handlers': ['db_handler'],
              'level': 'DEBUG',
              'propagate': True,
          },
      }
  }
  </code></pre>
  
  <p>The layout of my "log" app is pretty simple, and currently:</p>
  
  <pre><code>log/
      __init__.py
      handlers.py
      models.py
  </code></pre>
  
  <p><em>models.py</em> contains a single model, <em>LogHandler</em>:</p>
  
  <pre><code>from django.db import models
  
  class LogRecord(models.Model):
      .... 
      ....
  </code></pre>
  
  <p>and <em>handlers.py</em> contains a single handler:</p>
  
  <pre><code>import logging
  
  from models import LogRecord
  
  class db_handler(logging.Handler):   
      def emit(self, record):
          ....
          ....
  </code></pre>
  
  <p>The error, as far as I can tell, is referring to the <em>from models import LogRecord</em> line. I have tried using project.log.models, and log.models, but both yield the same results. I have also tried moving the handler into models.py and not importing anything, but I get a similar error saying that "module" has no attribute "models".</p>
  
  <p>My log app is in my installed apps, and contains an <strong>__<em>init</em>__</strong>.py.</p>