Any chance your field name is causing you problems?  Look at the generated sql.

Michael

On 6/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I had some doubts about my testing because my fields are datetime.
> So I tested it some more and the same problem came up but not only on
> the admin
>
> I have an app with a datetime field. Then I saved enoght objects to
> have one for each day of the month and the same results came up for:
> App.objects.filter(date__gt=datetime.datetime(2007, 5, 21, 0, 0, 0))
> or
> App.objects.filter(date__gte=datetime.datetime(2007, 5, 21, 0, 0, 0))
> also the same results for LTE or LT
>
> its it my mistake somewhere? or is it a bug?
>
> Daniel
>
>
> On Jun 20, 6:17 pm, "Daniel Provin" <[EMAIL PROTECTED]> wrote:
> > Hello
> > I notice that the admin has a problem when filtering dates
> > I tried:http://localhost/admin/app/model/?date__lte=2007-06-21
> > and it generates the same results 
> > as:http://localhost/admin/app/model/?date__lt=2007-06-21
> > so the LTE filter (less than or equal) is giving the same results as the LT
> > (less than only) filter for dates fields (datetime actually)
> >
> > the GTE (greater than or equal) and GT (greater than only) works fine and
> > using the shell from manage.py and filtering using
> > Model.objects.filter(date__lte='2007-06-21)
> > everything works, so I think it is an admin only problem.
> >
> > should I register a ticket? (or is it a ticket only for when I already have
> > the patch?)
> >
> > Daniel
> >
> > --
> > --
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to