#8424: Implement time filters
---------------------------------------------+------------------------------
Reporter: gnuvince | Owner: nobody
Status: new | Milestone: 1.0 maybe
Component: Database wrapper | Version: SVN
Resolution: | Keywords: datetime filter
hour minute second
Stage: Design decision needed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Changes (by h3):
* milestone: post-1.0 => 1.0 maybe
Comment:
I can understand why this patch as been scheduled for post-1.0, to respect
the API freeze, but it should really be included in the 1.0 release.
Being able to filter by time is not a trivial or candy feature, it
*should* be possible, we don't use dateTIME fields just for the fun of it.
Furthermore, in pre-1.0-beta was possible to "hack" a time filter like
this:
{{{
@register.filter
def filter_by_hour(obj, time):
return obj.filter(start_time__contains=' %02d' % time.hour)
}}}
Since the beta is out (I don't know the exact revision sorry), it can't be
done. It looks like a problem with the database wrapper.. I don't know if
it's intentional or not.
Anyway, unless someone can point me out another easy way to filter a
datetime field by time, I think this patch is primordial.
Regards
--
Ticket URL: <http://code.djangoproject.com/ticket/8424#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---