Import file from another app in Django 1.10
<p>I'm trying to import a file from another app, and I get this error:</p>

<pre><code>Unhandled exception in thread started by &lt;function wrapper at 0x7fe7bc281d70&gt;
Traceback (most recent call last):
  File "/home/carlos/.envs/lafam/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/home/carlos/.envs/lafam/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run
    autoreload.raise_last_exception()
  File "/home/carlos/.envs/lafam/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
  File "/home/carlos/.envs/lafam/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/home/carlos/.envs/lafam/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/carlos/.envs/lafam/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/home/carlos/.envs/lafam/local/lib/python2.7/site-packages/django/apps/config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/carlos/www/lafam/apps/maquina/models.py", line 6, in &lt;module&gt;
    from apps.website.managers import GenericManager
ImportError: No module named website.managers
</code></pre>

<p><strong>INSTALLED APPS in settings.py</strong></p>

<pre><code>SYSTEM_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

PROJECT_APPS = [
    'apps.website',
    'apps.maquina',
]

INSTALLED_APPS = SYSTEM_APPS + PROJECT_APPS
</code></pre>

<p>All my apps are in apps folder. I have an app called "maquina". And this is its <strong>modals.py</strong></p>

<pre><code>from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
from apps.website.managers import GenericManager
from .utils import path_and_rename


class Fabricante(models.Model):
    ...
</code></pre>

<p>I created a file called <strong>managers.py</strong> from another app called <strong>website</strong></p>

<pre><code>from django.db import models

class GenericManager(models.Manager):
    def get_or_none(self, *args, **kwargs):
        try:
            return self.get(*args, **kwargs)
        except self.model.DoesNotExist:
            return None
        except self.model.MultipleObjectsReturned:
            return None
</code></pre>

<p>I notice that the error is this line:</p>

<pre><code>from apps.website.managers import GenericManager
</code></pre>

<p>This is my code structure:</p>

<p><a href="https://i.stack.imgur.com/1NfMI.png" rel="nofollow"><img src="https://i.stack.imgur.com/1NfMI.png" alt="enter image description here"></a></p>

<p>How is the correct way to import a file from another app? Thanks!</p>

<p>in setting try to add this line after BASE_DIR <code>sys.path.insert(0, os.path.join(BASE_DIR, 'apps'))</code> dont forget <code>import os import sys</code></p>

python django django-1.10