Hi folks, I'm having problems getting CSSLink working in a tg app using
toscawidgets. I have the following:

from turbogears.widgets import register_static_directory
import pkg_resources
static_dir = pkg_resources.resource_filename('project_name', 'static')
register_static_directory('project_name', static_dir)

# note: using ToscaWidgets CSSLink
css_link = CSSLink( modname="project",
filename="static/css/rating_widget.css")

css_source = CSSSource("""input { background: #ccccff;}""")

test_fields = [ TextField('text', label_text="Test:", default="test") ]

test_widget = Form('test', fields=test_fields, 
   css=[css_link, css_source] )



When I deliver test_widget, I get in the link:
href="/toscawidgets/resources/project/static/css/rating_widget.css

Any clues much appreciated. I don't want to make a custom toscawidget
package to serve these because I want the css files etc to live in the
main project directories.

Thanks
Iain



--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to