Mercurial > kallithea
comparison rhodecode/controllers/admin/admin.py @ 2662:91c442a489bb beta
sqlalchemy sessions cleanup in admin
Cleanup settings options
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 26 Jul 2012 15:36:44 +0200 |
parents | 89efedac4e6c |
children | 63e58ef80ef1 6b176c679896 |
comparison
equal
deleted
inserted
replaced
2661:09e54a646eb6 | 2662:91c442a489bb |
---|---|
43 super(AdminController, self).__before__() | 43 super(AdminController, self).__before__() |
44 | 44 |
45 @HasPermissionAllDecorator('hg.admin') | 45 @HasPermissionAllDecorator('hg.admin') |
46 def index(self): | 46 def index(self): |
47 | 47 |
48 users_log = self.sa.query(UserLog)\ | 48 users_log = UserLog.query()\ |
49 .options(joinedload(UserLog.user))\ | 49 .options(joinedload(UserLog.user))\ |
50 .options(joinedload(UserLog.repository))\ | 50 .options(joinedload(UserLog.repository))\ |
51 .order_by(UserLog.action_date.desc()) | 51 .order_by(UserLog.action_date.desc()) |
52 | 52 |
53 p = int(request.params.get('page', 1)) | 53 p = int(request.params.get('page', 1)) |