Changeset 3537
- Timestamp:
- 1 Jul 2008, 01:09:03 (17 years ago)
- Location:
- waeup/branches/uli-cleanup
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/uli-cleanup/src/waeup/README.txt
r3523 r3537 24 24 u'Unnamed' 25 25 26 Universities are basically also containers for faculties. 26 Universities are basically also containers for faculties, hostels and 27 students. Each of those types is stored in a different container:: 27 28 28 Faculties 29 ========= 29 >>> 'students' in u.keys() 30 True 30 31 31 Faculties are containers for departments. They are intended to be 32 managed by universities. 32 >>> 'faculties' in u.keys() 33 True 33 34 34 We can create faculties easily:: 35 >>> 'hostels' in u.keys() 36 True 35 37 36 >>> from waeup.app import Faculty37 >>> f = Faculty()38 >>> f39 <waeup.app.Faculty object at 0x...>40 41 Also faculties want to be named::42 43 >>> f.name44 u'Unnamed Faculty'45 46 Departments47 ===========48 -
waeup/branches/uli-cleanup/src/waeup/app.py
r3530 r3537 3 3 from zope.interface import Interface 4 4 from interfaces import IUniversity 5 from setup import app_setup6 5 from viewlets import MainArea 6 7 from waeup.hostel import hostelcontainer 8 from waeup.students import studentcontainer 9 from waeup.university import facultycontainer 7 10 8 11 class University(grok.Application, grok.Container): … … 12 15 super(University, self).__init__(**kw) 13 16 self.name = name 14 app_setup.setup(self) 17 18 sc = studentcontainer.StudentContainer() 19 self["students"] = sc 20 21 hc = hostelcontainer.HostelContainer() 22 self["hostels"] = hc 23 24 fc = facultycontainer.FacultyContainer() 25 self["faculties"] = fc 26 15 27 16 28 class Content(grok.Viewlet):
Note: See TracChangeset for help on using the changeset viewer.