Sorry for the repost as text. I fixed my problem. I wasn't as
thorough/careful in my testing of the paths as I thought.
The tutorial is correct!
Here's the fix/explanation in case anyone else runs into this or is
confused like I was:
setup.py: (as before, defines plugin name to be ChangeRequest, which
automatically specifies __name__ to be that, too)
setup(name=PACKAGE, version=VERSION, packages=['ChangeRequest'],
package_data={'ChangeRequest' : ['templates/*.cs', 'htdocs/css/*.css']})
get_htdocs_dirs: (as before, but works with __name__ replaced with the
name of my plugin 'ChangeRequest' --It doesn't have to be this so long
as it matches what is put in the path before css in the call to
add_stylesheet. So you could swap out the first __name__ in the tuple
and use 'anyname' so long as the call to add_stylesheet looked like
'anyname/css/request.css' )
def get_htdocs_dirs(self):
from pkg_resources import resource_filename
return [(__name__, resource_filename( __name__, 'htdocs'))]
add_stylesheet(req, 'ChangeRequest/css/request.css')
The stylesheet link in hdf looks like (using ?hdfdump=1 ) :
stylesheet {
0 {
href = /trac/chrome/common/css/trac.css
type = text/css
}
1 {
href = /trac/chrome/ChangeRequest/css/request.css
type = text/css
}
}
-Nate
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac