Hi Daniel,
Models -
class Reel(models.Model):
st = models.DateTimeField(auto_now_add=True)
et = models.DateTimeField(auto_now=True)
othermodel= models.ForeignKey(Othermodel)
class Othermodel(models.Model):
name = models.CharField(max_length=100, blank=False)
Code -
om = Othermodel(name="Test")
om.save()
count = om.reel_set.count() #this causes the error
Thanks,
Alex
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.