Changeset 3937


Ignore:
Timestamp:
9 Feb 2009, 21:25:00 (16 years ago)
Author:
uli
Message:

Make hostelcontainer more grok-like.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/hostel/hostelcontainer.py

    r3829 r3937  
    11import grok
    22
    3 from waeup.basecontainer import BaseContainer
    43from waeup.interfaces import IHostelContainer
     4from waeup.viewlets import MainArea, Index
    55from hostel import Hostel
    66
    7 class HostelContainer(BaseContainer):
     7class HostelContainer(grok.Container):
    88
    99    grok.implements(IHostelContainer)
    10    
    11     name = u"Hostels"
    12     childClass = Hostel
     10    grok.require('waeup.manageUniversity')
    1311
     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).
    1418grok.global_utility(HostelContainer, provides=IHostelContainer)
     19
Note: See TracChangeset for help on using the changeset viewer.