Changeset 6109 for main/waeup.sirp/trunk
- Timestamp:
- 16 May 2011, 05:52:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r6101 r6109 67 67 application_types_vocab = SimpleWAeUPVocabulary(*APPLICATION_TYPES) 68 68 69 class FutureYearsSource(BasicSourceFactory): 70 """XXX: We will soon add an explanation why we don't use a simple 71 static list returned from a two-line function here. 72 """ 73 def getValues(self): 74 curr_year = datetime.now().year 75 return range(curr_year - 2, curr_year + 5) 69 def yeararrange(): 70 curr_year = datetime.now().year 71 return range(curr_year - 2, curr_year + 5) 76 72 77 73 class GenderSource(BasicSourceFactory): … … 188 184 required = True, 189 185 default = None, 190 source = FutureYearsSource(),186 values = yeararrange(), 191 187 readonly = True, 192 188 ) … … 269 265 required = True, 270 266 default = None, 271 source = FutureYearsSource(),267 values = yeararrange(), 272 268 readonly = False, 273 269 )
Note: See TracChangeset for help on using the changeset viewer.