Changeset 4279 for waeup/branches/ulif-rewrite
- Timestamp:
- 13 Jun 2009, 14:15:51 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/university/facultycontainer.py
r4269 r4279 144 144 # object defined which refer to the CSV file and the container. 145 145 for row in self.csvfile.getData(): 146 146 147 new_item = createObject(u'waeup.Course') 148 147 149 faculty_code = row['faculty'] 148 150 faculty = self.receiver[faculty_code] 149 del row[faculty_code] 151 del row['faculty'] 152 150 153 dept_code = row['department'] 151 154 dept = faculty[dept_code] 152 del row[dept_code] 155 del row['department'] 156 153 157 for key, val in row.items(): 154 158 setattr(new_item, key, val) 155 dept.addCourse(new_item) 156 return 157 159 dept.courses.addCourse(new_item) 160 return 158 161 159 162
Note: See TracChangeset for help on using the changeset viewer.