title: Why can't I import a Django model from another source file?
body: <p>I'm trying to import a model from a Django application and getting an error:</p>
  
  <pre><code>ImportError at /
  cannot import name UserProfile
  Request Method: GET
  Request URL:    http://localhost:8000/
  Django Version: 1.3.1
  Exception Type: ImportError
  Exception Value:    
  cannot import name UserProfile
  Exception Location: /Users/jonathan/pim/functions.py in &lt;module&gt;, line 2
  Python Executable:  /usr/local/bin/python
  Python Version: 2.7.0
  Python Path:    
  ['/Users/jonathan/pim',
   '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg',
   '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg',
   '/usr/local/Cellar/python/2.7/lib/python27.zip',
   '/usr/local/Cellar/python/2.7/lib/python2.7',
   '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin',
   '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac',
   '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
   '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk',
   '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old',
   '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload',
   '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages',
   '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL',
   '/usr/local/lib/python2.7/site-packages',
   '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
  Server time:    Thu, 16 Feb 2012 12:14:07 -0600
  Traceback Switch to copy-and-paste view
  
  /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/handlers/base.py in get_response
                          request.path_info) ...
  ▶ Local vars
  /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/urlresolvers.py in resolve
              for pattern in self.url_patterns: ...
  ▶ Local vars
  /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/urlresolvers.py in _get_url_patterns
          patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) ...
  ▶ Local vars
  /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/urlresolvers.py in _get_urlconf_module
              self._urlconf_module = import_module(self.urlconf_name) ...
  ▶ Local vars
  /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/utils/importlib.py in import_module
      __import__(name) ...
  ▶ Local vars
  /Users/jonathan/pim/../pim/urls.py in &lt;module&gt;
  import pim_calendar.views ...
  ▶ Local vars
  /Users/jonathan/pim/../pim/pim_calendar/views.py in &lt;module&gt;
  import functions ...
   ▶ Local vars
  /Users/jonathan/pim/functions.py in &lt;module&gt;
  from pim_accounts import UserProfile ...
  ▶ Local vars
  </code></pre>
  
  <p>I've had a similar error before, where I've tried to import a model and being told that can't happen. Is there a rule against importing models? Is there an alternate way to achieve the same thing? The project is at <a href="http://JonathansCorner.com/project/pim.tgz" rel="nofollow">http://JonathansCorner.com/project/pim.tgz</a>.</p>