Django 1.7, KeyError: u'manager' error

1,453 views
Skip to first unread message

Taenyon Kim

unread,
Oct 17, 2014, 5:18:04 AM10/17/14
to django-d...@googlegroups.com
I had a problem in using django 1.7.
Example:

class ModelA(models.Model):
    fielda = models.CharField(max_length=10)

class ModelsB(models.Model):
    modela = models.ForeignKey(ModelA)
    fieldb = models.CharField(max_length=10)

when I query like " modela_instance.modelb_set()', I will get KeyError: u'manager'.


How can I resolve this problem?


George-Cristian Bîrzan

unread,
Oct 17, 2014, 8:26:34 AM10/17/14
to django-d...@googlegroups.com
By using the API correctly: https://docs.djangoproject.com/en/1.7/topics/db/queries/#backwards-related-objects

Also, this mailing list is not the correct place to ask these questions, you're looking for https://docs.djangoproject.com/en/1.7/internals/mailing-lists/#django-users

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/6267e775-07ee-4e86-94fb-6a94c337349a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
George-Cristian Bîrzan

Tom Christie

unread,
Oct 17, 2014, 8:29:04 AM10/17/14
to django-d...@googlegroups.com
Hi Taenyon,

This list is for development on Django itself.
I see you've also asked the question on the `django-users` mailing list, which is the right mailing list for your question.
You'll want to follow up any further questions on the `django-users` thread rather than this one.

All the best,

  Tom
Reply all
Reply to author
Forward
0 new messages