diff pylons_app/controllers/repos.py @ 49:3ada2f409c1c

Added sqlalchemy support made models for database changed views to handle sqlalchemy
author Marcin Kuzminski <marcin@python-blog.com>
date Thu, 08 Apr 2010 01:50:46 +0200
parents 8e250e86a670
children 25e516447a33
line wrap: on
line diff
--- a/pylons_app/controllers/repos.py	Wed Apr 07 21:10:43 2010 +0200
+++ b/pylons_app/controllers/repos.py	Thu Apr 08 01:50:46 2010 +0200
@@ -4,7 +4,8 @@
 from pylons.controllers.util import abort, redirect
 from pylons_app.lib import auth
 from pylons_app.lib.base import BaseController, render
-
+from pylons_app.model import meta
+from pylons_app.model.db import Users, UserLogs
 log = logging.getLogger(__name__)
 
 class ReposController(BaseController):
@@ -16,7 +17,8 @@
         c.staticurl = g.statics
         c.admin_user = session.get('admin_user')
         c.admin_username = session.get('admin_username')
-        
+        self.sa = meta.Session
+                
     def index(self, format='html'):
         """GET /repos: All items in the collection"""
         # url('repos')