IS_DATETIME(format='...') validator with a custom format string. see
On 5/6/13 15:35 , Bernard wrote:
> Thanks Christian,
>
> I tried to escape it to %3A but that gave me an error invalid request. I
> couldn't figure out where it's being blocked on the server (routes.py?).
>
> Where can I get more info to change separator and parsing? Is that all in
> dal.py?
>
> On Monday, May 6, 2013 3:28:03 PM UTC-7, Christian Foster Howes wrote:
>>
>> can you url escape the : and have it work?
>>
>> if not, maybe use a different separator and change the string to timestamp
>> parsing to expect your format.
>>
>> cfh
>>
>> On Monday, May 6, 2013 1:42:40 PM UTC-7, Bernard wrote:
>>>
>>>
>>> Hi Web2py users,
>>> I am using the parse_as_rest feature for filtering by date range:
>>> The pattern is as follows:
>>> "/unit/{unit.unit_id}/timeseries[timeseries.unit]/{
>>>
timeseries.utc_time.ge}/{timeseries.utc_time.le}",
>>> I couldn't find documentation that 'ge' and 'le' are valid for datetime
>>> fields, it seems to work well:
>>>
>>>
http://localhost/manager/default/api/unit/123/timeseries/2013-05-01/2013-05-02
>>>
>>> However, I need to filter based on date and time.
>>>
>>> Ideally, I would like to send a request with the time as part of the date
>>> specification: