Changeset 13442 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 12 Nov 2015, 06:15:44 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/hostels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py
r13346 r13442 29 29 NOT_OCCUPIED) 30 30 31 # Define a validation method for sort ids 32 class NotASortId(schema.ValidationError): 33 __doc__ = u"Invalid sort_id" 34 35 def validate_sort_id(value): 36 if not value < 100: 37 raise NotASortId(value) 38 return True 39 31 40 class IHostelsContainer(IKofaObject): 32 41 """A container for hostel objects. … … 102 111 required = True, 103 112 default = 10, 113 constraint=validate_sort_id, 104 114 ) 105 115 -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/sample_hostel_data.csv
r13346 r13442 8 8 [],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",['G'],[],1,block-g-down-hostel,Block G Down Hostel,32,80,regular 9 9 [],"['A', 'B']","['D', 'E']",['F'],['C'],[],"['A', 'B']",1,hall-a,Hall A,44,90,regular 10 [],"['A', 'B']","['D', 'E']",['F'],['C'],[],"['C', 'D']",1,hall-b,Hall B,44, 100,regular10 [],"['A', 'B']","['D', 'E']",['F'],['C'],[],"['C', 'D']",1,hall-b,Hall B,44,99,regular 11 11 [],[],[],[],[],[],['A'],1,stores-32,Stores 32,16,10,regular
Note: See TracChangeset for help on using the changeset viewer.