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')

ModelAdmin has a `formfield_for_dbfield` hook. You can probably do 
something clever with that.

-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to