]> git.datanom.net - pwp.git/blame_incremental - test.py
Half way through migration away from sqlalchemy
[pwp.git] / test.py
... / ...
CommitLineData
1#!flask/bin/python
2from app import db, models
3from app import tools
4q = tools.DBQuery()
5u = models.User.query.get(4)
6p = models.Portfolio.query.get(1)
7print (q.get_users(p))
8print (q.has_access(u,p))
9print (q.can_read(u,p))
10print (q.can_write(u,p))
11a = models.AccessRight.query.join(models.AccessRight.album).all()
12#print(a)
13acls = models.AccessRight.query.filter_by(user = u)
14for acl in acls:
15 print(acl)
16 a = models.AccessRight.query.join(models.AccessRight.album).filter(acl == acl.id)
17 print(a)
18
This page took 0.026359 seconds and 5 git commands to generate.