projects
/
zzz-floof.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
posted by me checkbox
[zzz-floof.git]
/
floof
/
controllers
/
users.py
diff --git
a/floof/controllers/users.py
b/floof/controllers/users.py
index
1e251f0
..
1a79c15
100644
(file)
--- a/
floof/controllers/users.py
+++ b/
floof/controllers/users.py
@@
-6,7
+6,7
@@
from sqlalchemy import func
from sqlalchemy.orm.exc import NoResultFound
from floof.lib.base import BaseController, render
from sqlalchemy.orm.exc import NoResultFound
from floof.lib.base import BaseController, render
-from floof.model.users import User
+from floof.model.users import User
, UserRelationship
log = logging.getLogger(__name__)
log = logging.getLogger(__name__)
@@
-29,4
+29,11
@@
class UsersController(BaseController):
except NoResultFound:
abort(404)
except NoResultFound:
abort(404)
+ rels = UserRelationship.query.filter_by(
+ user_id=c.user.id,
+ target_user_id=c.this_user.id,
+ ).all()
+
+ c.relationships = [_.type for _ in rels]
+
return render('/users/view.mako')
return render('/users/view.mako')