Thank you very much, Alberto. :-)
jo
Alberto Valverde ha scritto:
> On Sep 15, 2006, at 2:36 AM, Ian Wilson wrote:
>
>
>> Hello,
>> I am trying to include CSS with my widget and its not working. I
>> have tried guessing around and trying to find useful examples. I have
>> something like this:
>>
>> class Menu(Widget):
>> template = """
>> ...
>> """
>> css = [CSSLink('widgets/static/css/', name="menu.css")]
>> params = ['submenus']
>> params_doc = {'submenus': "A list of submenus of the form
>> [dict(title=, items=)]"}
>> submenus = []
>>
>> How do I link to this file /static/widgets/css/menu.css ?
>>
>> CSSLink('widgets/static/css/', name="menu.css") ?
>>
>
> Have you tried registering the static directory?
>
> static_dir = pkg_resources.resource_filename("modname", "static")
> register_static_directory("modname", static_dir)
>
> CSSLink("modname", "css/menu.css")
>
> Alberto
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---