Description

document is the current HTML page object. Usuallly, it is used in the main page template to extract and display some elements from it. This object's class is HTML which inherits of all properties from the File class.

Examples

<h1 py:sub="document.title">Title</h1>              extract html page title
<li py:sub="for link in document.links"> *** </li>  loop on each href link in the document

Attributes

title
page title

body
page body

meta
meta tags from header (e.g. document.meta.author). If the meta tags is absent, returns an empty string.

links
list of all href links in document

Methods

extract(tag)
extract html block between a given surrounding tag e.g. document.extract('h1')