widgets: JSLink to external link adress

4 views
Skip to first unread message

Gregor Horvath

unread,
Mar 5, 2007, 11:26:48 AM3/5/07
to turbo...@googlegroups.com
Hi,

How is it possible to include a JSLink to an external adress for
example: http://soemurl/somejavascript.js

It seems from the source of class Link in base.py the link is hardcoded
to a local adress:

d["link"] = "/%stg_widgets/%s/%s" % (startup.webpath,
self.mod,
self.name)


Greg


Andrew Grover

unread,
Mar 5, 2007, 9:18:37 PM3/5/07
to turbo...@googlegroups.com
On 3/5/07, Gregor Horvath <g...@gregor-horvath.com> wrote:
> How is it possible to include a JSLink to an external adress for
> example: http://soemurl/somejavascript.js

subclass JSLink, like so:

from turbogears.widgets import JSLink

class ExtJSLink(JSLink):
def update_params(self, d):
super(ExtJSLink, self).update_params(d)
d['link'] = self.name

Works for me :)

Regards -- Andy

Reply all
Reply to author
Forward
0 new messages