29 lines
992 B
Python
29 lines
992 B
Python
# -*- coding: utf-8 -*-
|
|
from trac.core import Component, implements, TracError
|
|
from trac.web.chrome import ITemplateProvider
|
|
|
|
class RendezVousBase(Component):
|
|
|
|
implements(ITemplateProvider)
|
|
|
|
# ITemplateProvider methods
|
|
# Used to add the plugin's templates and htdocs
|
|
def get_templates_dirs(self):
|
|
from pkg_resources import resource_filename
|
|
return [resource_filename(__name__, 'templates')]
|
|
|
|
def get_htdocs_dirs(self):
|
|
"""Return a list of directories with static resources (such as style
|
|
sheets, images, etc.)
|
|
|
|
Each item in the list must be a `(prefix, abspath)` tuple. The
|
|
`prefix` part defines the path in the URL that requests to these
|
|
resources are prefixed with.
|
|
|
|
The `abspath` is the absolute path to the directory containing the
|
|
resources on the local file system.
|
|
"""
|
|
from pkg_resources import resource_filename
|
|
return [('hw', resource_filename(__name__, 'htdocs'))]
|
|
|