def getattrs(obj, attr_names=[], alias={}):
    """Get attribute values as a dict.

    obj can be any object.
    attr_names should be attribute names.
    alias is an attr_name:alias dict of attributes that should be renamed.

    Good for pulling of initial form data out of models objects.
    """
    return dict((alias.get(attr, attr), getattr(obj, attr)) for attr in attr_names)