Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 1049:b9988e118055
moved
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 05 Sep 2002 00:37:09 +0000 |
| parents | c28603c9f831 |
| children | a0c7df67dd9c |
comparison
equal
deleted
inserted
replaced
| 1048:1250251f2793 | 1049:b9988e118055 |
|---|---|
| 14 try: | 14 try: |
| 15 import StructuredText | 15 import StructuredText |
| 16 except ImportError: | 16 except ImportError: |
| 17 StructuredText = None | 17 StructuredText = None |
| 18 | 18 |
| 19 # Make sure these modules are loaded | 19 # bring in the templating support |
| 20 # I need these to run PageTemplates outside of Zope :( | 20 from roundup.cgi.PageTemplates import PageTemplate |
| 21 # If we're running in a Zope environment, these modules will be loaded | 21 from roundup.cgi.PageTemplates.Expressions import getEngine |
| 22 # already... | 22 from roundup.cgi.TAL.TALInterpreter import TALInterpreter |
| 23 if not sys.modules.has_key('zLOG'): | 23 from roundup.cgi import ZTUtils |
| 24 import zLOG | |
| 25 sys.modules['zLOG'] = zLOG | |
| 26 if not sys.modules.has_key('MultiMapping'): | |
| 27 import MultiMapping | |
| 28 sys.modules['MultiMapping'] = MultiMapping | |
| 29 if not sys.modules.has_key('ComputedAttribute'): | |
| 30 import ComputedAttribute | |
| 31 sys.modules['ComputedAttribute'] = ComputedAttribute | |
| 32 if not sys.modules.has_key('ExtensionClass'): | |
| 33 import ExtensionClass | |
| 34 sys.modules['ExtensionClass'] = ExtensionClass | |
| 35 if not sys.modules.has_key('Acquisition'): | |
| 36 import Acquisition | |
| 37 sys.modules['Acquisition'] = Acquisition | |
| 38 | |
| 39 # now it's safe to import PageTemplates, TAL and ZTUtils | |
| 40 from PageTemplates import PageTemplate | |
| 41 from PageTemplates.Expressions import getEngine | |
| 42 from TAL.TALInterpreter import TALInterpreter | |
| 43 import ZTUtils | |
| 44 | 24 |
| 45 # XXX WAH pagetemplates aren't pickleable :( | 25 # XXX WAH pagetemplates aren't pickleable :( |
| 46 #def getTemplate(dir, name, classname=None, request=None): | 26 #def getTemplate(dir, name, classname=None, request=None): |
| 47 # ''' Interface to get a template, possibly loading a compiled template. | 27 # ''' Interface to get a template, possibly loading a compiled template. |
| 48 # ''' | 28 # ''' |
