wiki:AdminConsoleProviderPatch

Version 9 (modified by athomas, 8 years ago) (diff)

--

Adds an IAdminConsoleProvider extension point to Trac trunk

Description

This patch adds an IAdminConsoleProvider extension point to Trac that lets plugins add custom commands to TracAdmin.

Bugs/Feature Requests

Existing bugs and feature requests for AdminConsoleProviderPatch are here.

If you have any issues, create a new ticket.

Download

download:adminconsoleproviderpatch

NOTE: There are two patches available. The -refactor patch fully refactors trac-admin, moving all commands into their appropriate source modules (eg. ticket commands end up in trac.ticket.api, etc.). If you don't care about this (which you probably don't), grab the other patch.

Source

You can check out the source for AdminConsoleProviderPatch from Subversion at http://trac-hacks.org/svn/adminconsoleproviderpatch.

Example

Example from DiscussionPlugin:

from trac.core import *
from trac.admin.console import IAdminConsoleProvider

class DiscussionConsole(Component):
    implements(IAdminConsoleProvider)

    def get_console_commands(self, tracadm):
        self.tracadm = tracadm
        yield ('forum', self._help_forum, self.do_forum, self.complete_forum)
        yield ('topic', self._help_topic, self.do_topic, self.complete_topic)
...

Author/Contributors

Author: athomas
Contributors:

TagIt(patch,athomas,alpha,unsupported,0.9,deprecated,broken)?