aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/controllers
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-03-03 18:12:11 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-03-03 22:23:47 +0100
commit631fc8a3ebaf74dc609a445dc0b11b73eb0eab02 (patch)
treedb3b407b79880605eed5cdb7dfd64cdf3a5ab9d2 /pyaggr3g470r/controllers
parentcleaning feed on okay download resulting in 304 (diff)
downloadnewspipe-631fc8a3ebaf74dc609a445dc0b11b73eb0eab02.tar.gz
newspipe-631fc8a3ebaf74dc609a445dc0b11b73eb0eab02.tar.bz2
newspipe-631fc8a3ebaf74dc609a445dc0b11b73eb0eab02.zip
adding some docstring
Diffstat (limited to 'pyaggr3g470r/controllers')
-rw-r--r--pyaggr3g470r/controllers/abstract.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/controllers/abstract.py b/pyaggr3g470r/controllers/abstract.py
index ebb73e30..a99e67f3 100644
--- a/pyaggr3g470r/controllers/abstract.py
+++ b/pyaggr3g470r/controllers/abstract.py
@@ -7,7 +7,7 @@ logger = logging.getLogger(__name__)
class AbstractController(object):
- _db_cls = None
+ _db_cls = None # reference to the database class
_user_id_key = 'user_id'
def __init__(self, user_id):
@@ -48,7 +48,7 @@ class AbstractController(object):
return obj
def create(self, **attrs):
- attrs['user_id'] = self.user_id
+ attrs[self._user_id_key] = self.user_id
obj = self._db_cls(**attrs)
db.session.add(obj)
db.session.commit()
bgstack15