Skip to content

Add template chunk tag, to support apps plugging template chunks.

This MR adds a new template tag: {% app_chunk 'chunk_name' **kwargs %} This custom tag is useful for plugging apps using django_mailman3 together. The tag scans INSTALLED_APPS, inorder, for each app except the current one, it looks up whether the <app_name>/chunks/<chunk_name>.html template exists. If it does, it is collected and the result of rendering all the templates inorder, with the current context updated with tag keyword arguments, if any, is returned.

This is currently used by 2 new MRs in Postorius and HyperKitty, two template chunks are defined, one for navbar entries, other for user menu entries.

Merge request reports