/[opental]/opental/OpenPT/OpenPTBase.py
ViewVC logotype

Diff of /opental/OpenPT/OpenPTBase.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by lalo, Thu Jan 30 16:32:28 2003 UTC revision 1.6 by lalo, Mon Feb 3 16:01:55 2003 UTC
# Line 57  class Rtd(RestrictedDTML, TemplateDict): Line 57  class Rtd(RestrictedDTML, TemplateDict):
57    
58  def call_with_ns(f, ns, arg=1):  def call_with_ns(f, ns, arg=1):
59      td = Rtd()      td = Rtd()
60      td.this = ns['here']      td.this = ns['context']
61      td._push(ns['request'])      td._push(ns['request'])
62      td._push(InstanceDict(td.this, td))      td._push(InstanceDict(td.this, td))
63      td._push(ns)      td._push(ns)
# Line 269  class OpenPageTemplate(Script, Historica Line 269  class OpenPageTemplate(Script, Historica
269      func_defaults = None      func_defaults = None
270      func_code = FuncCode((), 0)      func_code = FuncCode((), 0)
271    
272      _default_bindings = {'name_context': 'here',      _default_bindings = {'name_context': 'context',
273                           'name_container': 'container',                           'name_container': 'container',
274                           'name_m_self': 'template',                           'name_m_self': 'template',
275                           'name_subpath': 'traverse_subpath',                           'name_subpath': 'traverse_subpath',
# Line 497  class OpenPageTemplate(Script, Historica Line 497  class OpenPageTemplate(Script, Historica
497          security=getSecurityManager()          security=getSecurityManager()
498          bound_names['user'] = security.getUser()          bound_names['user'] = security.getUser()
499    
500            # backward compatibility; this is scheduled to be deprecated in a few months
501            try:
502                bound_names['here'] = bound_names['context']
503            except KeyError:
504                # there isn't a 'context' binding yet
505                self.ZBindings_edit(self._default_bindings)
506                bound_names['context'] = bound_names['here']
507    
508          # Retrieve the value from the cache.          # Retrieve the value from the cache.
509          keyset = {}          keyset = {}
510          if self.ZCacheable_isCachingEnabled():          if self.ZCacheable_isCachingEnabled():
511              for n in ('traverse_subpath', 'options'):              for n in ('traverse_subpath', 'options'):
512                  keyset[n] = bound_names[n]                  keyset[n] = bound_names[n]
513              keyset['here'] = bound_names['here'].absolute_url()              keyset['context'] = bound_names['context'].absolute_url()
514              result = self.ZCacheable_get(keywords=bound_names)              result = self.ZCacheable_get(keywords=bound_names)
515              if result is not None:              if result is not None:
516                  # Got a cached value.                  # Got a cached value.

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26