1

这是我的第一篇文章!我正在使用一个正在记录电话的python web 应用程序。我可以访问 client.recordings.uri,但无法访问我的代码中的 records.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模块可以吗?

4

1 回答 1

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

You'll need to add an underscore between datecreated. You can find a list of all attributes on the recording object here.

于 2011-09-17T00:06:23.483 回答