Merge branch 'master' of atrey.karlin.mff.cuni.cz:/akce/MaM/MaMweb/mamweb
Conflicts: seminar/templates/seminar/titulnistrana.html
This commit is contained in:
commit
9f3bd3f9fd
3 changed files with 10 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 %}
|
||||
|
||||
|
@ -11,8 +13,11 @@
|
|||
</h2>
|
||||
|
||||
<div class="odpocet">
|
||||
Do termínu odeslání řešení zbývá:
|
||||
{# TODO humanize #}
|
||||
Do konce odeslání řešení zbývá:
|
||||
|
||||
{{ted|timesince:dead}}
|
||||
|
||||
{{cas_do_konce_dni}} dní
|
||||
{% if cas_do_konce_dni < 5 %}
|
||||
{{cas_do_konce_hodin}} hodin
|
||||
|
@ -23,6 +28,7 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<h3><a href="/o-seminari">Co je na nás skvělé?</a></h3>
|
||||
|
|
|
@ -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