<http://i.stack.imgur.com/LuqOG.png>

Hello,

I have the following code in my admin.py:

    class UserManagedGroupAdmin(admin.ModelAdmin):
        inlines = [MembershipInline]
        search_fields = ('name', 'leader__username', )
        list_display = ('__unicode__', 'leader', )
        filter_horizontal = ('permissions', )
        raw_id_fields = ('leader', )

    admin.site.register(UserManagedGroup, UserManagedGroupAdmin)


The magnifying glass icon for searching doesn't appear in the admin page.

Attatched image shows what I'm getting.

As you can see it's showing the unicode method of the model instead of the 
search icon I want.

Field `'leader'` is a `ForeignKey` to `Member`, a proxy model of the 
builtin `User`.

I've tried it with other `ForeignKey` fields and they worked as expected. 

Could it be that django disables the search for `ForeignKeys` to `User` for 
security reasons, or am I doing something wrong?

The widget would be perfect for choosing users... I mean, I can't leave a 
huge select there with every user of my site.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to