Great. I go to pick up extra() to use.

Thanks Tim.



On Jul 24, 2:33 pm, Tim Chase <django.us...@tim.thechases.com> wrote:
> > Such a transformation is fine. I found that my Django has no F().
> > Checking the Django doc I saw that this new feature is "New in Django
> > Development version".
>
> > So I have to wait for the new version? Are there any other ways to
> > create such a filter?
> >>  col1_value >= col2_value * 2
>
> >> something like col1__gte=F('col2') * 2
>
> You can always fall back to the .extra() method[1]:
>
>    results = MyFoo.objects.extra(where=[
>      "col1_value >= col2_value * 2",
>      ])
>
> which is how it was done back in the day before ya'll young
> whippersnappers had such fancy shenanigans as F() objects...and
> to get data, we walked up hill, in the snow.  Both ways.  ;-)
>
> -tim
>
> [1]http://docs.djangoproject.com/en/dev/ref/models/querysets/#extra-sele...
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to