# HG changeset patch # User Marcin Kuzminski # Date 1273943113 -7200 # Node ID 988477a05db6abc04802a0cbeb94a8e7c8b42f13 # Parent b15d4ac750049b434c10df32c8f99519f4c410fa moved sqlalchemy session to base. diff -r b15d4ac75004 -r 988477a05db6 pylons_app/controllers/repos.py --- a/pylons_app/controllers/repos.py Wed May 12 10:33:24 2010 +0200 +++ b/pylons_app/controllers/repos.py Sat May 15 19:05:13 2010 +0200 @@ -4,7 +4,6 @@ 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 @@ @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 -r b15d4ac75004 -r 988477a05db6 pylons_app/controllers/users.py --- a/pylons_app/controllers/users.py Wed May 12 10:33:24 2010 +0200 +++ b/pylons_app/controllers/users.py Sat May 15 19:05:13 2010 +0200 @@ -5,7 +5,6 @@ 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 @@ @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 -r b15d4ac75004 -r 988477a05db6 pylons_app/lib/base.py --- a/pylons_app/lib/base.py Wed May 12 10:33:24 2010 +0200 +++ b/pylons_app/lib/base.py Sat May 15 19:05:13 2010 +0200 @@ -21,6 +21,7 @@ # 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: