'Return the model\'s attributes as a dictionary.
We override the standard method in order to hide the id column,
since this only exists to provide the table with a primary key.'

def to_dict(self):

    d = {}
    for attr in self.__class__.attributes:
        d[attr] = getattr(self, attr)
    return d
