Hello,

I'm a relative newcomer to Django and love it. I'm having a problem
with a m:m relationship in the admin. Stripped down, I have two
models, Fact and FactSet

class Fact(models.Model):
    Name = models.CharField(max_length=64, unique=False, blank=False,
db_index=True)

class FactSet(models.Model):
    Name = models.CharField(max_length=64, unique=False, blank=False,
db_index=True)
    Factors = models.ManyToManyField(Fact, null=True, blank=True)

The models verify, syncdb runs without error. In the admin, I populate
in a bunch of Facts, all is well. Still in the admin, I try to create
a FactSet and get "FactSet instance needs to have a primary key value
before a many-to-many relationship can be used" As if it's trying to
save items in the join table before saving the FactSet item itself.
I'm running Django 1.1.1.

I'm probably overlooking something obvious. TIA for any clues.

--Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to