Re: Custom managers in reverse relations

2012-01-16 Thread Tai Lee
y name) should be made available on the reverse relation, e.g. > > {{{ > class Article(models.Model): >     reporter = models.ForeignKey(Reporter, related_name='article_set', > reverse_managers=['published_articles']) >     ... >     articles = models.Manager() &

Re: Custom managers in reverse relations

2012-01-16 Thread Sebastian Goll
rticles = models.Manager() published_articles = PublishedManager() }}} This seems like a very arbitrary choice. Also, it demonstrates the overlap between `related_name` and `reverse_managers`. Both attributes are responsible for more or less the same thing: defining the name of the rever

RE: Custom managers in reverse relations

2012-01-14 Thread Kääriäinen Anssi
s.com] On Behalf Of Sebastian Goll [sebastian.g...@gmx.de] Sent: Saturday, January 14, 2012 21:35 To: django-developers@googlegroups.com Subject: Re: Custom managers in reverse relations Hi all, My latest post to the list seems to have been lost in the pre-Christmas storm. Sorry for that! The is

Re: Custom managers in reverse relations

2012-01-14 Thread Sebastian Goll
Hi all, My latest post to the list seems to have been lost in the pre-Christmas storm. Sorry for that! The issue of picking which custom manager is used in resolving reverse relations still stands. Let my give you an example why this is useful: {{{ class Reporter(models.Model): ... class A

Custom managers in reverse relations

2011-12-23 Thread Sebastian Goll
Hi all, I'd like to draw your attention to long-open ticket #3871 [1]. The idea is to let ORM users choose which custom manager to use for reverse "many" relations, i.e. reverse foreign key (…_set) as well as forward and reverse many-to-many relations. There are several proposed patches to thi

Re: Use custom managers in reverse relations

2007-03-31 Thread Russell Keith-Magee
On 3/31/07, Espen Grindhaug <[EMAIL PROTECTED]> wrote: > > Hello > > I have already made a ticket about using custom managers in reverse > relations ( http://code.djangoproject.com/ticket/3871 ), but it seems > to have gotten no attention. That's is just too bad,

Use custom managers in reverse relations

2007-03-31 Thread Espen Grindhaug
Hello I have already made a ticket about using custom managers in reverse relations ( http://code.djangoproject.com/ticket/3871 ), but it seems to have gotten no attention. That's is just too bad, because this is a feature I know more people than me would like to see come to life. I have