Opened 11 years ago

Closed 11 years ago

#21888 closed Bug (duplicate)

Related model %r cannot be resolved

Reported by: Claus Conrad Owned by:
Component: Migrations Version: 1.7-alpha-1
Severity: Release blocker Keywords:
Cc: Claus Conrad Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (2)

comment:1 by Claus Conrad, 11 years ago

Cc: Claus Conrad added

comment:2 by Claus Conrad, 11 years ago

Resolution: duplicate
Status: newclosed

Sorry, duplicate of #21872

Note: See TracTickets for help on using tickets.
Back to Top