* 'master' of atrey:/akce/MaM/MaMweb/mamweb: (24 commits) Smazaný termín pro účast na soustředění v AktualniZadani.html. A. Neukládej k organizátorovi fotku, nezměnila-li se Obrázky v hlavičce převedeny na jpg NOC | otoceni fotky Admin: zobrazuje celé jméno, předvyplňuje, ukládá Admin: změna způsobu zobrazování celého jména Admin: ve výběru uživatele zobraz celé jméno test | nasazovani -- problem s pravy Admin: předvyplnění autora u problémů Zobrazuj jen zadaná a veřejná témata Zadání: aktuální výsledkovka Noc | nocni tema Middleware, krery zjistuje jestli je NOC Odchyceni vyjimky u autocomplete Změna Organizator.studuje: obsahuje i činnost 400 a 403 se stejnym obrazkem jako 500 test | allow hosts Fix: APPEND_SLASH = True funguje oprava allow hosts na testu Allow hosts na testu ... Conflicts: Makefileremotes/origin/Float_novinky
@ -0,0 +1,12 @@ |
|||||
|
|
||||
|
from datetime import datetime, date |
||||
|
|
||||
|
def vzhled(request): |
||||
|
''' Podle casu prida do templatu, zdali je nebo neni noc ''' |
||||
|
hodin = datetime.now().hour |
||||
|
if (hodin <= 6) or (hodin >= 20): |
||||
|
noc = True |
||||
|
else: |
||||
|
noc = False |
||||
|
return {'noc' : noc} |
||||
|
|
@ -0,0 +1,36 @@ |
|||||
|
|
||||
|
from django.http import HttpResponse |
||||
|
from datetime import datetime, date |
||||
|
|
||||
|
class vzhled: |
||||
|
|
||||
|
def process_request(self, request): |
||||
|
return None |
||||
|
|
||||
|
def process_view(self, request, view_func, view_args, view_kwargs): |
||||
|
#print "====== process_request ======" |
||||
|
#print view_func |
||||
|
#print view_args |
||||
|
#print view_kwargs |
||||
|
#print "=============================" |
||||
|
return None |
||||
|
|
||||
|
def process_template_response(self, request, response): |
||||
|
hodin = datetime.now().hour |
||||
|
if (hodin <= 6) or (hodin >= 14): # TODO 20 |
||||
|
response.context_data['noc'] = True |
||||
|
else: |
||||
|
response.context_data['noc'] = False |
||||
|
return response |
||||
|
|
||||
|
def process_response(self, request, response): |
||||
|
#hodin = datetime.now().hour |
||||
|
#if (hodin <= 6) or (hodin >= 14): # TODO 20 |
||||
|
#response.context_data['noc'] = True |
||||
|
#else: |
||||
|
#response.context_data['noc'] = False |
||||
|
return response |
||||
|
|
||||
|
|
||||
|
##def process_exception(request, exception): |
||||
|
#pass |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 400 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 519 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 562 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 512 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 456 KiB |
After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 679 KiB |
@ -0,0 +1,19 @@ |
|||||
|
{% extends "base.html" %} |
||||
|
|
||||
|
{% load staticfiles %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<h2> |
||||
|
{% block nadpis1a %}{% block nadpis1b %} |
||||
|
O-jo-jo-jo-joj |
||||
|
{% endblock %}{% endblock %} |
||||
|
</h2> |
||||
|
|
||||
|
<p> |
||||
|
Chybička se vloudila. |
||||
|
Zkuste přejít na <a href="/">titulní stránku</a> |
||||
|
nebo se podívat na <a href="/zadani/aktualni/">aktuální zadání</a>. |
||||
|
</p> |
||||
|
<img src="{% static '500.png' %}"> |
||||
|
{% endblock %} |
||||
|
|
@ -0,0 +1,19 @@ |
|||||
|
{% extends "base.html" %} |
||||
|
|
||||
|
{% load staticfiles %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<h2> |
||||
|
{% block nadpis1a %}{% block nadpis1b %} |
||||
|
Vrrrrrrrrr |
||||
|
{% endblock %}{% endblock %} |
||||
|
</h2> |
||||
|
|
||||
|
<p> |
||||
|
Tady pravděpodobně nemáte co dělat. |
||||
|
Zkuste přejít na <a href="/">titulní stránku</a> |
||||
|
nebo se podívat na <a href="/zadani/aktualni/">aktuální zadání</a>. |
||||
|
</p> |
||||
|
<img src="{% static '500.png' %}"> |
||||
|
{% endblock %} |
||||
|
|
@ -0,0 +1,20 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import models, migrations |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('seminar', '0032_cislo_pdf_blank_typos'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name='organizator', |
||||
|
name='studuje', |
||||
|
field=models.CharField(help_text=b"Nap\xc5\x99. 'Studuje Obecnou fyziku (Bc.), 3. ro\xc4\x8dn\xc3\xadk', 'Vystudovala Diskr\xc3\xa9tn\xc3\xad modely a algoritmy (Mgr.)' nebo 'P\xc5\x99edn\xc3\xa1\xc5\xa1\xc3\xad na MFF'", max_length=256, null=True, verbose_name=b'Studium aj.', blank=True), |
||||
|
preserve_default=True, |
||||
|
), |
||||
|
] |
@ -0,0 +1,31 @@ |
|||||
|
<table class='vysledkovka'> |
||||
|
<tr class='border-b'> |
||||
|
<th class='border-r'># |
||||
|
<th class='border-r'>Jméno |
||||
|
<th class='border-r'>R. |
||||
|
<th class='border-r'>Odjakživa |
||||
|
{% for c in rocnik.verejna_cisla %} |
||||
|
{% if c.verejna_vysledkovka %} |
||||
|
<th class='border-r'><a href="{{ c.verejne_url }}"> |
||||
|
{{c.rocnik.rocnik}}.{{ c.cislo }}</a> |
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
<th class='border-r'>Celkem |
||||
|
|
||||
|
{% for rv in vysledkovka %} |
||||
|
<tr> |
||||
|
<td class='border-r'>{% autoescape off %}{{ rv.poradi }}{% endautoescape %} |
||||
|
<th class='border-r'> |
||||
|
{% if rv.titul %} |
||||
|
{{ rv.titul }}<sup>MM</sup> |
||||
|
{% endif %} |
||||
|
{{ rv.resitel.plne_jmeno }} |
||||
|
<td class='border-r'>{{ rv.resitel.rocnik }} |
||||
|
<td class='border-r'>{{ rv.body_odjakziva }} |
||||
|
{% for b in rv.body_cisla %} |
||||
|
<td class='border-r'>{{ b }} |
||||
|
{% endfor %} |
||||
|
<td class='border-r'><b>{{ rv.body_rocnik }}</b> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</table> |
@ -0,0 +1,19 @@ |
|||||
|
{% extends "seminar/zadani/base.html" %} |
||||
|
|
||||
|
{% block submenu %} |
||||
|
{% with "vysledkova-listina" as selected %} |
||||
|
{% include 'seminar/zadani/submenu.html' %} |
||||
|
{% endwith %} |
||||
|
{% endblock submenu %} |
||||
|
|
||||
|
|
||||
|
{% block content %} |
||||
|
{% with nastaveni.aktualni_rocnik as rocnik %} |
||||
|
<h2>Výsledky</h2> |
||||
|
{% if vysledkovka %} |
||||
|
{% include "seminar/vysledkovka_rocnik.html" %} |
||||
|
{% else %} |
||||
|
V tomto ročníku zatím žádné výsledky nejsou |
||||
|
{% endif %} |
||||
|
{% endwith %} |
||||
|
{% endblock content %} |