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


Python ApiAccessRequest.api_access_status方法代码示例

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


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

示例1: get

# 需要导入模块: from openedx.core.djangoapps.api_admin.models import ApiAccessRequest [as 别名]
# 或者: from openedx.core.djangoapps.api_admin.models.ApiAccessRequest import api_access_status [as 别名]
 def get(self, request):
     """
     If the requesting user has already requested API access, redirect
     them to the client creation page.
     """
     if ApiAccessRequest.api_access_status(request.user) is not None:
         return redirect(reverse('api_admin:api-status'))
     return super(ApiRequestView, self).get(request)
开发者ID:AndreySonetico,项目名称:edx-platform,代码行数:10,代码来源:views.py

示例2: get

# 需要导入模块: from openedx.core.djangoapps.api_admin.models import ApiAccessRequest [as 别名]
# 或者: from openedx.core.djangoapps.api_admin.models.ApiAccessRequest import api_access_status [as 别名]
 def get(self, request):
     """
     If the user has not created an API request, redirect them to the
     request form. Otherwise, display the status of their API request.
     """
     status = ApiAccessRequest.api_access_status(request.user)
     if status is None:
         return redirect(reverse('api_admin:api-request'))
     return render_to_response('api_admin/status.html', {
         'status': status,
         'api_support_link': _('TODO'),
         'api_support_email': settings.API_ACCESS_MANAGER_EMAIL,
     })
开发者ID:Akif-Vohra,项目名称:edx-platform,代码行数:15,代码来源:views.py

示例3: test_no_access

# 需要导入模块: from openedx.core.djangoapps.api_admin.models import ApiAccessRequest [as 别名]
# 或者: from openedx.core.djangoapps.api_admin.models.ApiAccessRequest import api_access_status [as 别名]
 def test_no_access(self):
     self.request.delete()  # pylint: disable=no-member
     self.assertIsNone(ApiAccessRequest.api_access_status(self.user))
开发者ID:Lektorium-LLC,项目名称:edx-platform,代码行数:5,代码来源:test_models.py

示例4: test_no_access

# 需要导入模块: from openedx.core.djangoapps.api_admin.models import ApiAccessRequest [as 别名]
# 或者: from openedx.core.djangoapps.api_admin.models.ApiAccessRequest import api_access_status [as 别名]
 def test_no_access(self):
     self.request.delete()
     self.assertIsNone(ApiAccessRequest.api_access_status(self.user))
开发者ID:digitalsatori,项目名称:edx-platform,代码行数:5,代码来源:test_models.py


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