python: force non-relative import?
Question: I wanted to make a module called `utils/django.py` in my project. On the top I
have the line:

    
    
    from django.db import models
    

However, it tries to import from itself, and that causes an error. I know I
can force a relative import with a prepended `.`:

    
    
    from .django.db import models
    

is there any way to force a non-relative import?


Answer: No. You need to explicitly enable [absolute
imports](http://www.python.org/dev/peps/pep-0328/).

    
    
    from __future__ import absolute_import
    

