- Timestamp:
- 9 Feb 2009, 21:25:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/hostel/hostelcontainer.py
r3829 r3937 1 1 import grok 2 2 3 from waeup.basecontainer import BaseContainer4 3 from waeup.interfaces import IHostelContainer 4 from waeup.viewlets import MainArea, Index 5 5 from hostel import Hostel 6 6 7 class HostelContainer( BaseContainer):7 class HostelContainer(grok.Container): 8 8 9 9 grok.implements(IHostelContainer) 10 11 name = u"Hostels" 12 childClass = Hostel 10 grok.require('waeup.manageUniversity') 13 11 12 # A simple counter for ids. 13 next_id = 0L 14 15 # We register HostelContainer as a utility. This way we can 16 # call getUtility(IHostelContainer) from anywhere in the code and 17 # get an instance of HostelContainer (without importing it). 14 18 grok.global_utility(HostelContainer, provides=IHostelContainer) 19
Note: See TracChangeset for help on using the changeset viewer.