Changeset 9115 for main/waeup.kofa/trunk/src
- Timestamp:
- 28 Aug 2012, 08:13:21 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r9047 r9115 18 18 """Interfaces of the university application package. 19 19 """ 20 from datetime import datetime 20 21 from grokcore.content.interfaces import IContainer 21 22 from zc.sourcefactory.contextual import BasicContextualSourceFactory … … 28 29 from waeup.kofa.schema import TextLineChoice, FormattedDate 29 30 from waeup.kofa.interfaces import ( 30 IKofaObject, year_range,validate_email,31 IKofaObject, validate_email, 31 32 SimpleKofaVocabulary) 32 33 from waeup.kofa.interfaces import MessageFactory as _ … … 40 41 41 42 _marker = object() # a marker different from None 43 44 def year_range(): 45 curr_year = datetime.now().year 46 return range(curr_year - 2, curr_year + 5) 42 47 43 48 class RegNumInSource(ValidationError): -
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r9114 r9115 65 65 SimpleTerm(value, value, title) for title, value in terms]) 66 66 67 def year_range():68 curr_year = datetime.now().year69 return range(1995, curr_year + 5)70 71 67 def academic_sessions(): 72 68 curr_year = datetime.now().year 73 year_range = range( curr_year - 15, curr_year + 2)69 year_range = range(1995, curr_year + 2) 74 70 return [('%s/%s' % (year,year+1), year) for year in year_range] 75 71
Note: See TracChangeset for help on using the changeset viewer.