gpt4 book ai didi

python - 在 Twilio 的 Django/Python 中访问 DateCreated 和 DateUpdated

转载 作者:太空宇宙 更新时间:2023-11-03 19:27:45 25 4
gpt4 key购买 nike

这是我的第一篇文章!我正在使用一个正在录制电话的 python Web 应用程序。我可以访问 client.recordings.uri,但无法在代码中访问 Recordings.datecreated 或 dateupdated。

{% for recording in recordings %}
<li><a href="{{ recording.uri }}.mp3">{{ recording.datecreated }} {{ recording.duration }} sec.</a></li>
{% endfor %}

.uri 和 .duration 是有效的 python 属性,有人知道如何调用 DateCreated 属性吗? python 模块可以吗?

最佳答案

{% for recording in recordings %}
<li>
<a href="{{ recording.uri }}.mp3">
{{ recording.date_created }} {{ recording.duration }} sec.
</a>
</li>
{% endfor %}

您需要在创建日期之间添加下划线。您可以找到记录对象here上所有属性的列表。 .

关于python - 在 Twilio 的 Django/Python 中访问 DateCreated 和 DateUpdated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7451246/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com