diff --git a/README.md b/README.md index 56e7a5fe0ef0aa9cc8e63afb3e97d1d62b4c575e..a7bcc210c63effe326d4322cad64c10a559d7aff 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ Aplikace slouĹľĂcĂ k hostovánĂ pirátskĂ˝ch šifrovaÄŤek. * formulář pro snadnĂ© vkládánà šifrovaÄŤek * registrace ověřená pomocĂ emailu * vĂce info o uĹľivateli -* TOP 10 nejrychlejšĂch +* TOP 10 +* list nejrychlejsich v sifrovacce * vĂce statistik * vylepšit zobrazenĂ dokonÄŤenĂ˝ch šifrovaÄŤek * trochu pĹ™estylovat formulář pro login/registraci -* vĂc informacĂ na stránce šifrovaÄŤky (start_date, - end_date atd) +* vĂc informacĂ na stránce šifrovaÄŤky(pocet prihlasenych tymu) diff --git a/sifrovacka/__init__.py b/sifrovacka/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8231f79bf39ccabfe00f45c374f7353427fab25d 100644 --- a/sifrovacka/__init__.py +++ b/sifrovacka/__init__.py @@ -0,0 +1,4 @@ +__version__ = '0.8' +# Version synonym +VERSION = __version__ + diff --git a/sifrovacka/templates/base.html b/sifrovacka/templates/base.html index bbcf8834ba57d3f62b1b1a4c4b873507f798acd1..3212030c9738cad80783c90a53b69f83c4403c00 100644 --- a/sifrovacka/templates/base.html +++ b/sifrovacka/templates/base.html @@ -137,7 +137,8 @@ <img src="https://styleguide.pir-test.eu/2.3.x/images/logo-full-white.svg" alt="logo pirátskĂ© strany" class="w-32 md:w-40 pb-6" /> </a> <p class="para hidden md:block md:mb-4 lg:mb-0 text-grey-200"> - <span class="copyleft inline-block">©</span> {% now "Y" %} Piráti. Všechna práva vyhlazena. SdĂlejte a nechte ostatnĂ sdĂlet za stejnĂ˝ch podmĂnek. + <span class="copyleft inline-block">©</span> {% now "Y" %} Piráti. Všechna práva vyhlazena. SdĂlejte a nechte ostatnĂ sdĂlet za stejnĂ˝ch podmĂnek. + <span class="text-grey-300"><br> Verze aplikace: {{APP_VERSION_NUMBER}} </span> </p> </section> <section class="footer__social lg:text-right"> diff --git a/sifrovacka/templates/sifrovacka.html b/sifrovacka/templates/sifrovacka.html index 40bfeb0329ba25f3cd8d10ddfba6bcf81b555611..42ce4293eda099e843aa392db99399578b0c5787 100644 --- a/sifrovacka/templates/sifrovacka.html +++ b/sifrovacka/templates/sifrovacka.html @@ -66,6 +66,17 @@ </div> {% endif %} {% endif %} + {% if sifrovacka_all_users %} + <h1 class="head-alt-sm">Seznam ĂşspěšnĂ˝ch: </h1> + <div class="alert alert--grey-125"> + <span> + - + {% for i in sifrovacka_all_users %} + {{i.user}} - + {% endfor %} + </span> + </div> + {% endif %} </div> {% comment %} </br> diff --git a/sifrovacka/views.py b/sifrovacka/views.py index 74de479dd65911a17d6dca6ec1dc5e0c688dec2e..60b80e068d6a95f070dd6a7f34e22fbee0b64a5b 100644 --- a/sifrovacka/views.py +++ b/sifrovacka/views.py @@ -150,14 +150,15 @@ def detail(request, sifrovacka_id): sifrovacka_stage_count = sifrovacka_stages.count() is_archived_sifrovacka = Sifrovacka.objects.filter(id = sifrovacka_id, enddate_sifrovacka__lt = timezone.now()) + sifrovacka_all_users = Participants.objects.filter(sifrovacka_id = sifrovacka_id).exclude(finished=False) if request.user.is_authenticated: + print(sifrovacka_all_users) sifrovacka_all_user_current_stages= Participants.objects.filter(user = \ request.user).filter(sifrovacka_id = \ sifrovacka_id).values('sifrovacka_id','id') for s in sifrovacka_all_user_current_stages: if s['sifrovacka_id'] == sifrovacka_id: print("---SIFROVACKA---") - # print(s['at_stage']) tmp_stage_id = s['id'] sifrovacka_current_stage_urlhash = Participants.objects.get(id = \ tmp_stage_id) @@ -170,7 +171,8 @@ def detail(request, sifrovacka_id): "sifrovacka_current_id": sifrovacka_current_id, "sifrovacka_current_stage_urlhash": sifrovacka_current_stage_urlhash, - "is_archived_sifrovacka": is_archived_sifrovacka + "is_archived_sifrovacka": is_archived_sifrovacka, + "sifrovacka_all_users": sifrovacka_all_users } return render(request, 'sifrovacka.html', context) @@ -254,5 +256,3 @@ def index(request): - -