summaryrefslogtreecommitdiff
path: root/models/base.py
blob: fd40001896fd59c322d1a6cd947c2e71c00fa3c1 (plain)
1
2
3
4
5
6
7
8
9
10
class BaseModel():

    def as_dict(self):
        this_dict = {}

        for k in self.__dict__.keys():
            if k != "_db":
                this_dict[k] = getattr(self, k)

        return this_dict