A shortcut field for creation time.  It sets the current date and time
        when it enters the database and then doesn't update on further saves.

        If you've used the Django ORM, this is the equivalent of auto_now_add

        :param tz_aware: If this is True, the value will be returned in the
                         local time of the session.  It is always saved in UTC

def CreatedField(name='created', tz_aware=False, **kwargs):
    ''' A shortcut field for creation time.  It sets the current date and time
        when it enters the database and then doesn't update on further saves.

        If you've used the Django ORM, this is the equivalent of auto_now_add

        :param tz_aware: If this is True, the value will be returned in the
                         local time of the session.  It is always saved in UTC
    '''
    @computed_field(DateTimeField(), one_time=True, **kwargs)
    def created(obj):
        if tz_aware:
            import pytz
            return pytz.utc.localize(datetime.utcnow())
        return datetime.utcnow()
    created.__name__ = name
    return created