开发者

Accessing DateCreated and DateUpdated in Django/Python for Twilio

Here's my first post! I'm working with a python web 开发者_如何学Capp that is recording phone calls. I am able to access client.recordings.uri, but I'm not able to access recordings.datecreated or dateupdated in my code.

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

.uri and .duration are valid python attributes, does anyone know how to call the DateCreated attribute? Is it possible with the python module?


{% 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜