humanize odpocet
This commit is contained in:
parent
41cf2c945e
commit
f1484662ec
3 changed files with 11 additions and 1 deletions
|
@ -106,6 +106,7 @@ INSTALLED_APPS = (
|
|||
'django_comments',
|
||||
|
||||
'django.contrib.flatpages',
|
||||
'django.contrib.humanize',
|
||||
|
||||
# MaMweb
|
||||
'mamweb',
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% load humanize %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
@ -12,7 +14,10 @@
|
|||
|
||||
<div class="odpocet">
|
||||
Do konce odeslání řešení zbývá:
|
||||
{# TODO humanize #}
|
||||
|
||||
{{ted|timesince:dead}}
|
||||
|
||||
<!--
|
||||
{{cas_do_konce_dni}} dní
|
||||
{% if cas_do_konce_dni < 5 %}
|
||||
{{cas_do_konce_hodin}} hodin
|
||||
|
@ -23,6 +28,8 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
<p> <center>
|
||||
|
|
|
@ -54,6 +54,8 @@ class TitulniStranaView(generic.ListView):
|
|||
context['cas_do_konce_hodin'] = rozdil_casu.seconds / 3600
|
||||
context['cas_do_konce_minut'] = (rozdil_casu.seconds / 60) % 60
|
||||
context['cas_do_konce_sekund'] = rozdil_casu.seconds % 60
|
||||
context['dead'] = datetime.combine(cas_deadline, datetime.max.time())
|
||||
context['ted'] = datetime.now()
|
||||
return context
|
||||
|
||||
class StareNovinkyView(generic.ListView):
|
||||
|
|
Loading…
Reference in a new issue