本文整理汇总了Python中multiproject.common.projects.Project.project_archive_id方法的典型用法代码示例。如果您正苦于以下问题:Python Project.project_archive_id方法的具体用法?Python Project.project_archive_id怎么用?Python Project.project_archive_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类multiproject.common.projects.Project
的用法示例。
在下文中一共展示了Project.project_archive_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: query_archived_projects
# 需要导入模块: from multiproject.common.projects import Project [as 别名]
# 或者: from multiproject.common.projects.Project import project_archive_id [as 别名]
def query_archived_projects(self, query):
""" Returns a list of archived projects given with query
"""
projects = []
with admin_query() as cursor:
try:
cursor.execute(query)
for project in cursor.fetchall():
# Create regular project
prj = Project(
id=project[1],
env_name=project[3],
project_name=project[2],
description=None,
author_id=project[4],
created=project[5],
parent_id=project[6],
)
# Add some archiving parameters
prj.archive_folder_name = project[7]
prj.archive_path = conf.archive_path + "/" + project[7]
prj.archive_date = project[8]
prj.remove_due = project[9]
prj.removed_at = project[10]
prj.project_archive_id = project[0]
projects.append(prj)
except:
conf.log.exception("Querying archived projects failed with query '''%s'''" % query)
return projects