Changeset 4276 for waeup/branches/ulif-rewrite/src
- Timestamp:
- 13 Jun 2009, 12:00:22 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/browser.txt
r4275 r4276 157 157 >>> os.listdir(uploadpath) 158 158 [] 159 160 161 Uploading files 162 --------------- 159 163 160 164 Now we can upload files. Most interesting files might be CSV files, … … 195 199 ['myfaculties.csv'] 196 200 201 202 Importing a CSV file 203 -------------------- 204 205 As the uploaded file conforms with what we expect from a faculty-CSV 206 file, we can import it. To do this we click the ``Import CSV data`` 207 link: 208 209 >>> browser.open('http://localhost/myuniversity/datacenter') 210 >>> browser.getLink('Import CSV data').click() 211 212 Here we get all importable files listed: 213 214 >>> print browser.contents 215 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 216 ...The following files are available for import:... 217 ...myfaculties.csv... 218 ...Faculty Importer... 219 ... 220 221 As we can see, the files are analyzed on-the-fly so the system can 222 tell us what kind of importer is available for each. 223 224 We do import the faculty file by clicking on ``Import!``: 225 226 >>> facimport = browser.getControl('Import!') 227 >>> facimport.click() 228 229 >>> print browser.contents 230 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 231 ...Successfully imported: myfaculties.csv... 232 ... 233 234 We just created two new faculties: 235 236 >>> browser.open('http://localhost/myuniversity/faculties/') 237 >>> print browser.contents 238 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 239 ...<h2>Registered faculties:</h2>... 240 ...Arts... 241 ...Sciences... 242 ... 243 197 244 Clean up: 198 245
Note: See TracChangeset for help on using the changeset viewer.