Commits

Marcin Kuzminski committed 988477a

moved sqlalchemy session to base.

  • Participants
  • Parent commits b15d4ac
  • Branches default

Comments (0)

Files changed (3)

File pylons_app/controllers/repos.py

 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
 from pylons_app.lib.auth import authenticate
 from pylons_app.model.hg_model import HgModel
     
     @authenticate
     def __before__(self):
-        
         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"""

File pylons_app/controllers/users.py

 
 from pylons_app.lib.base import BaseController, render
 from formencode import htmlfill
-from pylons_app.model import meta
 from pylons_app.model.db import Users, UserLogs
 from pylons_app.lib.auth import authenticate
 import crypt
     
     @authenticate
     def __before__(self):
-        
         c.admin_user = session.get('admin_user')
         c.admin_username = session.get('admin_username')
-        self.sa = meta.Session
         
     def index(self, format='html'):
         """GET /users: All items in the collection"""

File pylons_app/lib/base.py

         # the request is routed to. This routing information is
         # available in environ['pylons.routes_dict']
         c.repo_list = _get_repos()
+        self.sa = meta.Session
         try:
             return WSGIController.__call__(self, environ, start_response)
         finally: