Development #8843
Publish blocks on account pages also using the frontend name
Start date:
02 November 2015
Due date:
% Done:
100%
Estimated time:
Patch proposed:
Yes
Planning:
Description
It should be possible to do <h1>Certificates</h1>{{ blocks.x509 }}
for example
Files
Associated revisions
History
Updated by Mikaël Ates almost 7 years ago
- File 0001-Add-in-profile-template-context-a-dictionnary-of-fro.patch added
- Patch proposed changed from No to Yes
The list of block should be kept for compatibilty and it seems then not necessary to modify accounts.html. So maybe it's enough to build the dic and pass in the template context.
In the patch proposed I used the frontends id for the dictionnary keys. The block can be displayed in template with
{{ frontends_block_dic.fc|safe }}
for FranceConnect and with ids password and ssl for respectively LoginPasswordBackend and SSLFrontend.
Updated by Benjamin Dauvergne almost 7 years ago
Two things:
- name it frontends_block_by_name, dic is just an implementation detail
- we should remove the need to use the safe filter by applying
django.utils.safestring.make_safe()
to blocks before passing them to the template
Updated by Mikaël Ates almost 7 years ago
- File 0001-Add-in-profile-template-context-a-dictionnary-of-fro.patch 0001-Add-in-profile-template-context-a-dictionnary-of-fro.patch added
I've renamed it with 'by_id'.
blocks are already of type django.utils.safestring.SafeText. The safe filter should be removed from the template (and my example).
Updated by Mikaël Ates almost 7 years ago
- File deleted (
0001-Add-in-profile-template-context-a-dictionnary-of-fro.patch)
Updated by Mikaël Ates almost 7 years ago
- Status changed from Nouveau to Résolu (à déployer)
- % Done changed from 0 to 100
Appliqué par commit authentic2|7b633fe71f0e3ac3bd588b955662bf54e355ed37.
Updated by Benjamin Dauvergne almost 7 years ago
- Status changed from Résolu (à déployer) to Solution déployée
Add in profile template context a dictionnary of frontend blocks (fixes #8843).