- Timestamp:
- 31 May 2011, 07:41:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r6254 r6255 77 77 *sorted([(x[1],x[0]) for x in LGAS])) 78 78 79 def year_range(): 80 curr_year = datetime.now().year 81 return range(curr_year - 2, curr_year + 5) 82 83 def entry_sessions(): 84 curr_year = datetime.now().year 85 year_range = range(curr_year - 5, curr_year + 2) 86 return [('%s/%s' % (year,year+1), '%s' % year) for year in year_range] 87 88 entry_session_vocab = SimpleWAeUPVocabulary(*entry_sessions()) 89 79 90 class CertificateSource(BasicContextualSourceFactory): 80 91 """A certificate source delivers all certificates provided … … 107 118 key=lambda value: value.code) 108 119 109 def year_range():110 curr_year = datetime.now().year111 return range(curr_year - 2, curr_year + 5)112 113 120 class GenderSource(BasicSourceFactory): 114 121 """A gender source delivers basically a mapping … … 431 438 readonly = True, 432 439 ) 433 screening_score = schema. TextLine(440 screening_score = schema.Int( 434 441 title = u'Screening Score', 435 442 required = False, … … 445 452 required = False, 446 453 ) 447 entry_session = schema. TextLine(448 # XXX: should be choice454 entry_session = schema.Choice( 455 source = entry_session_vocab, 449 456 title = u'Entry Session', 450 457 required = False, … … 475 482 omit fields. This has to be done in the respective form page. 476 483 """ 477 screening_score = schema. TextLine(484 screening_score = schema.Int( 478 485 title = u'Screening Score', 479 486 required = False,
Note: See TracChangeset for help on using the changeset viewer.