parameters: (self, bound_names, args, kw)
return_statement: return result
docstring: Call a FSPageTemplate
docstring_summary: Call a FSPageTemplate
docstring_tokens: Call a FSPageTemplate
function: def _exec(self, bound_names, args, kw):
          """Call a FSPageTemplate"""
          try:
              response = self.REQUEST.RESPONSE
          except AttributeError:
              response = None
          # Read file first to get a correct content_type default value.
          self._updateFromFS()
  
          if not kw.has_key('args'):
              kw['args'] = args
          bound_names['options'] = kw
  
          security=getSecurityManager()
          bound_names['user'] = security.getUser().getIdOrUserName()
  
          # Retrieve the value from the cache.
          keyset = None
          if self.ZCacheable_isCachingEnabled():
              # Prepare a cache key.
              keyset = {
                        # Why oh why?
                        # All this code is cut and paste
                        # here to make sure that we
                        # dont call _getContext and hence can't cache
                        # Annoying huh?
                        'here': self.aq_parent.getPhysicalPath(),
                        'bound_names': bound_names}
              result = self.ZCacheable_get(keywords=keyset)
              if result is not None:
                  # Got a cached value.
                  return result
  
          # Execute the template in a new security context.
          security.addContext(self)
          try:
              result = self.pt_render(extra_context=bound_names)
              if keyset is not None:
                  # Store the result in the cache.
                  self.ZCacheable_set(result, keywords=keyset)
              return result
          finally:
              security.removeContext(self)
  
          return result
function_tokens: def _exec ( self , bound_names , args , kw ) : try : response = self . REQUEST . RESPONSE except AttributeError : response = None # Read file first to get a correct content_type default value. self . _updateFromFS ( ) if not kw . has_key ( 'args' ) : kw [ 'args' ] = args bound_names [ 'options' ] = kw security = getSecurityManager ( ) bound_names [ 'user' ] = security . getUser ( ) . getIdOrUserName ( ) # Retrieve the value from the cache. keyset = None if self . ZCacheable_isCachingEnabled ( ) : # Prepare a cache key. keyset = { # Why oh why? # All this code is cut and paste # here to make sure that we # dont call _getContext and hence can't cache # Annoying huh? 'here' : self . aq_parent . getPhysicalPath ( ) , 'bound_names' : bound_names } result = self . ZCacheable_get ( keywords = keyset ) if result is not None : # Got a cached value. return result # Execute the template in a new security context. security . addContext ( self ) try : result = self . pt_render ( extra_context = bound_names ) if keyset is not None : # Store the result in the cache. self . ZCacheable_set ( result , keywords = keyset ) return result finally : security . removeContext ( self ) return result