I belive the "right way" would be to do ${std.url('/static/images/image.png')}.


On 10/26/05, Rune Hansen <[EMAIL PROTECTED]> wrote:
>
> In master.kid I reefer to images as <div py:def="buttonbar()"><img
> src=static/images/image.png><img..</div>
> This works fine in Root::index. Root::how_it_works on the other hand
> can't find the image since the path is now  ../static/images/image.png
>
> There are numerous ways that I can fix this - but as this is a common
> problem (my guess) - which is the "right" way?
>
> Another thing. Am I correct in thinking that the tg.sitetemplate
> removes the need for py:extends="master.kid" in all other templates?
> Anyway, this is what I get when setting the
> tg.sitetemplate="sm.templates.master" in dev.cfg.
>
> output = view.render(output, tg_format, template=template)
>    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/TurboGears-0.8a4-py2.4.egg/turbogears/
> view.py", line 93, in render
>      tclass = lookupTemplate(template)
>    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/TurboGears-0.8a4-py2.4.egg/turbogears/
> view.py", line 42, in lookupTemplate
>      lookupTemplate(stname, True)
>    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/TurboGears-0.8a4-py2.4.egg/turbogears/
> view.py", line 69, in lookupTemplate
>      mod = kid.load_template(tfile, name=classname)
>    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/__init__.py",
> line 120, in load_template
>      mod = importer._create_module(code, name, filename, store=cache)
>    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/importer.py",
> line 87, in _create_module
>      exec code in mod.__dict__
>    File "/Users/roderik/Sites/www.scanmine.com/sm/templates/
> master.py", line 15, in ?
> ImportError: No module named sitetemplate
>
> (all packages updated to day)
>
> I must say - TurboGears is cool - way cooler than the average
> norwegian winter.
>
> regards
> /rune
>


--
cheers
    elvelind grandin

Reply via email to