示例#1
0
文件: auth.py 项目: jeyzth/jeyzth.tg2
 def by_user_name(cls, username):
     """Return the user object whose user name is ``username``."""
     return DBSession.query(cls).filter_by(user_name=username).first()
示例#2
0
文件: auth.py 项目: jeyzth/jeyzth.tg2
 def by_email_address(cls, email):
     """Return the user object whose email address is ``email``."""
     return DBSession.query(cls).filter_by(email_address=email).first()
示例#3
0
文件: auth.py 项目: jeyzth/jeyzth.tg2
 def by_email_address(cls, email):
     """Return the user object whose email address is ``email``."""
     return DBSession.query(cls).filter_by(email_address=email).first()
示例#4
0
文件: auth.py 项目: jeyzth/jeyzth.tg2
 def by_user_name(cls, username):
     """Return the user object whose user name is ``username``."""
     return DBSession.query(cls).filter_by(user_name=username).first()
示例#5
0
 def test_query_obj(self):
     """Model objects can be queried"""
     obj = DBSession.query(self.klass).one()
     for key, value in self.attrs.items():
         eq_(getattr(obj, key), value)