Changeset 4981 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 3 Feb 2010, 08:16:32 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt
r4933 r4981 487 487 488 488 489 Fixing the pending file 490 ----------------------- 491 492 We 'edit' the pending file (setting code to ``FAC5`` and title 493 appropriately, and removing the --ERROR-- column) and finish the 494 import this way: 495 496 >>> open(dc_path + '/newfaculties_zope.mgr.pending.csv', 'wb').write( 497 ... """title_prefix,--IGNORE--,code,title 498 ... faculty,static,FAC5,Faculty 5 499 ... """) 500 501 Step 1: start batch processing: 502 503 >>> browser.open('http://localhost/app/datacenter') 504 >>> browser.getLink('Batch processing').click() 505 >>> button = lookup_submit_value( 506 ... 'select', 'newfaculties_zope.mgr.pending.csv', browser) 507 >>> button.click() 508 509 Step 2: select a processor and mode: 510 511 >>> importerselect = browser.getControl(name='importer') 512 >>> importerselect.getControl('Faculty importer').selected = True 513 >>> modeselect = browser.getControl(name='mode') 514 >>> modeselect.getControl(value='create').selected = True 515 >>> browser.getControl('Proceed to step 3...').click() 516 517 Step 3/4: Fix headerlines and import: 518 519 As there should be no problem with the headers, we can immediately 520 perfom the import: 521 522 >>> browser.getControl('Perform import...').click() 523 524 This time everything should work: 525 526 >>> print browser.contents 527 <!DOCTYPE html PUBLIC... 528 ... 529 ...Successfully processed 1 rows... 530 ... 531 532 >>> sorted(os.listdir(dc_path)) 533 ['finished', 'logs', 'unfinished'] 534 535 >>> os.listdir(dc_path + '/unfinished') 536 [] 537 538 >>> sorted(os.listdir(dc_path + '/finished')) 539 ['certificates_zope.mgr.csv', ..., 'newfaculties_zope.mgr.csv', 540 'newfaculties_zope.mgr.finished.csv'] 541 542 489 543 Clean up: 490 544
Note: See TracChangeset for help on using the changeset viewer.