The RandomModularSessionApp class is intended for use in applications which define page code in a collection of Python modules which are randomly accessed via the URI in the browser request. Session state is stored at the server.
The methods available in RandomModularSessionApp and the location of their definition are show below.
Method | Mixin |
---|---|
base_url() | Application |
create_context() | RandomModularSessionApp |
del_session(sesid) | SessionServerAppMixin |
discard_file_resources(filename) | ResourceMixin |
display_response(ctx) | RandomPageModuleMixin |
format_exception() | Application |
get_lookup(name) | ResourceMixin |
get_macro(name) | ResourceMixin |
get_page_from_uri(ctx, uri) | RandomPageModuleMixin |
get_session(sesid) | SessionServerAppMixin |
get_tagclass(name) | ResourceMixin |
handle_exception(ctx, req) | Application |
is_page_module(name) | PageModuleMixin |
load_badurl_template(ctx) | RandomPageModuleMixin |
load_page(ctx) | RandomPageModuleMixin |
load_page_module(ctx, name) | PageModuleMixin |
load_session(ctx) | Application |
load_template(name) | CachingTemplateLoaderMixin |
load_template_once(name) | CachingTemplateLoaderMixin |
merge_request(ctx) | Application |
module_path() | PageModuleMixin |
new_session() | SessionServerAppMixin |
page_enter(ctx) | RandomPageModuleMixin |
page_leave(ctx) | PageModuleMixin |
pickle_sign(text) | PickleSignMixin |
pickle_unsign(text) | PickleSignMixin |
process_request(ctx) | RandomPageModuleMixin |
put_session(sesid, text) | SessionServerAppMixin |
register_lookup(name, lookup) | ResourceMixin |
register_macro(name, macro) | ResourceMixin |
register_tagclasses(*tags) | ResourceMixin |
remove_session(ctx) | Application |
run(req) | Application |
save_session(ctx) | Application |
ses_age() | SessionServerAppMixin |
ses_appid() | SessionServerAppMixin |
start_page() | PageModuleMixin |
template_traceback(tb) | Application |
validate_request(ctx) | Application |
The RandomModularSessionApp class defines the following methods:
base_url, page_path, start_page, secret, session_appid [, session_server = 'localhost' ] [, server_port = 34343 ] [, session_age = 1800 ]) |
The base_url argument is used as the base for URLs produced by the <al-a> and <al-form> tags. The page_path argument defines the root directory where page modules and template files are loaded from. The start_page identifies the page that will be served up when a page identifier cannot be determined from the URI in the browser request. The secret argument is used to sign all pickles sent to the browser.
The session_appid argument identifies the session application at
the session server. Multiple applications can share sessions by using
the same identifier here. The session_server argument defines
the host where the session server is running, it defaults to
localhost. The server_port defines the session server
port, it defaults to 34343
. The session_age argument
defines the number of seconds that an idle session will be kept, it
defaults to 1800
.
) |