Edgewall Software

Changes between Version 3 and Version 4 of TracDev/PluginDevelopment/ExtensionPoints/trac.admin.api.IAdminPanelProvider


Ignore:
Timestamp:
Aug 7, 2011, 10:46:04 AM (8 years ago)
Author:
Peter Suter
Comment:

Let's keep the example focused on IAdminPanelProvider

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/PluginDevelopment/ExtensionPoints/trac.admin.api.IAdminPanelProvider

    v3 v4  
    2929from trac.core import *
    3030from trac.admin import IAdminPanelProvider
    31 from trac.web.chrome import ITemplateProvider, add_notice, add_warning
     31from trac.web.chrome import add_notice, add_warning
    3232from trac.util.text import exception_to_unicode
    3333
     
    6060        return 'admin_query.html', dict((option, self.config.get('query', option))
    6161                                        for option in options)
    62    
    63     # ITemplateProvider methods
    64     # Used to add the plugin's templates and htdocs
    65     def get_templates_dirs(self):
    66         from pkg_resources import resource_filename
    67         return [resource_filename(__name__, 'templates')]
    6862}}}
    6963
    70 The accompanying ''admin_query.html'':
     64The accompanying ''admin_query.html'' template (provided by an appropriate [wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.web.chrome.ITemplateProvider ITemplateProvider] implementation):
    7165{{{#!xml
    7266<!DOCTYPE html