Search fields in admin panel

35 views
Skip to first unread message

MoonWolf

unread,
May 19, 2014, 8:02:31 AM5/19/14
to django...@googlegroups.com
I would like to search in admin panel for users that are not in
django's database. They are accessed through LDAP, only uid's are in
database. Other data are accessed through properties, for example:

@property
def full_name(self):
return unicode(_ldap.search_s("ou=People,ou=Main,o=company",
ldap.SCOPE_ONELEVEL, "uidNumber=%s" % self.uidNumber,
["cn"])[0][1]["cn"][0], "utf-8")

And of course it's not possible because only real fields are
allowed in "search_fields".

I found some advices here: http://stackoverflow.com/questions/6752388/django-customize-adminmodel-view
and here:
http://stackoverflow.com/questions/3729023/django-admin-search-fields-with-model-property

But - to be honest - i don't know where to start. Could you point me
to some documentation or even solution? TIA.

--
<:> Roger, MoonWolf Out <:>|My lifestyle determines my deathstyle
(::) (::)|
(:) JID:moon...@jabberpl.org(:)| http://karakkhaz.prv.pl


Reply all
Reply to author
Forward
0 new messages