Hi Harshit,
On 01/17/2016 09:22 AM, Harshit Bansal wrote:
Hi everybody, I was looking at GSOC 2016 wiki page and I found "Preset List Settings Templates" project quite interesting.
After reading out the project description and the discussion on the project from the mail archives I have been able to reach out the following conclusion : I will be required to develop a Web Interface that will allow the admins to set the different attributes to the different mailing lists using some fixed templates(also known as styles). Not only this they will be able to define their own styles and use them. This will serve as our front-end.
Your understanding is actually good, but more generic as of now. Styles are the term used in Mailman to accumulate a certain list of list-settings that change the behavior of the list. There are some pre-defined styles like "Announce", "General", "Moderation" etc that you can find in src/mailman/styles/base.py in the mailman-core source code1.
Right now, styles can only be applied to a mailing list when they are created. And there is no way right now to create new styles without modifying the source code. The official Web UI for Mailman is called Postorius and talks to the mailman-core via HTTP REST API. So you'd have to expose the styles via REST API and then implement it in the Postorius (which is a Django application).
Some major challenges for your project (not exhaustive) that I would like to see addressed in the application are:
Figure out how to store and access the styles as some of them are defined in the source code and the ones created by users would have to be stored in database.
How to apply styles to lists after they have been created?
Should we even allow changing list styles after lists have been created? Does changing a style in database/source code change the settings for list?
See what happens when a style is changed now? Is it propagated down to the lists or only the new lists inherit that?
In the back-end, we will be using tables for storing style attributes and permission level(read only or editable). This table will basically contain all the "stylable" attributes with "default or predefined" values as contained in the mailing list table and one extra column for permissions.
Permissions should also consider if the user wants to make his new style public or keep it private. And should public styles be editable by anyone or just read-only?
One useful feature I can think of from the UI point of view is to be able to copy an existing style to create a new style and then present with the interface to customize the new style.
There will also be some back-end python code whose key function would be to read the attribute values from the styles table and when the user applies a style on a mailing list it will copy the attribute values from the style table to that particular mailing list's table.
This "back-end" code is usually a part of Mailman-Core which takes care of all the actual logic and mail processing.
Please do correct me if I am wrong somewhere. Also,I wish to seek your views on this approach.
Also tell me if I would need to develop a Command Line Interface(which I will love to develop) as well or only Web Interface would suffice?
I think an integration with Postorius would be sufficiently big for a Summer. We already have a command line interface for mailman that can be extended to add this functionality.
-- thanks, Abhilash Raj