diff pylons_app/controllers/admin/admin.py @ 374:664a5b8c551a

Added application settings, are now customizable from database fixed all instances of sqlachemy to be removed() after execution.
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 14 Jul 2010 18:31:06 +0200
parents 8026872a10ee
children
line wrap: on
line diff
--- a/pylons_app/controllers/admin/admin.py	Wed Jul 14 18:15:37 2010 +0200
+++ b/pylons_app/controllers/admin/admin.py	Wed Jul 14 18:31:06 2010 +0200
@@ -40,9 +40,8 @@
     
     @HasPermissionAllDecorator('hg.admin')        
     def index(self):
-        sa = meta.Session
-                         
-        users_log = sa.query(UserLog).order_by(UserLog.action_date.desc())
+                                 
+        users_log = self.sa.query(UserLog).order_by(UserLog.action_date.desc())
         p = int(request.params.get('page', 1))
         c.users_log = Page(users_log, page=p, items_per_page=10)
         c.log_data = render('admin/admin_log.html')