Hi,
I have two list servers that I would like customize the web pages for, specifically I need to add some legal information to the footer, and I might want to apply some light branding to the site. I can't find any hints on how to do that, maybe I'm looking in the wrong place?
If Postorious does not currently allow that outright, it seems I would need to fork mailman/postorious, replace templates like https://gitlab.com/mailman/postorius/-/blob/master/src/postorius/templates/p..., and build the package myself.
Is this assessment correct?
If so, would there be interest in adding a feature to define some blocks that can be overridden more easily, especially during deployment and without having to build custom Python packages?
Stefan
-- Stefan Bethke <stb@lassitu.de> Fon +49 175 3288861
Stefan Bethke writes:
I have two list servers that I would like customize the web pages for, specifically I need to add some legal information to the footer, and I might want to apply some light branding to the site. I can't find any hints on how to do that, maybe I'm looking in the wrong place?
Postorius is a Django application. There are copious docs on djangoproject.com. We really don't want to duplicate the upstream project's documentation, especially since our downstream (ie, OS distros) are likely to have various different versions of Django installed in their packages.
The basic procedure is to add a local template path (I use /etc/mailman3/templates) early in Django's template path in /etc/mailman3/settings.py. Then copy any templates you want to modify to the right place in that local template hierarchy and modify them there.
If Postorious does not currently allow that outright,
It does, there's no need to vendor Postorius.
If so, would there be interest in adding a feature to define some blocks that can be overridden more easily,
Don't think this approach is better than overriding base.html if you want sitewide legal and branding. It would be more appealing if it were list-specific. It might be slightly more convenient, but you still need to create the local template hierarchy. On the other hand, it would increase the documentation burden. And for obvious reasons we don't want to make it too easy to replace our own branding.
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
On 22. Feb 2026, at 17:33, Stephen J. Turnbull <steve@turnbull.jp> wrote:
Stefan Bethke writes:
I have two list servers that I would like customize the web pages for, specifically I need to add some legal information to the footer, and I might want to apply some light branding to the site. I can't find any hints on how to do that, maybe I'm looking in the wrong place?
Postorius is a Django application. There are copious docs on djangoproject.com. We really don't want to duplicate the upstream project's documentation, especially since our downstream (ie, OS distros) are likely to have various different versions of Django installed in their packages.
The basic procedure is to add a local template path (I use /etc/mailman3/templates) early in Django's template path in /etc/mailman3/settings.py. Then copy any templates you want to modify to the right place in that local template hierarchy and modify them there.
Thank you, after a little bit more research, I did find the necessary information and managed to configure https://github.com/maxking/docker-mailman to pick up my template overrides.
If so, would there be interest in adding a feature to define some
blocks that can be overridden more easily,
Don't think this approach is better than overriding base.html if you want sitewide legal and branding. It would be more appealing if it were list-specific. It might be slightly more convenient, but you still need to create the local template hierarchy. On the other hand, it would increase the documentation burden. And for obvious reasons we don't want to make it too easy to replace our own branding.
I understand. Would you be open to some documentation about the general approach and a few pointers in the right direction? For people who are not familiar with Django this is not very obvious.
And also, would you accept a change that enables replacing the icon in the nav bar and (extending/replacing) the footer, by defining a block each for these places with the current content as the default? My rationale is that I do not want to track changes to postorius/base.html manually, and this would allow me to override just those two blocks.
Regards, Stefan
-- Stefan Bethke <stb@lassitu.de> Fon +49 175 3288861
Stefan Bethke writes:
I understand. Would you be open to some documentation about the general approach and a few pointers in the right direction? For people who are not familiar with Django this is not very obvious.
Yes, Without seeing your contribution, I think something like what I wrote with a more precise pointer to Django documentation on overriding templates would be optimal. But I would be open to suggestions.
And also, would you accept a change that enables replacing the icon in the nav bar and (extending/replacing) the footer, by defining a block each for these places with the current content as the default?
I would have to see the proposed change. As I said before, I am generally opposed to making it easier to replace our branding. Making the footer extensible while preserving our branding would be fine with me, but it seems to me that it would be hard to do that in a way that would satisfy most use cases and be reliably attractive.
My rationale is that I do not want to track changes to postorius/base.html manually,
Yeah, I understand that. Still I'm reluctant to approve it (espcially sight unseen), but I won't veto it, or any of the parts you've mentioned. So I recommend you consult Abhilash Raj <maxking@asynchronous.in>, who is the committer most recently active on Postorius as far as I know, specifically base.html.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
participants (2)
-
Stefan Bethke -
Stephen J. Turnbull