Задать вопрос

Тел: +7 965 3737 888

434

Просмотров

0

Ответов

timeto template filter

<p>This is a more compact version of django's <a href="http://docs.djangoproject.com/en/dev/ref/templates/builtins/#timeuntil">timeuntil</a> filter that only shows hours &amp; minutes. If used like {{ dt|timeto }}, will produce output like "1hr 30min". If you know for sure that the server has the same timezone as the <a href="http://docs.python.org/library/datetime.html#datetime-objects">datetime</a> value, then you don't need <a href="http://labix.org/python-dateutil#head-587bd3efc48f897f55c179abc520a34330ee0a62">datetutil.tz</a> for utc time conversion.</p>

Вопрос полезен? Да0/Нет0
file_3160.py(369.0б)
None