Mercurial > kallithea
changeset 151:988477a05db6
moved sqlalchemy session to base.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 15 May 2010 19:05:13 +0200 |
parents | b15d4ac75004 |
children | 0c00fbaff55a |
files | pylons_app/controllers/repos.py pylons_app/controllers/users.py pylons_app/lib/base.py |
diffstat | 3 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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"""
--- 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"""
--- 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: