Albatross only supplies one class for this function; the NamespaceMixin class. This mixin provides a local and global namespace for evaluating expressions embedded in HTML template files.
When the browser request is merged into the execution context the input field values are written to the local namespace.
) |
The global namespace for evaluating Python expressions in HTML templates is initialised as an empty dictionary in the constructor.
Loading the session merges the session values into this member.
) |
dict) |
The SimpleContext class constructor automatically sets this to the globals of the function which invoked the SimpleContext constructor.
The run_template() and run_template_once() methods of the AppContext calls this method to set global namespace to the globals of the calling function.
expr) |
name, value) |
This is used by the application merge_request() method to merge individual browser request fields into the local namespace.
There is a special ``backdoor'' identifier format which which directs browser request fields to the set_backdoor() method of ListIterator and TreeIterator objects. The backdoor identifiers are generated by the <al-input> and <al-a> tags to implement sequence and tree browsing requests.
The method implements a parser which can handle names of the form:
name |
::= | identifier | list-backdoor | tree-backdoor |
identifier |
::= | identifier (("." identifier) | ("[" number "]"))* |
list-backdoor |
::= | operation "," iter |
tree-backdoor |
::= | operation "," iter "," alias |
name) |
The method resolves the name argument up to the last ``.'' and then calls the albatross_alias() method of the resolved object. The resolved object is then entered into the local namespace and the session using the name returned by albatross_alias().
The return value is a new name by combining the name returned by albatross_alias() with the part of the original name following and including the last ``.''.
Refer to the <al-input> documentation on page
name) |
None
is returned.
name) |
...) |