trac.wiki.model¶
-
class
trac.wiki.model.WikiPage(env, name=None, version=None)¶ Bases:
objectRepresents a wiki page (new or existing).
Create a new page object or retrieves an existing page.
Parameters: - env – an
Environmentobject. - name – the page name or a
Resourceobject. - version – the page version. The value takes precedence over the
Resourceversion when both are specified.
-
delete(version=None)¶ Delete one or all versions of a page.
-
edit_comment(new_comment)¶ Edit comment of wiki page version in-place.
-
get_history()¶ Retrieve the edit history of a wiki page.
Returns: a tuple containing the version,datetime,authorandcomment.
-
rename(new_name)¶ Rename wiki page in-place, keeping the history intact. Renaming a page this way will eventually leave dangling references to the old page - which literally doesn’t exist anymore.
-
save(author, comment, t=None)¶ Save a new version of a page.
- env – an
-
trac.wiki.model.datetime_now()¶ [tz] -> new datetime with tz’s local day and time.