Kevin, everyone:
May be I'm not being enough clear. Let me rewind for a second:
Take for instance a CSSLink daclared like this:
class MyWidget(Widget):
css = [CSSLink(modname="aji", filename="css/jobList.css")]
that will render an url like this one:
/toscawidgets/resources/aji/css/jobList.css?v=0
where /toscawidgets/resources/ are hardcoded path from toscawidgets it self. Note that the proper path would be /aji/static/css/jobList.css
if I do something like
resources.registry = resources.ResourcesApp("/static")
then it renders this way:
/toscawidgets/static/aji/css/jobList.css?v=0
my app name (aji) is put after the resources path and the /toscawidgets/ bit reamins untouched.
From the post that kevin ponted me at. They suggest overriding the /toscawidgets/ prefix from toscawidget.middleware (from another class I think as it would brake the other widgets). That's the part I quite dont understand how to do.
Any whay, having hardcoded paths is a really weird thing.
What should be the best practice in this case, to develop all my widgets inside the tosca package, so it will share the path with the other widgets?
As I stated before I'm workwaround this issue inserting the link tag right in my template string, this way:
class MyWidget(Widget):
engine_name = 'genshi'
template='''
<py:strip xmlns="
http://www.w3.org/1999/xhtml" xmlns:py="
http://genshi.edgewall.org/">
<link rel="stylesheet" href="/static/css/jobList.css" type="text/css" />
....
Which is, IMHO, throwing litter to the DOM. Is there any other way to work around this issue?.
Thanks again