project_api.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:montage 作者: storyful 项目源码 文件源码
def _get_image_url(self, image_gcs_filename):
        """
            Takes the filename of an image stored in Cloud Storage
            and calls the images API to serve it from there.

            Returns the images API serving URL

            No longer used.
        """
        if settings.TESTING or not settings.DEBUG:
            if image_gcs_filename:
                return get_gcs_image_serving_url(
                    image_gcs_filename)
        else:
            # Little local dev hack. We're using the Images API with GCS.
            # This doesn't work locally so instead we pass the image dataUri
            # and use it directly
            return image_gcs_filename
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号