开发者

Accessing DateCreated and DateUpdated in Django/Python for Twilio

开发者 https://www.devze.com 2023-04-05 05:58 出处:网络
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

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

精彩评论

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

关注公众号