- Timestamp:
- 18 Aug 2025, 06:25:21 (9 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/interfaces.py
r18067 r18156 46 46 from waeup.fceokene.applicants.schools_tpu import SCHOOLS_TPU 47 47 from waeup.fceokene.applicants.schools_utp import SCHOOLS_UTP 48 from waeup.fceokene.applicants.zones import ZONES_TPU 48 49 from waeup.fceokene.interfaces import MessageFactory as _ 49 50 … … 92 93 SCHOOLS_TPU[value][2],) 93 94 95 class TPUZoneSource(BasicSourceFactory): 96 """A source that delivers all kinds of TPU zones. 97 """ 98 def getValues(self): 99 sorted_items = sorted( 100 ZONES_TPU.items(), 101 key=lambda element: int(element[1][0].split()[1])) 102 return [item[0] for item in sorted_items] 103 104 def getToken(self, value): 105 return value 106 107 def getTitle(self, value): 108 if not ZONES_TPU.get(value, None): 109 return u"none-existent" 110 return u"%s: %s" % ( 111 ZONES_TPU[value][0], 112 ZONES_TPU[value][1],) 113 94 114 class UTPSchoolSource(BasicSourceFactory): 95 115 """A source that delivers all kinds of UTP schools. … … 192 212 ) 193 213 194 school_tpu = schema.Choice( 195 title = _(u'1st Choice TPZ and School'), 196 source = TPUSchoolSource(), 214 #school_tpu = schema.Choice( 215 # title = _(u'1st Choice TPZ and School'), 216 # source = TPUSchoolSource(), 217 # required = False, 218 # ) 219 220 zone_tpu = schema.Choice( 221 title = _(u'1st Choice TPZ'), 222 source = TPUZoneSource(), 197 223 required = False, 198 224 )
Note: See TracChangeset for help on using the changeset viewer.