trac.wiki.model
¶
-
class
trac.wiki.model.
WikiPage
(env, name=None, version=None)¶ Bases:
object
Represents a wiki page (new or existing).
Create a new page object or retrieves an existing page.
Parameters: - env – an
Environment
object. - name – the page name or a
Resource
object. - version – the page version. The value takes precedence over the
Resource
version 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
,author
andcomment
.
-
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.