= Trac Data Models = The main models that developers might be interested in are Ticket and !WikiPage. The constructors each take the environment as the first parameter, and the ticket id or wiki page name next. == Ticket == Data Model - [source:/trunk/trac/ticket/model.py trac.ticket.model.Ticket] {{{ #!python 29 class Ticket(object): 30 31 def __init__(self, env, tkt_id=None, db=None): }}} For usage examples, see [source:/trunk/trac/ticket/web_ui.py trac.ticket.web_ui]. == !WikiPage == Data Model - [source:/trunk/trac/wiki/model.py trac.wiki.model.WikiPage] {{{ #!python 26 class WikiPage(object): 27 """Represents a wiki page (new or existing).""" 28 29 def __init__(self, env, name=None, version=None, db=None): }}} The !WikiPage has an optional parameter for the version, and you probably won't need to bother with the last parameter which is an optional db connection. For usage examples, see [source:/trunk/trac/wiki/web_ui.py trac.wiki.web_ui]. ---- See also: TracDev