Edgewall Software

Changes between Initial Version and Version 1 of TracDev/DataModels


Ignore:
Timestamp:
Oct 12, 2005, 4:12:46 PM (19 years ago)
Author:
jeoffwilks@…
Comment:

Taken from a list email by Matthew Good on 10/12/2005

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/DataModels

    v1 v1  
     1= Trac Data Models =
     2
     3The 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.
     4
     5== Ticket ==
     6
     7Data Model - [source:/trunk/trac/ticket/model.py trac.ticket.model.Ticket]
     8{{{
     9#!python
     1029      class Ticket(object):
     1130     
     1231          def __init__(self, env, tkt_id=None, db=None):
     13}}}
     14
     15For usage examples, see [source:/trunk/trac/ticket/web_ui.py trac.ticket.web_ui].
     16
     17== !WikiPage ==
     18
     19Data Model - [source:/trunk/trac/wiki/model.py trac.wiki.model.WikiPage]
     20{{{
     21#!python
     2226      class WikiPage(object):
     2327          """Represents a wiki page (new or existing)."""
     2428     
     2529          def __init__(self, env, name=None, version=None, db=None):
     26}}}
     27
     28The !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.
     29
     30For usage examples, see [source:/trunk/trac/wiki/web_ui.py trac.wiki.web_ui].