alex bodnaru wrote:
> i have factored out the identity files into ...lib/identity.

You did extract the CSS part from the .kid file?

> 
> under ..lib/identity/static.css i have the login.css, referenced in
> ..lib/identity/templates/login.kid.
> [...]
> 
> how could i express the css link in ..lib/identity/templates/login.kid,
> so that it would be found even when the template is invoked by other
> controller (as kayout, in my case).

Well, if I was you I would put the login.css into /static/css/login.css and just
add a <link rel="stylesheet" ...> in the header of login.kid.

If I was a core TG developer I would ship these parts segregated from the start
on. ^_~

> i should probably register a static directory in <?python> before the
> css linking. but how?

You can register that directory that way:
    pkg_path = pkg_resources.resource_filename("myproj", "lib/identity/...")
    register_static_directory("static", pkg_path)
Then you were to write a widget to include the CSS file.

Or - I don't exactly understand what you intend to do - you could register that
given directory as containing statics to be passed 1:1 by cherrypy to the client
(put this in your app.cfg):
[/identity]
static_filter.on = True
static_filter.dir = "%(top_level_dir)s/lib/identity"

Don't make it complex - put the css in /static/css/ and link it.

-- W-Mark Kubacki

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to