Friday, July 1, 2011

access fields in intermediate model

http://stackoverflow.com/questions/2005953/django-access-fields-in-intermediate-model

in this post, you can find how to access fields in intermediate model
like this 'my_group.membership_set.all()'

i use this in my own code, but it did not work. it get ' [] '

my models is very likely with the models in that post. And the code
"my_group.members.all()" is not ' [] '.

anyone know the reason?

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

No comments:

Post a Comment