Changeset 4373 for waeup/branches/ulif-rewrite/src
- Timestamp:
- 27 Jun 2009, 11:39:35 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/browser.txt
r4336 r4373 108 108 ... 109 109 110 Departments 111 =========== 112 113 Departments are stored in :class:`IFaculty` instances with their code 114 as key. Faculties therefore are also department containers. Faculties 115 provides an add-form to add new departments: 116 117 >>> browser.open('http://localhost/myuniversity/faculties/TF/add') 118 >>> print browser.contents 119 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 120 ...<span class="required">*</span><span>Name of Department</span> 121 ... 122 123 We fill in a new name for our new faculty:: 124 125 >>> ctrl = browser.getControl(name='form.title') 126 >>> ctrl.value = 'TestDept' 127 128 Furthermore we add a code (kind of abbreviation): 129 130 >>> browser.getControl(name='form.code').value = 'TD' 131 132 Finally we click on 'Add Department' to add the new thing:: 133 134 >>> browser.getControl('Add department').click() 135 136 We can view a department by browsing a URL like this:: 137 138 >>> browser.open('http://localhost/myuniversity/faculties/TF/TD') 139 140 Afterwards, the department should be visible: 141 142 >>> browser.open('http://localhost/myuniversity/faculties/TF') 143 >>> print browser.contents 144 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 145 ...<h2>Registered Departments:</h2> 146 ...<a href="http://localhost/myuniversity/faculties/TF/TD">TestDept</a> 147 ... 110 148 111 149 Data Center
Note: See TracChangeset for help on using the changeset viewer.