def hydrate(self, bundle):
        value = super(DateField, self).hydrate(bundle)

        if value and not hasattr(value, 'year'):
            try:
                # Try to rip a date/datetime out of it.
                value = make_aware(parse(value))

                if hasattr(value, 'hour'):
                    value = value.date()
            except __HOLE__:
                pass

        return value
dataset/ETHPy150Open hzlf/openbroadcast/website/apps/tastypie__/fields.py/DateField.hydrate