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

Class AppUtil

source code

          object --+    
                   |    
util.code.SlotStruct --+
                       |
                      AppUtil

"An instance of this class is provided to the templates under the name 'app'. It provides a controlled interface to the application and the current state (request).

Instance Methods [hide private]
 
queries(self, queries) source code
 
link(self, resource=None, lang=None, display=None, fallback=True, displayArg=None)
Returns an URL within the current app.
source code
 
safe_link(self, *args) source code

Inherited from util.code.SlotStruct: __init__, __str__, make_dict

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

Properties [hide private]
  baseurl
Returns the base URL of this web app.
  _displayArg
  _req
  _viewer
  current

Inherited from object: __class__

Method Details [hide private]

link(self, resource=None, lang=None, display=None, fallback=True, displayArg=None)

source code 

Returns an URL within the current app. The following arguments can be given (all defaults to current unless provided):

resource
A target URI or an instance of an RdfQuery.
lang
The language to use.
display
The display name to use.
fallback
Revert to a GET for the resource if no app url can be made. Defaults to True.

Property Details [hide private]

baseurl

Returns the base URL of this web app.
Get Method:
unreachable.baseurl(self) - Returns the base URL of this web app.