Hello!

I am using per-object-permission branch and experiencing the same
problem, mentioned in the closed ticket #2201: can't get the
many-to-many-related objects from the side of the model which defines
the many-to-many relation, although no problem vice versa.

Let's say I have

class Category(models.Model):
    title = models.CharField(...)

class Element(models.Model):
    title = models.CharField(...)
    categories = models.ManyToManyField(Category, blank=True)


Then
>>> c = Category.objects.all()[0]
>>> c.element_set.all() # works OK
[]

But
>>> e = Element.objects.all()[0]
>>> e.categories.all() # displays an error
# bla bla bla
TypeError: Cannot resolve keyword 'element' into field

Is it the problem with the branch? If so, could someone merge the
current trunk to the per-object-permission branch? Or what would be
the circumventing of the problem, that is, how could I get all the
categories for the Element instance?

By the way, I tried to import models both: using project name and not
using it. The results are the same.
I am using MySQL if it may matter.

Has anybody experienced the problem using the latest trunk?

Regards,
Aidas Bendoraitis [aka Archatas]

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to