"Adam Jones" <[EMAIL PROTECTED]> writes:
> Ok, let me see if I understand this correctly. This problem would be
> solved like this:
>
> (assuming that /$projectname/widgets/static/css points to the correct
> directory)
>
> ::In the controller::
>
> import os.path
> import pkg_resources
>
> pkg_path = pkg_resources.resource_filename(__name__,
> os.path.join("widgets","static", "css"))
> register_static_directory("mywidgets.css", pkg_path)
>
> Then the widget could be change to:
>
> class Menu(Widget):
> template = """
> ...
> """
> css = [CSSLink('mywidgets.css', name="menu.css")]
I can't answer without testing to see if it works. From the page below it
looks like it is correct.
> By the way, I am pulling this from the widget packaging tutorial at:
> http://trac.turbogears.org/turbogears/wiki/WidgetPackages
That's the document I was thinking about. :-)
> Please let me know if there is a more up to date doc.
I don't believe there's one. This is the technique I use here.
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---