assembl.lib.utils module

Sundry utility functions

assembl.lib.utils.get_concrete_subclasses_recursive(c)[source]

Recursively returns only the concrete classes is a class hierarchy

assembl.lib.utils.get_eol(text)[source]

Return the EOL character sequence used in the text.

assembl.lib.utils.get_global_base_url(require_secure=None, override_port=None)[source]

Get the base URL of this server DO NOT USE directly, except for Linked data; use Discussion.get_base_url()

assembl.lib.utils.get_subclasses_recursive(c)[source]

Recursively returns the classes is a class hierarchy

assembl.lib.utils.path_qs(url)[source]

Returns all components of url, including qs after hostname:port excluding the dangling “/”

eg. url := “https://abcd.com:6543/a/b/c?foo=bar&baz=whocares” returns ‘/a/b/c?foo=bar&baz=whocares’