Thank you George the 'limit_choices_to' param is exactly what I was looking for. I had never used or seen it before.
Bastien On May 5, 10:45 pm, George Song <geo...@damacy.net> wrote: > On 5/5/2009 12:29 PM, Bastien wrote: > > > This is quite new to me, I have done a recursive (self) many to many > > relation between blog entries so they can be linked together if the > > user thinks they are semantically related. It works but I would like > > to restrict the choices I can see in the admin list box: right now I > > can see every blog entry but I would like to see only the blog entries > > that belong to a given category. Can I refine the query? > > > That's what I have for now: > > related_entries = models.ManyToManyField('self', blank=True, > > symmetrical=False, related_name='original_entries') > > There's also `limit_choices_to` param: > <http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.mod...> > > -- > George --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---