<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hello Group,<br>
<br>
today I ran into problems with static while i followed the tutorial:<br>
<br>
<a class="moz-txt-link-freetext"
href="http://grok.zope.org/doc/current/tutorial.html#static-resources-for-our-web-page">http://grok.zope.org/doc/current/tutorial.html#static-resources-for-our-web-page</a><br>
<br>
I created a static directory, added a styles.css to this directory.
Finally I worte<br>
<br>
<link rel="stylesheet" type="text/css" tal:attributes="href
static/styles.css"><br>
<br>
to my template. Result:<br>
<br>
<b>Line 3, Column 8</b><br>
<b>In expression: <PathExpr standard:u'static/styles.css'></b><br>
- Names:<br>
{'args': (),<br>
'context': <dnszones.app.Dnszones object at 0x808eaab90>,<br>
'default': <object object at 0x800ec4490>,<br>
'loop': {},<br>
'nothing': None,<br>
'options': {},<br>
'repeat': {},<br>
'request': <zope.publisher.browser.BrowserRequest instance URL=<a
class="moz-txt-link-freetext"
href="http://127.0.0.1:8080/dnszones/zone">http://127.0.0.1:8080/dnszones/zone</a>>,<br>
'static': None,<br>
'template': <grokcore.view.components.TrustedFilePageTemplate object
at 0x8087245d0>,<br>
'view': <dnszones.app.DnsZonesZone object at 0x809563350>}<br>
<b><br>
- > LocationError: (None, 'styles.css')</b><br>
<br>
Seems that static Directory is not known. Grok book and tutorial
references that
this is done automaticly. Is there a method where i can declare where
the
static resouces can be found - like grok.static('static') in my view or
viewlet?<br>
<big><br>
How to make static resources availabe direct form view or viewlet
template without using fanstatic?<br>
<br>
-<br>
Chris<br>
</big></tt><br>
<br>
</body>
</html>