jfinkels/flask-restless — pull request #342 by chfw (2014-08-01 13:27:42+00:00)
Title: The use case is to format to_dict output of the data type of the developer's choice.

My problem is that UK customers would like to have date formatted as "01-12-2013" instead of "2013-12-01". Hence, I have to do extra work to make it visually correct.

With my changes, it is very easy to customize any types in helpers.to_dict to developer's choice by using the extra parameter: "formatters".

usage:
manager = APIManager(.....
formatters={
datetime.date: lambda x: x.strftime("%d-%m-%Y")
})
Then all date fields will be formatted as "%d-%m-%Y".

With my modifications, all test cases were passed.