本文整理匯總了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