Ignore:
Timestamp:
15 May 2011, 01:06:16 (14 years ago)
Author:
uli
Message:

Normally, we import datetime from datetime.

File:
1 edited

Legend:

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

    r6093 r6094  
    11"""Vocabularies and sources for the academics section.
    22"""
    3 
     3from datetime import datetime
    44from waeup.sirp.interfaces import SimpleWAeUPVocabulary
    55from zc.sourcefactory.basic import BasicSourceFactory
     
    1010    from zope.app.catalog.interfaces import ICatalog
    1111from zope.component import getUtility
    12 import datetime
     12
    1313
    1414inst_types = SimpleWAeUPVocabulary(
     
    8383    """
    8484    def getValues(self):
    85         cy = datetime.datetime.now().year
    86         return [x for x in range(cy-2,cy+5)]
     85        curr_year = datetime.now().year
     86        return [x for x in range(curr_year - 2, curr_year + 5)]
    8787
    8888    def getToken(self, value):
Note: See TracChangeset for help on using the changeset viewer.