﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22965	InvalidBasesError for unmigrated apps subclassing contrib	Collin Anderson	nobody	"Unmigrated app in a project not swapping out the `User` model:
{{{
from django.contrib.auth.models import User
from django.db import models


class UserProfile(User):
    bio = models.TextField()
}}}
`syncdb` and `migrate` give this error on latest `1.7` and `master`:

{{{
~/usersubclasstest$ rm db.sqlite3; PYTHONPATH=../django1.7 ./manage.py syncdb
Operations to perform:
  Synchronize unmigrated apps: account
  Apply all migrations: admin, contenttypes, auth, sessions
Synchronizing apps without migrations:
  Creating tables...
    Creating table account_userprofile
  Installing custom SQL...
  Installing indexes...
Running migrations:
  Applying contenttypes.0001_initial...Traceback (most recent call last):
  File ""./manage.py"", line 10, in <module>
    execute_from_command_line(sys.argv)
  File ""/home/collin/django1.7/django/core/management/__init__.py"", line 385, in execute_from_command_line
    utility.execute()
  File ""/home/collin/django1.7/django/core/management/__init__.py"", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""/home/collin/django1.7/django/core/management/base.py"", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""/home/collin/django1.7/django/core/management/base.py"", line 337, in execute
    output = self.handle(*args, **options)
  File ""/home/collin/django1.7/django/core/management/base.py"", line 532, in handle
    return self.handle_noargs(**options)
  File ""/home/collin/django1.7/django/core/management/commands/syncdb.py"", line 27, in handle_noargs
    call_command(""migrate"", **options)
  File ""/home/collin/django1.7/django/core/management/__init__.py"", line 115, in call_command
    return klass.execute(*args, **defaults)
  File ""/home/collin/django1.7/django/core/management/base.py"", line 337, in execute
    output = self.handle(*args, **options)
  File ""/home/collin/django1.7/django/core/management/commands/migrate.py"", line 160, in handle
    executor.migrate(targets, plan, fake=options.get(""fake"", False))
  File ""/home/collin/django1.7/django/db/migrations/executor.py"", line 62, in migrate
    self.apply_migration(migration, fake=fake)
  File ""/home/collin/django1.7/django/db/migrations/executor.py"", line 90, in apply_migration
    if self.detect_soft_applied(migration):
  File ""/home/collin/django1.7/django/db/migrations/executor.py"", line 134, in detect_soft_applied
    apps = project_state.render()
  File ""/home/collin/django1.7/django/db/migrations/state.py"", line 71, in render
    raise InvalidBasesError(""Cannot resolve bases for %r"" % new_unrendered_models)
django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<ModelState: 'account.UserProfile'>]

}}}

Initializing the database using `1.6` `syncdb` doesn't help either (unless you use --fake).

I have a [https://github.com/collinanderson/usersubclasstest/commits/master minimal project that reproduces the error on github].

Feel free to remove the release blocker status if what I'm doing isn't supported. If it's not supported, we should have a more helpful error message."	Bug	closed	Migrations	1.7-rc-1	Release blocker	duplicate		cmawebsite@…	Accepted	0	0	0	0	0	0
