Changeset 6100
- Timestamp:
- 15 May 2011, 01:41:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/university/vocabularies.py
r6097 r6100 1 1 """Vocabularies and sources for the academics section. 2 2 """ 3 from datetime import datetime4 3 from zc.sourcefactory.basic import BasicSourceFactory 5 4 try: … … 75 74 def getTitle(self, value): 76 75 return "%s - %s" % (value.code, value.title[:64]) 77 78 79 80 class FutureYearsSource(BasicSourceFactory):81 """XXX: need docs82 """83 def getValues(self):84 curr_year = datetime.now().year85 return [x for x in range(curr_year - 0, curr_year + 5)]86 87 def getToken(self, value):88 return str(value)89 90 def getTitle(self, value):91 return str(value)
Note: See TracChangeset for help on using the changeset viewer.