Where to put static files referred to from list Info page?
Hi friends. Some of my version 2.1 lists had some static files that were referenced from the list's HTML pages. I'd like to do the same for the lists now that they're ported to MM3.
My question: Is there a place I can put these files within the Mailman directory hierarchy so they can be linked from the list Info page?
I.e., under "Settings / List info / Long description" I'd like to include a <a href=...> to a file that's somewhere in a persistent location in the same directory tree as the Mailman web.
I tried putting it under mm/var/lists/listname/ (where 'listname' exists, and is where templates go. This yielded a '404.'
I confirmed I can add an href to the Long description, but don't know where in the Mailman3 directory hierarchy I can put the files.
Thanks! Greg Newby
On 8/5/24 15:02, Greg Newby wrote:
My question: Is there a place I can put these files within the Mailman directory hierarchy so they can be linked from the list Info page?
You could put them in Mailman's static/ directory and reference them with a /static/... URL.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Mon, Aug 5, 2024 at 3:30 PM Mark Sapiro <mark@msapiro.net> wrote:
On 8/5/24 15:02, Greg Newby wrote:
My question: Is there a place I can put these files within the Mailman directory hierarchy so they can be linked from the list Info page?
You could put them in Mailman's static/ directory and reference them with a /static/... URL.
Confirmed - thanks! The 'static' location was just what I was looking for. ~ Greg
Mark Sapiro wrote:
You could put them in Mailman's static/ directory and reference them with a /static/... URL.
One caveat: if you run the mailman post-update command, it contains
mailman-web collectstatic --clear --noinput --verbosity 0
and the --clear option will remove your added files. You could have backups somewhere and copy them back after.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Tue, Aug 6, 2024 at 9:25 AM Mark Sapiro <mark@msapiro.net> wrote:
Mark Sapiro wrote:
You could put them in Mailman's static/ directory and reference them with a /static/... URL.
One caveat: if you run the mailman post-update command, it contains
mailman-web collectstatic --clear --noinput --verbosity 0
and the --clear option will remove your added files. You could have backups somewhere and copy them back after.
I'm glad you mentioned this. Thanks! ~ Greg
participants (2)
-
Greg Newby
-
Mark Sapiro