﻿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
21888	Related model %r cannot be resolved	Claus Conrad		"My ''models.py'' (simplified) looks like this:

{{{
class BackgroundImage(models.Model):
    name = models.CharField(max_length=64)

class Occasion(models.Model):
    backgrounds = models.ManyToManyField(BackgroundImage, blank=True)
}}}

In ''0001_initial.py'' created by ''makemigrations APP_NAME'' the operation to create table ''Occasion'' comes before the operation to create table ''BackgroundImage'', resulting in the above message when trying to run ''migrate''.

If it's relevant, I am using psycopg2 for the driver."	Bug	closed	Migrations	1.7-alpha-1	Release blocker	duplicate		Claus Conrad	Unreviewed	0	0	0	0	0	0
