Changeset - 988477a05db6
[Not reviewed]
default
0 3 0
Marcin Kuzminski - 16 years ago 2010-05-15 19:05:13
marcin@python-works.com
moved sqlalchemy session to base.
3 files changed with 1 insertions and 6 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/repos.py
Show inline comments
 
@@ -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"""
pylons_app/controllers/users.py
Show inline comments
 
@@ -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"""
pylons_app/lib/base.py
Show inline comments
 
@@ -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:
0 comments (0 inline, 0 general)