django - Django 从谷歌云媒体位置加载模板
问题描述
我已经创建了一个 html 文件并将其上传到谷歌云媒体位置,我正在尝试使用下面的代码获取该 html 内容,但我无法获取模板对象。
from django.template import loader
template_name = 'http://storage.googleapis.com/media/templates/real.html'
template = loader.get_template(template_name)
有没有办法获取 django 模板对象?
解决方案
推荐阅读
- sql-server - SQL Server 引入 FOREIGN KEY 约束可能导致循环或多个级联路径
- json - 导入带有操作的 JSON 文件
- javascript - 在 d3js styleTween 中使用 CSS calc 时出现意外的过渡
- python-3.x - 为文件夹中的文件运行 Python 脚本
- php - 如何打印到服务器控制台,而不是浏览器或浏览器控制台
- python-3.x - 我如何编写这段代码(简单的方法),python 问题?
- java - Swagger core v3在java中的实现
- r - 使用所有列将行转换为 R 中的字符
- php - 将特定项目放在 php foreach 的最后一个循环中
- laravel - 如何从查询结果中排除联接表数据