comparison rhodecode/lib/base.py @ 1749:8ecc6b8229a5 beta

commit less models - models don't do any commits(with few exceptions) - all db transactions should be handled by higher level modules like controllers, celery tasks
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 02 Dec 2011 22:31:13 +0200
parents 07e56179633e
children b265be1c6093
comparison
equal deleted inserted replaced
1748:a3ee2611e6e8 1749:8ecc6b8229a5
33 c.backends = BACKENDS.keys() 33 c.backends = BACKENDS.keys()
34 c.unread_notifications = NotificationModel()\ 34 c.unread_notifications = NotificationModel()\
35 .get_unread_cnt_for_user(c.rhodecode_user.user_id) 35 .get_unread_cnt_for_user(c.rhodecode_user.user_id)
36 self.cut_off_limit = int(config.get('cut_off_limit')) 36 self.cut_off_limit = int(config.get('cut_off_limit'))
37 37
38 self.sa = meta.Session() 38 self.sa = meta.Session
39 self.scm_model = ScmModel(self.sa) 39 self.scm_model = ScmModel(self.sa)
40 40
41 def __call__(self, environ, start_response): 41 def __call__(self, environ, start_response):
42 """Invoke the Controller""" 42 """Invoke the Controller"""
43 # WSGIController.__call__ dispatches to the Controller method 43 # WSGIController.__call__ dispatches to the Controller method