Version 2 (modified by 19 years ago) ( diff ) | ,
---|
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 - trac.ticket.model.Ticket
29 class Ticket(object): 30 31 def __init__(self, env, tkt_id=None, db=None):
For usage examples, see trac.ticket.web_ui.
WikiPage
Data Model - trac.wiki.model.WikiPage
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 trac.wiki.web_ui.
See also: TracDev