Changeset 6097 for main/waeup.sirp


Ignore:
Timestamp:
15 May 2011, 01:25:52 (13 years ago)
Author:
uli
Message:

Move 'future year source'. It is not used in university module at all.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py

    r6096 r6097  
    3434from waeup.sirp.image.image import WAeUPImageFile
    3535from waeup.sirp.interfaces import IWAeUPObject, SimpleWAeUPVocabulary
    36 from waeup.sirp.university.vocabularies import FutureYearsSource
    3736
    3837
     
    6766application_types_vocab = SimpleWAeUPVocabulary(*APPLICATION_TYPES)
    6867
     68class FutureYearsSource(BasicSourceFactory):
     69    """XXX: need docs
     70    """
     71    def getValues(self):
     72        curr_year = datetime.now().year
     73        return [x for x in range(curr_year - 0, curr_year + 5)]
     74
     75    def getToken(self, value):
     76        return str(value)
     77
     78    def getTitle(self, value):
     79      return str(value)
     80
    6981class GenderSource(BasicSourceFactory):
    7082    """A gender source delivers basically a mapping
  • main/waeup.sirp/trunk/src/waeup/sirp/university/vocabularies.py

    r6095 r6097  
    8383    def getValues(self):
    8484        curr_year = datetime.now().year
    85         return [x for x in range(curr_year - 2, curr_year + 5)]
     85        return [x for x in range(curr_year - 0, curr_year + 5)]
    8686
    8787    def getToken(self, value):
Note: See TracChangeset for help on using the changeset viewer.