Re: How to filter objects by return value of Model's or AdminModel's method by list_filter?

2008-09-04 Thread MakotoSatoh

Hi, Karen,

> > Can I include my Model's or AdminModel's method into AdminModels
> > list_filter?

> No, the filtering is done at the database level.

Thanks. I've added Boolean field with default value and overrode the
Model's
save() method to update that field with calculated value from the
other field.
Then I've included that Boolean field to AdminModel's list_filter.

Makoto
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to filter objects by return value of Model's or AdminModel's method by list_filter?

2008-09-04 Thread Karen Tracey
On Thu, Sep 4, 2008 at 4:55 AM, MakotoSatoh <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> Can I include my Model's or AdminModel's method into AdminModels
> list_filter?
>
> I don't want to store the value in database, since that value is
> calculatable on the fly.
>
> Thanks in advance and congratuation on 1.0 release.
>

No, the filtering is done at the database level.

Karen

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to filter objects by return value of Model's or AdminModel's method by list_filter?

2008-09-04 Thread MakotoSatoh

Hi,

Can I include my Model's or AdminModel's method into AdminModels
list_filter?

I don't want to store the value in database, since that value is
calculatable on the fly.

Thanks in advance and congratuation on 1.0 release.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---