Package trac :: Package wiki :: Module model :: Class WikiPage

Class WikiPage

source code

object --+
         |
        WikiPage

Represents a wiki page (new or existing).
Instance Methods
 
__init__(self, env, name=None, version=None, db=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
delete(self, version=None, db=None)
Delete one or all versions of a page.
source code
 
save(self, author, comment, remote_addr=None, t=None, db=None)
Save a new version of a page.
source code
 
rename(self, new_name)
Rename wiki page in-place, keeping the history intact.
source code
 
get_history(self, db=None)
Retrieve the edit history of a wiki page.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  realm = 'wiki'
Properties
  exists

Inherited from object: __class__

Method Details

__init__(self, env, name=None, version=None, db=None)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

rename(self, new_name)

source code 
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.

get_history(self, db=None)

source code 
Retrieve the edit history of a wiki page.
Returns:
a tuple containing the version, datetime, author, comment and ipnr.

Property Details

exists

Get Method:
unreachable(self)