Last change
on this file since 3833 was
3833,
checked in by uli, 16 years ago
|
Update tests.
|
-
Property svn:eol-style set to
native
|
File size:
1.4 KB
|
Rev | Line | |
---|
[3523] | 1 | The waeup package |
---|
[3521] | 2 | ******************** |
---|
| 3 | |
---|
| 4 | :Test-Layer: unit |
---|
| 5 | |
---|
| 6 | A portal software for student registration. |
---|
| 7 | |
---|
[3833] | 8 | Prerequisites |
---|
| 9 | ============= |
---|
| 10 | |
---|
| 11 | Before we can work with the environment, we have to register all the |
---|
| 12 | utilities, adapters, etc. We grok the `waeup` package to do that:: |
---|
| 13 | |
---|
| 14 | >>> import grok |
---|
| 15 | >>> grok.testing.grok('waeup') |
---|
| 16 | |
---|
[3521] | 17 | Universities |
---|
| 18 | ============ |
---|
| 19 | |
---|
| 20 | ``University`` objects are the base of all functionality provided by |
---|
| 21 | this package. They contain all facilities of a university. |
---|
| 22 | |
---|
| 23 | We can easily create universities:: |
---|
| 24 | |
---|
[3523] | 25 | >>> from waeup.app import University |
---|
[3521] | 26 | >>> u = University() |
---|
| 27 | >>> u |
---|
[3523] | 28 | <waeup.app.University object at 0x...> |
---|
[3521] | 29 | |
---|
| 30 | Universities have a name. |
---|
| 31 | |
---|
| 32 | >>> u.name |
---|
| 33 | u'Unnamed' |
---|
| 34 | |
---|
[3833] | 35 | Universities are basically also containers for faculties, students and |
---|
| 36 | hostels:: |
---|
[3521] | 37 | |
---|
[3833] | 38 | >>> u['faculties'] |
---|
| 39 | <waeup.university.facultycontainer.FacultyContainer object at 0x...> |
---|
| 40 | |
---|
| 41 | >>> u['students'] |
---|
| 42 | <waeup.students.studentcontainer.StudentContainer object at 0x...> |
---|
| 43 | |
---|
| 44 | >>> u['hostels'] |
---|
| 45 | <waeup.hostel.hostelcontainer.HostelContainer object at 0x...> |
---|
| 46 | |
---|
[3521] | 47 | Faculties |
---|
| 48 | ========= |
---|
| 49 | |
---|
| 50 | Faculties are containers for departments. They are intended to be |
---|
| 51 | managed by universities. |
---|
| 52 | |
---|
| 53 | We can create faculties easily:: |
---|
| 54 | |
---|
[3833] | 55 | >>> from waeup.university.faculty import Faculty |
---|
[3521] | 56 | >>> f = Faculty() |
---|
| 57 | >>> f |
---|
[3833] | 58 | <waeup.university.faculty.Faculty object at 0x...> |
---|
[3521] | 59 | |
---|
| 60 | Also faculties want to be named:: |
---|
| 61 | |
---|
| 62 | >>> f.name |
---|
| 63 | u'Unnamed Faculty' |
---|
| 64 | |
---|
| 65 | Departments |
---|
| 66 | =========== |
---|
| 67 | |
---|
Note: See
TracBrowser for help on using the repository browser.