<!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>
&lt;link rel="stylesheet" type="text/css" tal:attributes="href
static/styles.css"&gt;<br>
<br>
to my template. Result:<br>
 <br>
<b>Line 3, Column 8</b><br>
<b>In expression: &lt;PathExpr standard:u'static/styles.css'&gt;</b><br>
- Names:<br>
{'args': (),<br>
'context': &lt;dnszones.app.Dnszones object at 0x808eaab90&gt;,<br>
'default': &lt;object object at 0x800ec4490&gt;,<br>
'loop': {},<br>
'nothing': None,<br>
'options': {},<br>
'repeat': {},<br>
'request': &lt;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>&gt;,<br>
'static': None,<br>
'template': &lt;grokcore.view.components.TrustedFilePageTemplate object
at 0x8087245d0&gt;,<br>
'view': &lt;dnszones.app.DnsZonesZone object at 0x809563350&gt;}<br>
<b><br>
- &gt; 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>