X-Git-Url: http://git.veekun.com/zzz-floof.git/blobdiff_plain/422dfbb85e3efd51efd676779012aeb3f9575ba4..fca6f64bc81a02c61ba45a13de25f3da2e7630b3:/floof/lib/base.py diff --git a/floof/lib/base.py b/floof/lib/base.py index d05c24d..169493c 100644 --- a/floof/lib/base.py +++ b/floof/lib/base.py @@ -4,16 +4,18 @@ Provides the BaseController class for subclassing. """ from pylons.controllers import WSGIController from pylons.templating import render_mako as render -from pylons import config -from floof import model +from pylons import config, session, tmpl_context as c +from routes import request_config -from pylons import session, tmpl_context as c +from floof import model from floof.model.users import User class BaseController(WSGIController): # NOTE: This could have been implemented as a middleware =] def __before__(self): + c.route = request_config().mapper_dict + # Fetch current user object try: c.user = User.query.get(session['user_id'])