summaryrefslogtreecommitdiff
path: root/models/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'models/base.py')
-rw-r--r--models/base.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/base.py b/models/base.py
new file mode 100644
index 0000000..fd40001
--- /dev/null
+++ b/models/base.py
@@ -0,0 +1,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