from pylons import request, response, session, tmpl_context as c
from pylons.controllers.util import abort, redirect_to
-from sqlalchemy import func
from sqlalchemy.orm.exc import NoResultFound
from floof.lib.base import BaseController, render
"""Userpage."""
try:
- c.this_user = User.query.filter(func.lower(User.name) == name) \
- .one()
+ c.this_user = User.get_by(name=name)
except NoResultFound:
abort(404)