Ignore:
Timestamp:
28 Aug 2012, 08:13:21 (12 years ago)
Author:
Henrik Bettermann
Message:

The year_range function was only used in applicants. Extend academic session range properly.

File:
1 edited

Legend:

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

    r9047 r9115  
    1818"""Interfaces of the university application package.
    1919"""
     20from datetime import datetime
    2021from grokcore.content.interfaces import IContainer
    2122from zc.sourcefactory.contextual import BasicContextualSourceFactory
     
    2829from waeup.kofa.schema import TextLineChoice, FormattedDate
    2930from waeup.kofa.interfaces import (
    30     IKofaObject, year_range, validate_email,
     31    IKofaObject, validate_email,
    3132    SimpleKofaVocabulary)
    3233from waeup.kofa.interfaces import MessageFactory as _
     
    4041
    4142_marker = object() # a marker different from None
     43
     44def year_range():
     45    curr_year = datetime.now().year
     46    return range(curr_year - 2, curr_year + 5)
    4247
    4348class RegNumInSource(ValidationError):
Note: See TracChangeset for help on using the changeset viewer.