On Jul 01, 2012, at 02:54 PM, Danci Emanuel wrote: >Secondly, I tried to modify the list attributes by adding the following: > >dlists_enabled = Attribute("""Is the Dynamic sublist feature enabled?""") - >"IMailingList" interface (/interfaces/mailinglist.py) dlists_enabled = Bool() >- "MailingList" class (/model/mailinglist.py)
If you want this value to persist, it must also be added to the SQL tables, e.g. sqlite.sql and/or postgres.sql. This will make your schema incompatible with upstream Mailman, and there will be a better way to extend the default schema in the future, but for now, this should be enough to get you going again. Of course, it's not necessary to store your data in the primary database. Once you've got a REST API for your stuff, you can really map this to any backend storage you want. >dlists_enabled = GetterSetter(as_boolean) - to the ATTRIBUTES dict from >/rest/configuration.py > >mlist.dlists_enabled = True - in the "apply" method from "DefaultStyle" class >(/styles/default.py) > >Obviously I did something wrong, or I did not add all the necessary changes >because when I try to create a new lists that has the dlists feature enabled, >I get the HTTP Error 400: > >HTTP Error 400: Unknown attribute: dlists_enabled That error gets thrown on line 233 of configuration.py and it only happens if the attribute name isn't found in ATTRIBUTES. Probably the best way to debug this is to set a break point in get_configuration() and step through it when self._attribute == 'dlist_enabled'. Cheers, -Barry
signature.asc
Description: PGP signature
_______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9