parameters: (file)
docstring: function used by entry points into the AppServer to load the necessary
      import function to see site specific modules
  
      The following 2 lines should be included:
  
      from pyasm.web import get_site_import
      exec( get_site_import(__file__) )
docstring_summary: function used by entry points into the AppServer to load the necessary
      import function to see site specific modules
docstring_tokens: function used by entry points into the AppServer to load the necessary import function to see site specific modules
function: def get_site_import(file):
      '''function used by entry points into the AppServer to load the necessary
      import function to see site specific modules
  
      The following 2 lines should be included:
  
      from pyasm.web import get_site_import
      exec( get_site_import(__file__) )
      '''
      file = file.replace("\\","/")
      p = re.compile( r'\/(\w+)\/context\/' )
      m = p.search(file)
      if not m:
          raise Exception("Can't find context")
  
      context = m.groups()[0]
      if context == "":
          context = "default"
  
      if context in ['admin', 'default', 'template', 'unittest']:
          return "from tactic_sites.%s.modules import *" % context
      else:
          return "from sites.%s.modules import *" % context
function_tokens: def get_site_import ( file ) : file = file . replace ( "\\" , "/" ) p = re . compile ( r'\/(\w+)\/context\/' ) m = p . search ( file ) if not m : raise Exception ( "Can't find context" ) context = m . groups ( ) [ 0 ] if context == "" : context = "default" if context in [ 'admin' , 'default' , 'template' , 'unittest' ] : return "from tactic_sites.%s.modules import *" % context else : return "from sites.%s.modules import *" % context