﻿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
22371	AttributeError during replaying/loading of migration: 'module' object has no attribute 'RemovedModel'	Daniel Hahler	nobody	"I am getting a `AttributeError` when the existing migrations get loaded, but the model has been removed.

It looks like the migrations would have to refer to the `to`, `through` and possibly other arguments by string?!

The migration:
{{{
    operations = [
        migrations.AddField(
            model_name='model',
            name='country_of_origin',
            field=taggit.managers.TaggableManager(to=app.models.CountryOfOriginTag, through=app.models.TaggedCountryOfOrigin, blank=True, help_text=u'A comma-separated list of tags.', verbose_name=u'Country of origin'),
            preserve_default=True,
        ),
    ]
}}}


{{{
    Traceback (most recent call last):
      File ""/home/user/.virtualenvs/project/bin/manage.py"", line 62, in <module>
        execute_from_command_line(sys.argv)
      File ""…/django/django/core/management/__init__.py"", line 427, in execute_from_command_line
        utility.execute()
      File ""…/django/django/core/management/__init__.py"", line 419, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File ""…/django/django/core/management/base.py"", line 288, in run_from_argv
        self.execute(*args, **options.__dict__)
      File ""…/django/django/core/management/base.py"", line 337, in execute
        output = self.handle(*args, **options)
      File ""…/django/django/core/management/commands/makemigrations.py"", line 56, in handle
        loader.build_graph(ignore_unmigrated=True)
      File ""…/django/django/db/migrations/loader.py"", line 145, in build_graph
        self.load_disk()
      File ""…/django/django/db/migrations/loader.py"", line 103, in load_disk
        migration_module = import_module(""%s.%s"" % (module_name, migration_name))
      File ""/usr/lib/python2.7/importlib/__init__.py"", line 37, in import_module
        __import__(name)
      File ""…/project/app/migrations/0006_movie_country_of_origin.py"", line 7, in <module>
        class Migration(migrations.Migration):
      File ""…/project/app/migrations/0006_movie_country_of_origin.py"", line 17, in Migration
        field=taggit.managers.TaggableManager(to=app.models.CountryOfOriginTag, through=app.models.TaggedCountryOfOrigin, blank=True, help_text=u'A comma-separated list of tags.', verbose_name=u'Country of origin'),
    AttributeError: 'module' object has no attribute 'CountryOfOriginTag'
}}}
"	Bug	closed	Migrations	1.7-beta-1	Release blocker	wontfix		loic@…	Accepted	1	0	0	0	0	0
