App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.tools.yaml_translator.AppYamlTranslatorForDevAppServer Class Reference
Inheritance diagram for google.appengine.tools.yaml_translator.AppYamlTranslatorForDevAppServer:
google.appengine.tools.yaml_translator.AppYamlTranslator

Public Member Functions

def __init__
 
def IncludedStaticUrls
 
def ComputeIncludedStaticUrls
 
def TranslateHandlers
 
def ErrorHandlerPath
 
- Public Member Functions inherited from google.appengine.tools.yaml_translator.AppYamlTranslator
def __init__
 
def GetYaml
 
def SanitizeForYaml
 
def TranslateBasicEntries
 
def TranslateAutomaticScaling
 
def TranslateBasicScaling
 
def TranslateManualScaling
 
def TranslatePrecompilationEnabled
 
def TranslateAdminConsolePages
 
def TranslateApiConfig
 
def TranslateApiVersion
 
def TranslatePagespeed
 
def TranslateVmSettings
 
def TranslateInboundServices
 
def TranslateErrorHandlers
 
def ErrorHandlerPath
 
def TranslateHandlers
 
def VerifyRequiredEntriesPresent
 

Public Attributes

 war_root
 
 static_urls
 
- Public Attributes inherited from google.appengine.tools.yaml_translator.AppYamlTranslator
 app_engine_web_xml
 
 web_xml
 
 static_files
 
 api_version
 

Detailed Description

Subclass of AppYamlTranslator specialized for the Dev App Server case.

The key difference is that static files are served directly from the war
directory, which means that the app.yaml patterns we define must cover
exactly those files in that directory hierarchy that are supposed to be static
while not covering any files that are not supposed to be static.

Attributes:
  war_root: the root directory of the war hierarchy.
  static_urls: a list of two-item tuples where the first item is a URL that
    should be served statically and the second item corresponds to the
    <include> element that caused that URL to be included.

Member Function Documentation

def google.appengine.tools.yaml_translator.AppYamlTranslatorForDevAppServer.ComputeIncludedStaticUrls (   self,
  static_urls,
  dirpath,
  url_prefix,
  files,
  includes_and_res,
  exclude_res 
)
Compute the URLs that should be resolved statically.

This recursive method is called for the war directory and every
subdirectory except the top-level WEB-INF directory. If we have arrived
at the directory <war-root>/foo/bar then dirpath will be <war-root>/foo/bar
and url_prefix will be /foo/bar.

Args:
  static_urls: a list to be filled with the result, two-item tuples where
the first item is a URL and the second is a parsed <include> element.
  dirpath: the path to the directory inside the war hierarchy that we have
reached at this point in the recursion.
  url_prefix: the URL prefix that we have reached at this point in the
recursion.
  files: the contents of the dirpath directory, minus the WEB-INF directory
if dirpath is the war directory itself.
  includes_and_res: a list of two-item tuples where the first item is a
parsed <include> element and the second item is a compiled regular
expression corresponding to the path= pattern from that element.
  exclude_res: a list of compiled regular expressions corresponding to the
path= patterns from <exclude> elements.
def google.appengine.tools.yaml_translator.AppYamlTranslatorForDevAppServer.IncludedStaticUrls (   self)
Returns the URLs that should be resolved statically for this app.

The result includes a URL for every file in the war hierarchy that is
covered by one of the <include> elements for <static-files> and not covered
by any of the <exclude> elements.

Returns:
  a list of two-item tuples where the first item is a URL that should be
  served statically and the second item corresponds to the <include>
  element that caused that URL to be included.

The documentation for this class was generated from the following file: