"""This is the base class for Cheetah templates used with Aquarium."""
__docformat__ = "restructuredtext"
# Created: Mon Feb 16 15:26:30 PST 2004
# Author: Shannon -jj Behrens
# Email: jjinux@users.sourceforge.net
#
# Copyright (c) Shannon -jj Behrens. All rights reserved.
from Cheetah.Template import Template
from AquariumClass import AquariumClass
class AquariumTemplate(Template, AquariumClass):
"""This is the base class for Cheetah templates used with Aquarium.
This is simply a Cheetah template with aquarium.util.AquariumClass_ mixed
in. The Cheetah template will have the ``Context`` in its ``searchList``.
Hence, ``self._ctx.foo`` can simply be referred to as ``$foo``. That's it!
.. _aquarium.util.AquariumClass:
aquarium.util.AquariumClass.AquariumClass-class.html
"""
def __init__(self, ctx):
"""Initialize both of the subclasses.
You should not override this method. Extend it instead.
"""
Template.__init__(self, searchList=[ctx])
AquariumClass.__init__(self, ctx)
|