Home | Trees | Index | Help |
|
---|
Package aquarium :: Package urlscheme :: Module UrlSchemeAPI |
|
Document the API for url scheme classes.
An url scheme class encapsulates information about how URL's work for a particular Web site. For instance, how does the desired screen get retrieved from an URL, and where is the images directory in relation to that URL? By using an url scheme class successfully, all URL's are be created dynamically, and changing to a new format will be easy. (On the other hand, it's not a good idea to be changing the format of your URL's often, since bookmarks, external links, and search engines will break.)
The following methods are required:
Figure out the URL for the root of this site.
secure:
0 -> http:// 1 -> https:// -1 -> (the default) results in whatever is currently being used
Return an URL for something relative to the root URL.
Return an URL to an image.
Return self.static("images/" + img, secure). Hence, img should be something like buttons/foo.jpg.
Return a dynamic URL for the given screen.
Return necessary hidden form fields.
This is a wrapper around aquarium.widget.HiddenFormFields that adds any hidden form fields Aquarium needs to use such as: sid, screen, etc. You should probably use this method everytime you generate a form.
Which screen does the user want to view?
Return the module name (i.e. use dots, not slashes) of the screen relative to the screen package.
Alternatively, advanced users may return a tuple (moduleName, screenArgs, screenKargs).
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Jan 1 16:34:19 2007 | http://epydoc.sf.net |