-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
thanks mark,
i'll try it today.
the question is to assure full modularity between various possible
components of a tg application, and for the fun of knowing more, of
course :) .
W-Mark Kubacki wrote:
> alex bodnaru wrote:
>> i have factored out the identity files into ...lib/identity.
>
> You did extract the CSS part from the .kid file?
>
no, it was separated from the beginning.
>> 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
thanks a lot,
alex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBR4GgZdpwN1sq38njAQJtLgP8DqOGIaYzsJIOmKbuTqtCyQ+IiaoKZdXo
kah0Bss44m1z38DqNiNlUpNRPsL5jdMnfUTqsrKqVnsC6nqpUhkGo06W7fUPpT2L
pST3HC8TCBf1mPJ3yWycz54DVeYmij6LH1QJ94b8j+lh7Uj9aohVhh5ndicbdx6w
F3FLaS/0DXY=
=qeom
-----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---