Django: ImportError: cannot import name 'User'
<p>I'm new to django and I'm facing some difficulties in creating a user from the AbstractBaseUser model. Now I'm starting wondering if my user model is not being build in the right way. This is my User model</p>

<pre><code>from django.db import models
from django.contrib.auth.models import AbstractBaseUser

class User(AbstractBaseUser):
    '''
    Custom user class.
    '''
    username = models.CharField('username', max_length=10, unique=True, db_index=True)
    email = models.EmailField('email address', unique=True)
    joined = models.DateTimeField(auto_now_add=True)
    is_active = models.BooleanField(default=True)
    is_admin = models.BooleanField(default=False)
</code></pre>

<p>and user is only referenced in this other model</p>

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

class Tweet(models.Model):
    '''
    Tweet model
    '''
    user = models.ForeignKey(User)
    text = models.CharField(max_length=160)
    created_date = models.DateTimeField(auto_now_add=True)
    country = models.CharField(max_length=30)
    is_active = models.BooleanField(default=True)
</code></pre>

<p>then when I try to migrate my new model into db</p>

<pre><code>Traceback (most recent call last):
  File "manage.py", line 22, in &lt;module&gt;
    execute_from_command_line(sys.argv)
  File "/home/myuser/django-book/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/home/myuser/django-book/lib/python3.5/site-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "/home/myuser/django-book/lib/python3.5/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/myuser/django-book/lib/python3.5/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/home/myuser/django-book/lib/python3.5/site-packages/django/apps/config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "/home/myuser/django-book/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
  File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
  File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
  File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked
  File "&lt;frozen importlib._bootstrap_external&gt;", line 665, in exec_module
  File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed
  File "/home/myuser/django-book/mytweets/tweets/models.py", line 2, in &lt;module&gt;
    from user_profile import User
ImportError: cannot import name 'User'
</code></pre>

<p>I'm using django 1.10.1 on ubuntu 16.04 with python3.5 and mysql as database.</p>