Why server.webpath doesn't seem to affect/fix URL to css file?

2 views
Skip to first unread message

sebe...@spawar.navy.mil

unread,
Jan 1, 2008, 11:08:47 PM1/1/08
to TurboGears
For web app at domain.org/app,
server.webpath successfully avoids needing to add /app to hyperlink
URLs. (For example..."/mymethod" works instead of "/app/mymethod".)

It does NOT seem to avoid need for /app in URL to **CSS files**
or images.

Why not?

Here is my config part for CSS...

[/css]

static_filter.on = True
static_filter.dir = "%(top_level_dir)s/views/css"

Here is what I'd like to see.....

<link href="/css/main.css" type="text/css" rel="stylesheet"/>

Instead I must do...

<link href="/app/css/main.css" type="text/css" rel="stylesheet"/>

Any help would be greatly appreciated.

Chris

Kane

unread,
Jan 2, 2008, 12:06:42 AM1/2/08
to TurboGears
<link href="${tg.url('/css/main.css')}" type="text/css"
rel="stylesheet"/>


On Jan 1, 8:08 pm, "seber...@spawar.navy.mil"

sebe...@spawar.navy.mil

unread,
Jan 2, 2008, 12:52:32 AM1/2/08
to TurboGears
Kane

Wow. Thanks. I needed that.

Chris
Reply all
Reply to author
Forward
0 new messages