Formating Django TimeField in a Django view
<p>How do you format a TimeField in a Django view?</p>

<p>Currently in my django html template I can easily do something like: <code>{{movie.start_time|time:"g:iA"|lower}}</code></p>

<p>How can I do the equivalent of the above in a Django view?</p>

<p>Use the Python <code>strftime()</code> function.  <a href="https://docs.python.org/2/library/time.html#time.strftime" rel="nofollow">https://docs.python.org/2/library/time.html#time.strftime</a></p>

python django