hi, For the storage of list we will have table for list styles and when the admin creates a new list he/she will edit some attributes of particular list. By attribute I mean the options under each mailing list style like announce list have "allow list post". Admin can change there values. The style table will have all the attributes(same attributes that are listed in mailing list table) in column but the values of attributes that user will change will be stored in the table and rest values will be null. With improving the "apply" method for styles we can over write the present settings of the mailing list. I hope this is making sense to you ?
I will have table for style which will be having only changed attributes in it and rest of the attributes will be null. For example if admin has changed the attribute "send_welcome_message" under discussion and other attribute like "advertise" under public list then these two attributes with their values defined by admin will be stores under the list style name and rest all the attributes which have been there in the mailinglist table will be null for the list style table. Now by using apply function on list style table the values of attributes will be overwritten on the mailing list table when admin apply that list.
Only admin will be able to change the settings and by having user section I mean we have to specify the admin of each style so that at time of showing present styles for a particular admin we will fetch only styles with that admin name from the style table, as we don't want other (admins) to change saved styles for particular admin. That is why admin field is essential in the style table.
Thanks,
Prakhar Joshi DA-IICT,Gandhinagar
On Fri, Mar 20, 2015 at 9:14 AM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
prakhar joshi writes:
what if we create separate tables for each class in the mailman/src/mailman/styles/base.py and store the name and their attributes in it with user_name with it.
Who are these "users" (subscribers? admins?) and why do you want to associate styles with users? Please use more descriptive terms unless you really need to describe something generic. But here IIRC the styles are for lists, and therefore the relevant users are list admins. However, why would a style be associated with a list admin? The same admin might have announce lists and discussion lists as well as anonymous lists, and so on.