当前位置: 首页>>代码示例>>Python>>正文


Python Company.employees方法代码示例

本文整理汇总了Python中autonomie.models.company.Company.employees方法的典型用法代码示例。如果您正苦于以下问题:Python Company.employees方法的具体用法?Python Company.employees怎么用?Python Company.employees使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在autonomie.models.company.Company的用法示例。


在下文中一共展示了Company.employees方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: company2

# 需要导入模块: from autonomie.models.company import Company [as 别名]
# 或者: from autonomie.models.company.Company import employees [as 别名]
def company2(dbsession, user):
    from autonomie.models.company import Company
    company = Company(
        name=u"Company 2",
        email=u"[email protected]",
    )
    company.employees = [user]
    dbsession.add(company)
    dbsession.flush()
    user.companies = [company]
    user = dbsession.merge(user)
    dbsession.flush()
    return company
开发者ID:CroissanceCommune,项目名称:autonomie,代码行数:15,代码来源:test_base.py

示例2: other_company

# 需要导入模块: from autonomie.models.company import Company [as 别名]
# 或者: from autonomie.models.company.Company import employees [as 别名]
def other_company(dbsession, other_user):
    from autonomie.models.company import Company
    company = Company(
        name=u"Company2",
        email=u"[email protected]",
        code_compta="0USER2",
    )
    company.employees = [other_user]
    dbsession.add(company)
    dbsession.flush()
    other_user.companies = [company]
    other_user = dbsession.merge(other_user)
    dbsession.flush()
    return company
开发者ID:CroissanceCommune,项目名称:autonomie,代码行数:16,代码来源:test_user.py

示例3: _mk_company

# 需要导入模块: from autonomie.models.company import Company [as 别名]
# 或者: from autonomie.models.company.Company import employees [as 别名]
 def _mk_company(name, email, code_compta):
     from autonomie.models.company import Company
     company = Company(
         name=name,
         email=email,
         code_compta=code_compta,
     )
     company.employees = [user]
     dbsession.add(company)
     dbsession.flush()
     user.companies = [company]
     dbsession.merge(user)
     dbsession.flush()
     return company
开发者ID:CroissanceCommune,项目名称:autonomie,代码行数:16,代码来源:conftest.py


注:本文中的autonomie.models.company.Company.employees方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。