The SessionFileAppContext class is intended to be used for applications which store state at the server. An inheritance diagram illustrates the relationship to the SimpleAppContext class described above.
The methods available in SessionFileAppContext and the location of their definition are show below.
Method | Mixin |
---|---|
add_session_vars(*names) | SessionBase |
base_url() | AppContext |
clear_locals() | AppContext |
current_url() | AppContext |
decode_session(text) | SessionBase |
default_session_var(name, value) | SessionBase |
del_header(name) | ResponseMixin |
del_session_vars(*names) | SessionBase |
encode_session() | SessionBase |
eval_expr(expr) | NamespaceMixin |
flush_content() | ExecuteMixin |
flush_html() | ExecuteMixin |
form_close() | NameRecorderMixin |
form_open() | NameRecorderMixin |
get_header(name) | ResponseMixin |
get_lookup(name) | AppContext |
get_macro(name) | AppContext |
get_macro_arg(name) | ExecuteMixin |
get_tagclass(name) | AppContext |
get_value(name) | NamespaceMixin |
has_value(name) | NamespaceMixin |
has_values(*names) | NamespaceMixin |
input_add(itype, name, unused_value, return_list) | NameRecorderMixin |
load_session() | SessionFileContextMixin |
load_template(name) | AppContext |
load_template_once(name) | AppContext |
make_alias(name) | NamespaceMixin |
merge_request() | NameRecorderMixin |
pop_content_trap() | ExecuteMixin |
pop_macro_args() | ExecuteMixin |
pop_page(target_page) | AppContext |
push_content_trap() | ExecuteMixin |
push_macro_args(args) | ExecuteMixin |
push_page(name, *args) | AppContext |
redirect(loc) | AppContext |
redirect_url(loc) | AppContext |
register_lookup(name, lookup) | AppContext |
register_macro(name, macro) | AppContext |
remove_session() | SessionFileContextMixin |
req_equals(name) | AppContext |
reset_content() | ExecuteMixin |
run_template(name) | AppContext |
run_template_once(name) | AppContext |
save_session() | SessionFileContextMixin |
send_content(data) | ResponseMixin |
send_redirect(loc) | ResponseMixin |
sesid() | SessionFileContextMixin |
session_vars() | SessionBase |
set_globals(dict) | NamespaceMixin |
set_header(name, value) | ResponseMixin |
set_page(name, *args) | AppContext |
set_request(req) | AppContext |
set_save_session(flag) | SessionBase |
set_value(name, value) | NamespaceMixin |
should_save_session() | SessionBase |
write_content(data) | ExecuteMixin |
write_headers() | ResponseMixin |
Externally the execution context is almost identical to that of the SimpleAppContext class. Instead of saving session data in hidden HTML fields, session data is loaded and saved to the servers local file system, which is managed by the application.
The class defines a number of extra methods.
app) |
The app argument is passed to the AppContext constructor.