Package gavo :: Package svcs :: Module common
[frames] | no frames]

Module common

source code

Common functions and classes for services and cores.

Classes
  Error
  BadMethod
raised to generate an HTTP 405 response.
  UnknownURI
raised to generate an HTTP 404 response.
  ForbiddenURI
raised to generate an HTTP 403 response.
  Authenticate
raised to initiate an authentication request.
  RedirectBase
  WebRedirect
raised to redirect a user agent to a different resource (HTTP 301).
  SeeOther
raised to redirect a user agent to a different resource (HTTP 303).
  Found
raised to redirect a user agent to a different resource (HTTP 302).
  QueryMeta
A class keeping information on the query environment.
Functions
 
parseServicePath(serviceParts)
returns a tuple of resourceDescriptor, serviceName.
source code
 
getTemplatePath(key)
see loadSystemTemplate.
source code
 
loadSystemTemplate(key)
returns a nevow template for system pages from key.
source code
Variables
  emptyQueryMeta = {'direction': 'ASC', 'dbLimit': 100, 'format'...
  __package__ = 'gavo.svcs'
Function Details

parseServicePath(serviceParts)

source code 

returns a tuple of resourceDescriptor, serviceName.

A serivce id consists of an inputsDir-relative path to a resource descriptor, a slash, and the name of a service within this descriptor.

This function returns a tuple of inputsDir-relative path and service name. It raises a gavo.Error if sid has an invalid format. The existence of the resource or the service are not checked.

loadSystemTemplate(key)

source code 

returns a nevow template for system pages from key.

path is interpreted as relative to gavo_root/web/templates (first) and package internal (last). If no template is found, None is returned (this harmonizes with the fallback in CustomTemplateMixin).


Variables Details

emptyQueryMeta

Value:
{'direction': 'ASC', 'dbLimit': 100, 'format': 'HTML', 'verbosity': 20\
, 'formal_data': {}, 'accept': {}, 'user': None, 'timeout': 15, 'colum\
nSet': None, 'dbSortKeys': [], 'password': None, 'additionalFields': [\
], 'tdEnc': False}