SimpleListFilter filter UserProfile

68 views
Skip to first unread message

yillkid

unread,
Jun 28, 2012, 3:50:03 AM6/28/12
to django...@googlegroups.com
Hi all !

I want filter a field of UserProfile (field name: timestamp),

models.py:   http://dpaste.com/764723/

admin.py:   http://dpaste.com/764724/

But when I press the filter, browser show:   http://dpaste.com/764725/

--- --- --- --- --- --- --- --- --- ---

According the error message, I can get class "UserProfile",
but if I want to  filter timestamp, how should I do ?

thx :-)

Sunny Nanda

unread,
Jul 1, 2012, 12:50:50 AM7/1/12
to django...@googlegroups.com
In the filter, you are trying the filter User objects on timestamp field which does not exist.

In line 42 of admin.py, try filtering on "userprofile__timestamp__gte"

-Sandeep
Reply all
Reply to author
Forward
0 new messages