import logging
-from pylons import config, request, response, session, tmpl_context as c, h
+from pylons import config, request, response, session, tmpl_context as c
from pylons.controllers.util import abort, redirect
from pylons import url
from floof.lib.base import BaseController, render
log = logging.getLogger(__name__)
-from floof.lib import file_storage as storage
+from floof.lib import file_storage as storage, helpers as h
from floof.model import Art, Rating, ArtUser
from floof.model.art import ArtUserType
from floof.model.comments import Discussion
import os.path
import PIL
import PIL.Image
-from sqlalchemy import func
from sqlalchemy.exceptions import IntegrityError
from sqlalchemy.orm.exc import NoResultFound
from wtforms.validators import ValidationError
def watchstream(self, name):
"""Watchstream for a certain user."""
try:
- c.watching_user = User.query.filter(func.lower(User.name) == name) \
- .one()
+ c.watching_user = User.get_by(name=name)
except NoResultFound:
abort(404)