Changing Trac default values for new environments
255 views
Posted June 9, 2007 at 03:06am in Computers, ProgrammingI have enjoyed the subversion integration in trac when viewing revisions and plan to use trac more often, but the problem is that I didn’t like milestone1, milestone2, etc. I decided to make a few changes to the source to allow for something that fits my projects a little better.
In PYTHON_ROOT/site-packages/trac/db_default.py
Python
-
##
-
## Default database values
-
##
-
-
# (table, (column1, column2), ((row1col1, row1col2), (row2col1, row2col2)))
-
def get_data(db):
-
return ((‘component’,
-
(‘name’, ‘owner’),
-
((‘component1′, ’somebody’),
-
(‘component2′, ’somebody’))),
-
(‘milestone’,
-
(‘name’, ‘due’, ‘completed’),
-
((‘milestone1′, 0, 0),
-
(‘milestone2′, 0, 0),
-
(‘milestone3′, 0, 0),
-
(‘milestone4′, 0, 0))),
-
…….
Unless I am wrong chaning the values of the milestones is all you will need to do. I tested it with a new environment and it appeared to work properly.





