'A hook to control how dates are formatted.
Can be overridden at the ``Serializer`` level (``datetime_formatting``)
or globally (via ``settings.TASTYPIE_DATETIME_FORMATTING``).
Default is ``iso-8601``, which looks like "2010-12-16".'

def format_date(self, data):

    if (self.datetime_formatting == u'rfc-2822'):
        return format_date(data)
    return data.isoformat()
