diff --git a/pylons_app/controllers/repos.py b/pylons_app/controllers/repos.py --- a/pylons_app/controllers/repos.py +++ b/pylons_app/controllers/repos.py @@ -4,7 +4,6 @@ from pylons import request, response, se 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 @@ -21,10 +20,8 @@ class ReposController(BaseController): @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""" diff --git a/pylons_app/controllers/users.py b/pylons_app/controllers/users.py --- a/pylons_app/controllers/users.py +++ b/pylons_app/controllers/users.py @@ -5,7 +5,6 @@ from pylons.controllers.util import abor 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 @@ -20,10 +19,8 @@ class UsersController(BaseController): @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""" diff --git a/pylons_app/lib/base.py b/pylons_app/lib/base.py --- a/pylons_app/lib/base.py +++ b/pylons_app/lib/base.py @@ -21,6 +21,7 @@ class BaseController(WSGIController): # 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: