Changeset 3537


Ignore:
Timestamp:
1 Jul 2008, 01:09:03 (16 years ago)
Author:
uli
Message:

Added CHANGES.txt.

Location:
waeup/branches/uli-cleanup
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/uli-cleanup/src/waeup/README.txt

    r3523 r3537  
    2424  u'Unnamed'
    2525
    26 Universities are basically also containers for faculties.
     26Universities are basically also containers for faculties, hostels and
     27students. Each of those types is stored in a different container::
    2728
    28 Faculties
    29 =========
     29  >>> 'students' in u.keys()
     30  True
    3031
    31 Faculties are containers for departments. They are intended to be
    32 managed by universities.
     32  >>> 'faculties' in u.keys()
     33  True
    3334
    34 We can create faculties easily::
     35  >>> 'hostels' in u.keys()
     36  True
    3537
    36   >>> from waeup.app import Faculty
    37   >>> f = Faculty()
    38   >>> f
    39   <waeup.app.Faculty object at 0x...>
    40 
    41 Also faculties want to be named::
    42 
    43   >>> f.name
    44   u'Unnamed Faculty'
    45 
    46 Departments
    47 ===========
    48 
  • waeup/branches/uli-cleanup/src/waeup/app.py

    r3530 r3537  
    33from zope.interface import Interface
    44from interfaces import IUniversity
    5 from setup import app_setup
    65from viewlets import MainArea
     6
     7from waeup.hostel import hostelcontainer
     8from waeup.students import studentcontainer
     9from waeup.university import facultycontainer
    710
    811class University(grok.Application, grok.Container):
     
    1215        super(University, self).__init__(**kw)
    1316        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
    1527
    1628class Content(grok.Viewlet):
Note: See TracChangeset for help on using the changeset viewer.