|
|
@ -992,6 +992,8 @@ def soustredeniUcastniciExportView(request,soustredeni): |
|
|
|
def group_by_rocnik(clanky): |
|
|
|
''' Vezme zadaný seznam článků a seskupí je podle ročníku. |
|
|
|
Vrátí seznam seznamů článků ze stejného ročníku.''' |
|
|
|
if len(clanky) == 0: |
|
|
|
return clanky |
|
|
|
clanky.order_by('cislo__rocnik__rocnik') |
|
|
|
skupiny_clanku = [] |
|
|
|
skupina = [] |
|
|
@ -1131,7 +1133,7 @@ def logoutView(request): |
|
|
|
|
|
|
|
|
|
|
|
def prihlaska_log_gdpr_safe(logger, gdpr_logger, msg, form_data): |
|
|
|
msg = "{}, form_hash:{}".format(msg,hash(form_data)) |
|
|
|
msg = "{}, form_hash:{}".format(msg,hash(frozenset(form_data.items))) |
|
|
|
logger.warn(msg) |
|
|
|
gdpr_logger.warn(msg+", form:{}".format(form_data)) |
|
|
|
|
|
|
@ -1199,8 +1201,8 @@ def prihlaskaView(request): |
|
|
|
if form.is_valid(): |
|
|
|
generic_logger.info("Form valid") |
|
|
|
fcd = form.cleaned_data |
|
|
|
form_hash = hash(fcd) |
|
|
|
form_logger.info(fcd,form_hash=form_hash) |
|
|
|
form_hash = hash(frozenset(fcd.items())) |
|
|
|
form_logger.info(fcd,form_hash) # TODO takhle log nefunguje, ale ta předchozí varianta dokonce padala |
|
|
|
|
|
|
|
with transaction.atomic(): |
|
|
|
u = User.objects.create_user( |
|
|
@ -1230,7 +1232,7 @@ def prihlaskaView(request): |
|
|
|
else: |
|
|
|
# Unknown country - log it |
|
|
|
msg = "Unknown country {}".format(fcd['stat_text']) |
|
|
|
err_logger.warn(msg,form_hash=form_hash) |
|
|
|
err_logger.warn(msg,form_hash) # TODO viz výše |
|
|
|
|
|
|
|
o.save() |
|
|
|
o.user = u |
|
|
@ -1248,7 +1250,7 @@ def prihlaskaView(request): |
|
|
|
else: |
|
|
|
# Unknown school - log it |
|
|
|
msg = "Unknown school {}, {}".format(fcd['skola_nazev'],fcd['skola_adresa']) |
|
|
|
err_logger.warn(msg,form_hash=form_hash) |
|
|
|
err_logger.warn(msg,form_hash) # TODO viz výše |
|
|
|
r.save() |
|
|
|
|
|
|
|
|
|
|
|