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


Python CodeDoubanProject.get_ids方法代码示例

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


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

示例1: _q_index

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import get_ids [as 别名]
def _q_index(request):
    user = request.user
    my_issues = []
    if user:
        username = user.username

        your_projects = CodeDoubanProject.get_projects(owner=username,
                                                       sortby='lru')
        watched_projects = CodeDoubanProject.get_watched_others_projects_by_user(  # noqa
            user=username,
            sortby='lru')

        teams = Team.get_by_user_id(user.name)
        actions = get_user_inbox(username).get_actions(
            stop=PAGE_ACTIONS_COUNT - 1)
        badge_items = user.get_badge_items()

        # pull request
        # your_tickets = user.get_user_pull_requests_rank(limit=5)
        your_tickets = user.get_user_submit_pull_requests(limit=5)

        # issue
        project_ids = CodeDoubanProject.get_ids(user.name)
        dt = {
            'state': "open",
            'limit': 5,
            'start': 0,
        }
        my_issues = ProjectIssue.gets_by_project_ids(project_ids, **dt)

        return st('newsfeed.html', **locals())
    return request.redirect("/teams/")
开发者ID:000fan000,项目名称:code,代码行数:34,代码来源:__init__.py

示例2: get_user_index

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import get_ids [as 别名]
 def get_user_index(cls, user):
     index_data = user.as_dict()
     badges_count = len(index_data['badges'])
     del index_data['badges']
     praises_count = len(user.get_praises())
     repos_count = len(CodeDoubanProject.get_ids(owner=user.name))
     index_data.update(  # TODO: add other necessary fields
         repos_count=repos_count,
         praises_count=praises_count,
         badges_count=badges_count,
         last_updated=datetime.now().strftime(DATE_FORMAT),  # FIXME
     )
     return index_data
开发者ID:000fan000,项目名称:code,代码行数:15,代码来源:user_search.py

示例3: __init__

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import get_ids [as 别名]
    def __init__(self, username, target_ids=None):
        if not target_ids:
            from vilya.models.project import CodeDoubanProject

            target_ids = CodeDoubanProject.get_ids(owner=username)
        super(ProjectOwnLRUCounter, self).__init__(username, target_ids)
开发者ID:leeccong,项目名称:code,代码行数:8,代码来源:lru_counter.py

示例4: reset_all

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import get_ids [as 别名]
def reset_all():
    ids = CodeDoubanProject.get_ids()
    for id in ids:
        project = CodeDoubanProject.get(id)
        project.git.get_gitstats_data()
开发者ID:000fan000,项目名称:code,代码行数:7,代码来源:clear_collector.py

示例5: clean_all

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import get_ids [as 别名]
def clean_all():
    ids = CodeDoubanProject.get_ids()
    for id in ids:
        project = CodeDoubanProject.get(id)
        clear(project.name)
开发者ID:000fan000,项目名称:code,代码行数:7,代码来源:clear_collector.py


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