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 |
...) |
This method merges request fields matching a prefix given in the argument list to the local namespace (via the set_value() method described above).
Normally, merging of request fields is automatic: either all request fields are copied when StubRecorderMixin is used, or fields listed in __albform__ are copied when NameRecorderMixin is used. However in cases where NameRecorderMixin is used and no __albform__ field is present, request merging does not occur, and this method is needed to allow the application to explicitly request fields be merged.
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) |
...) |