我需要编辑 Browsable API 的图标。
是否可以通过覆盖模板中的 api.html 来做到这一点?
最佳答案
这可以通过在 api.html 中添加以下 block 来实现
{% block style %}
{{ block.super }}
<link rel="shortcut icon" type="image/png" href="xxxx.png" />
{% endblock %}
关于python - 我如何在 Django REST 框架中编辑 Browsable API 中的图标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46842938/