Package oort :: Module sitebase :: Class ResourceViewerBase
[hide private]
[frames] | no frames]

Class ResourceViewerBase

source code

object --+
         |
        ResourceViewerBase
Known Subclasses:
MultiBaseResourceViewer, ResourceViewer

Base class - not for direct usage.

Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]
 
__init__(self, graph, cfg={})
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__call__(self, environ, start_response) source code
 
_default_redirect(self, lang, environ, start_response) source code
 
resource_from(self, pathArgs) source code
 
resource_to_app_path(self, resource) source code
 
app_url_for(self, lang, displayArg, resource=None, fallback=True) source code
 
prepared_display(self, resource, lang, displayArg, req) source code
 
__super(type)
super(type, obj) -> bound super object; requires isinstance(obj, type)...
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods [hide private]
 
app_factory(cls, global_conf=None, graph_factory=None, **cfg)
Factory method compatible with the app_factory feature of Paste Deploy.
source code
Class Variables [hide private]
  VARIANT_SEP = '-'
  RESOURCE_QUERY_KEY = 'resource'
  langOrder = ()
  defaultDisplay = None
  displayClasses = {}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, graph, cfg={})
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

resource_from(self, pathArgs)

source code 
Decorators:
  • @contract.template_method

resource_to_app_path(self, resource)

source code 
Decorators:
  • @contract.template_method

__super(type)

source code 
super(type, obj) -> bound super object; requires isinstance(obj, type)
super(type, type2) -> bound super object; requires issubclass(type2, type)
Typical use to call a cooperative superclass method:
class C(B):
    def meth(self, arg):
        super(C, self).meth(arg)

Returns:
unbound super object