| 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, |
| 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) |