Re: Per-object-permission branch and Many-to-many relationship issue

2007-04-18 Thread [EMAIL PROTECTED]
This problem has been known since at least last year -- check out http://code.djangoproject.com/ticket/1796 . It has been vexing me for a couple months, but I have yet to find an elegant solution. There is a workaround in django.core.management.run_shell() that cures the problem in the manage.py

Re: Per-object-permission branch and Many-to-many relationship issue

2007-04-05 Thread Aidas Bendoraitis
Replying to myself, this is the temporary solution to the issue, I described yesterday: class Element(...) ... def get_categories(self): return Category.objects.distinct().extra( tables=['elementapp_element_categories AS eec'], where=['categoryapp_category.

Per-object-permission branch and Many-to-many relationship issue

2007-04-04 Thread Aidas Bendoraitis
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(