toastdriven/django-tastypie — pull request #579 by philipn (2012-07-19 19:24:00+00:00)
Title: Filter using objects, not just strings.

Previously, we were sending qs.filter() only string values (excepting the simple values True, False and None).

This fixes #385 for me. #385 is an issue with string-value based date filtering, not necessarily with tastypie. Previously we would pass filter() something that looked like {'key__gte': '2012-06-25T22:21:30'}. At least for me, in Django 1.3.0, a filter() using an ISO8601 date string just doesn't work -- it needs to look like '2012-06-25 22:21:30' for it to work. I'm guessing this is because of django.conf.global_settings.DATETIME_INPUT_FORMATS, which doesn't support ISO8601.

So maybe we should be filtering with a datetime object and not just a string? I use the associated Field object's convert() method to turn the string into a python object.