On Fri, Apr 30, 2010 at 6:26 AM, Derek <gamesb...@gmail.com> wrote:
> MyModel.objects.filter( (my_date_field + relativedelta(months =
> +my_month_field))__lt = today )

wouldnt that be the same as my_date_field__gt=(today -
relativedelta(months=my_month_field))

my_date_field + my_month_field < today
my_date_field > today - my_month_field

but assuming you want a range of dates from (my_date_field +
my_month_field) to today

__range=(start_date, end_date)

would be what you are looking for.

if you mean using the values stored in the DB without first fetching
them to perform the calculations, then the general answer is no, but
you can always dig into ModelManagers and use raw sql

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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