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


Python CommCareBuildConfig.latest_j2me_enabled_config方法代码示例

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


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

示例1: get_releases_context

# 需要导入模块: from corehq.apps.builds.models import CommCareBuildConfig [as 别名]
# 或者: from corehq.apps.builds.models.CommCareBuildConfig import latest_j2me_enabled_config [as 别名]
def get_releases_context(request, domain, app_id):
    app = get_app(domain, app_id)
    can_send_sms = domain_has_privilege(domain, privileges.OUTBOUND_SMS)
    build_profile_access = domain_has_privilege(domain, privileges.BUILD_PROFILES)
    prompt_settings_form = PromptUpdateSettingsForm.from_app(app, request_user=request.couch_user)

    context = {
        'release_manager': True,
        'can_send_sms': can_send_sms,
        'can_view_cloudcare': has_privilege(request, privileges.CLOUDCARE),
        'has_mobile_workers': get_doc_count_in_domain_by_class(domain, CommCareUser) > 0,
        'latest_released_version': get_latest_released_app_version(domain, app_id),
        'sms_contacts': (
            get_sms_autocomplete_context(request, domain)['sms_contacts']
            if can_send_sms else []
        ),
        'build_profile_access': build_profile_access,
        'application_profile_url': reverse(LanguageProfilesView.urlname, args=[domain, app_id]),
        'lastest_j2me_enabled_build': CommCareBuildConfig.latest_j2me_enabled_config().label,
        'fetchLimit': request.GET.get('limit', DEFAULT_FETCH_LIMIT),
        'latest_build_id': get_latest_build_id(domain, app_id),
        'prompt_settings_url': reverse(PromptSettingsUpdateView.urlname, args=[domain, app_id]),
        'prompt_settings_form': prompt_settings_form,
        'full_name': request.couch_user.full_name,
        'can_manage_releases': can_manage_releases(request.couch_user, request.domain, app_id)
    }
    if not app.is_remote_app():
        context.update({
            'enable_update_prompts': app.enable_update_prompts,
        })
        if len(app.modules) == 0:
            context.update({'intro_only': True})

        # Multimedia is not supported for remote applications at this time.
        try:
            multimedia_state = app.check_media_state()
            context.update({
                'multimedia_state': multimedia_state,
            })
        except ReportConfigurationNotFoundError:
            pass
    return context
开发者ID:kkrampa,项目名称:commcare-hq,代码行数:44,代码来源:releases.py


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