Changeset 6076 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 14 May 2011, 00:36:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r6075 r6076 4 4 ## Started on Sun Jan 16 15:30:01 2011 Uli Fouquet 5 5 ## $Id$ 6 ## 6 ## 7 7 ## Copyright (C) 2011 Uli Fouquet 8 8 ## This program is free software; you can redistribute it and/or modify … … 10 10 ## the Free Software Foundation; either version 2 of the License, or 11 11 ## (at your option) any later version. 12 ## 12 ## 13 13 ## This program is distributed in the hope that it will be useful, 14 14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ## GNU General Public License for more details. 17 ## 17 ## 18 18 ## You should have received a copy of the GNU General Public License 19 19 ## along with this program; if not, write to the Free Software … … 76 76 def getToken(self, value): 77 77 return value[0].lower() 78 78 79 79 def getTitle(self, value): 80 80 if value == 'm': … … 82 82 if value == 'f': 83 83 return 'female' 84 84 85 85 class ApplicantContainerProviderSource(BasicSourceFactory): 86 86 """A source offering all available applicants container types. … … 98 98 >>> my_applicants_container.container_title 99 99 'Pretty' 100 100 101 101 """ 102 102 def getValues(self): … … 137 137 """ 138 138 pass 139 139 140 140 141 141 class IApplicantsContainer(IWAeUPObject): … … 149 149 u'classattribute: description for type of container') 150 150 151 151 152 152 code = schema.TextLine( 153 153 title = u'Code', … … 156 156 required = True, 157 157 readonly = True, 158 ) 159 158 ) 159 160 160 provider = schema.Choice( 161 161 title = u'Applicants container type', … … 163 163 default = None, 164 164 source = ApplicantContainerProviderSource(), 165 ) 166 165 ) 166 167 167 title = schema.TextLine( 168 168 title = u'Title of the type of applicants stored here', … … 170 170 default = u'Untitled', 171 171 ) 172 172 173 173 description = schema.Text( 174 174 title = u'Human readable description in reST format', … … 211 211 212 212 Optionally archive the applicants. 213 213 214 214 If id is `None`, all applicants are archived. 215 215 … … 234 234 required = True, 235 235 readonly = False, 236 ) 236 ) 237 237 238 238 IApplicantsContainerAdd['code'].order = IApplicantsContainer['code'].order … … 427 427 ) 428 428 # XXX: Total score??? 429 429 430 430 # 431 431 # Application Data … … 511 511 ) 512 512 513 513 514 514 class IApplicant(IApplicantBaseData): 515 515 """An applicant. … … 686 686 required = False, 687 687 ) 688 688 689 689 # 690 690 # Application Data … … 714 714 ) 715 715 716 716 717 717 class IApplicantPrincipalInfo(IPrincipalInfo): 718 718 """Infos about principals that are applicants. … … 775 775 776 776 .. THE FOLLOWING SHOULD GO INTO SPHINX DOCS (and be tested) 777 777 778 778 Samples 779 779 ******* 780 780 781 781 Given, you had an IApplicantsContainer implementation somewhere 782 782 and you would like to make it findable on request, then you would … … 809 809 >>> p 810 810 <MyContainerProvider object at 0x...> 811 811 812 812 An applicants container would then be created like this: 813 813
Note: See TracChangeset for help on using the changeset viewer.