List Info

Thread: Searching in a foreign table field




Searching in a foreign table field
user name
2006-03-29 00:07:46
Hi,

  Newbie here. I've got two models, Song and Queue. The
Queue model contains foreign keys of songs. In the Admin I
want to search for song names so I did:

    class META:
        admin               = meta.Admin (
            list_display  = ('date', 'song'),
            search_fields = ('song', ),
        )

  ...but I get an exception.

Exception Type:	TypeError
Exception Value:	got unexpected keyword argument
'song__icontains'

  What am I doing wrong?

-- 
Jaime G. Wong Chacaltana
E-Mail: jjgwong.org
Web   : http://jgwong.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )