/[pac]/pac/PACDefault/ActionRecipient.py
ViewVC logotype

Diff of /pac/PACDefault/ActionRecipient.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by tvon, Sat Sep 27 16:52:37 2003 UTC revision 1.10 by tvon, Tue Sep 30 23:31:01 2003 UTC
# Line 68  schema = BaseSchema + Schema(( Line 68  schema = BaseSchema + Schema((
68          storage=PostgreSQLStorage(),          storage=PostgreSQLStorage(),
69          searchable=1,          searchable=1,
70          ),          ),
71      StringField('party',      StringField('political_party',
72          widget=StringWidget(label='Party'),          widget=SelectionWidget(label='Political Party'),
73            vocabulary='getPoliticalParties',
74          storage=PostgreSQLStorage(),          storage=PostgreSQLStorage(),
75          index="FieldIndex",          index="FieldIndex",
76          searchable=1,          searchable=1,
# Line 140  class ActionRecipient(TemplateMixin, Bas Line 141  class ActionRecipient(TemplateMixin, Bas
141      archetype_name = "Action Recipient"      archetype_name = "Action Recipient"
142      actions = TemplateMixin.actions      actions = TemplateMixin.actions
143    
144        def getPoliticalParties(self):
145            result = DisplayList()
146            try:
147                props = self.portal_properties.pac_properties.getProperty('political_parties')
148            except:
149                return DisplayList(())
150    
151            mylist = []
152    
153            for item in props:
154                mylist.append(item.split('|'))
155    
156            for item in mylist:
157                result.add(item[0], item[1])
158    
159            return result
160    
161  registerType(ActionRecipient)  registerType(ActionRecipient)

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26