Ignore:
Timestamp:
14 May 2011, 14:19:59 (14 years ago)
Author:
Henrik Bettermann
Message:

Adding some attributes to ApplicantsContainer?. Generate title and code of containers automatically.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/university/vocabularies.py

    r5988 r6087  
    1010    from zope.app.catalog.interfaces import ICatalog
    1111from zope.component import getUtility
     12import datetime
    1213
    1314inst_types = SimpleWAeUPVocabulary(
     
    7475        return "%s - %s" % (value.code, value.title[:64])
    7576       
     77       
     78       
     79class FutureYearsSource(BasicSourceFactory):
     80    """
     81    """
     82    def getValues(self):
     83        cy = datetime.datetime.now().year
     84        return [x for x in range(cy-2,cy+5)]
     85
     86    def getToken(self, value):
     87        return str(value)
     88
     89    def getTitle(self, value):
     90      return str(value)     
     91       
    7692                                                             
Note: See TracChangeset for help on using the changeset viewer.