3 from pylons
import request
, response
, session
, tmpl_context
as c
4 from pylons
.controllers
.util
import abort
, redirect_to
5 from sqlalchemy
.orm
.exc
import NoResultFound
7 from floof
.lib
.base
import BaseController
, render
8 from floof
.model
.users
import User
, UserRelationship
10 log
= logging
.getLogger(__name__
)
12 class UsersController(BaseController
):
15 """List of all users."""
18 c
.users
= User
.query
.all()
20 return render('/users/index.mako')
26 c
.this_user
= User
.get_by(name
=name
)
30 rels
= UserRelationship
.query
.filter_by(
32 target_user_id
=c
.this_user
.id,
35 c
.relationships
= [_
.type for _
in rels
]
37 return render('/users/view.mako')