Example
class ModelA(models.Model):
fielda = models.CharField(max_length=10)
class ModelB(models.Model):
modela = models.ForeignKey(ModelA)
fieldb = models.CharField(max_length=10)
When I query like "modela_instance.modelb_set()", then I will get KeyError:
u'manager' as shown below:
<https://lh6.googleusercontent.com/-sQpoxLasu-c/VEDevTQcTII/AAAAAAAAANI/w9rEdIzap4M/s1600/Screen%2BShot%2B2014-10-17%2Bat%2B%25E1%2584%258B%25E1%2585%25A9%25E1%2584%2592%25E1%2585%25AE%2B6.17.15.png>
How can I solve this problem?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/ff51d5e6-cd7a-4f25-9a45-fce3639962d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.