misc: add count of visible blocks to login view context (#28370)
This commit is contained in:
parent
0876d25dbd
commit
df9e4d5236
|
@ -365,6 +365,7 @@ def login(request, template_name='authentic2/login.html',
|
|||
'methods': rendered_forms,
|
||||
# new definition
|
||||
'blocks': collections.OrderedDict((block['id'], block) for block in blocks),
|
||||
'visible_blocks_count': len([x for x in blocks if not x['is_hidden']]),
|
||||
redirect_field_name: redirect_to,
|
||||
})
|
||||
return render(request, template_name, context)
|
||||
|
|
Loading…
Reference in New Issue