[Grok-dev] Accessing the static directory from 1.3

Sebastian Ware sebastian at urbantalk.se
Wed Feb 2 03:46:57 EST 2011


the traceback...

URL: http://localhost:8080/test/%40%40/protoncms/workflow.css
Module paste.evalexception.middleware:306 in respond     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment.jpg 
-------------- next part --------------
    
>>  app_iter = self.application(environ, detect_start_response)
Module webob.dec:147 in __call__     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0001.jpg 
-------------- next part --------------
    
>>  resp = self.call_func(req, *args, **self.kwargs)
Module webob.dec:208 in call_func     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0002.jpg 
-------------- next part --------------
    
>>  return self.func(req, *args, **kwargs)
Module fanstatic.publisher:134 in __call__     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0003.jpg 
-------------- next part --------------
    
>>  return request.get_response(self.app)
Module webob.request:937 in get_response     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0004.jpg 
-------------- next part --------------
    
>>  application, catch_exc_info=False)
Module webob.request:906 in call_application     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0005.jpg 
-------------- next part --------------
    
>>  app_iter = application(self.environ, start_response)
Module webob.dec:147 in __call__     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0006.jpg 
-------------- next part --------------
    
>>  resp = self.call_func(req, *args, **self.kwargs)
Module webob.dec:208 in call_func     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0007.jpg 
-------------- next part --------------
    
>>  return self.func(req, *args, **kwargs)
Module fanstatic.injector:47 in __call__     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0008.jpg 
-------------- next part --------------
    
>>  response = request.get_response(self.app)
Module webob.request:937 in get_response     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0009.jpg 
-------------- next part --------------
    
>>  application, catch_exc_info=False)
Module webob.request:906 in call_application     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0010.jpg 
-------------- next part --------------
    
>>  app_iter = application(self.environ, start_response)
Module zope.app.wsgi:59 in __call__     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0011.jpg 
-------------- next part --------------
    
>>  request = publish(request, handle_errors=handle_errors)
Module zope.publisher.publish:129 in publish     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0012.jpg 
-------------- next part --------------
    
>>  obj = request.traverse(obj)
Module zope.publisher.browser:540 in traverse     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0013.jpg 
-------------- next part --------------
    
>>  ob = super(BrowserRequest, self).traverse(obj)
Module zope.publisher.http:457 in traverse     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0014.jpg 
-------------- next part --------------
    
>>  ob = super(HTTPRequest, self).traverse(obj)
Module zope.publisher.base:260 in traverse     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0015.jpg 
-------------- next part --------------
    
>>  obj = publication.traverseName(self, obj, entry_name)
Module grokcore.view.publication:42 in traverseName     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0016.jpg 
-------------- next part --------------
    
>>  request, ob, name)
Module zope.app.publication.zopepublication:200 in traverseName     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0017.jpg 
-------------- next part --------------
    
>>  ob2 = adapter.publishTraverse(request, nm)
Module zope.app.publication.traversers:46 in publishTraverse     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plus.jpg
Type: image/jpeg
Size: 361 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20110202/5c925219/attachment-0018.jpg 
-------------- next part --------------
    
>>  raise NotFound(ob, name)
NotFound: Object: <zope.fanstatic.zopesupport.ZopeFanstaticResource object at 0x10147c0d0>, name: u'workflow.css'

Mvh Sebastian


1 feb 2011 kl. 21.20 skrev Sebastian Ware:

> I have tried to follow the upgrade instructions to publish my static directory, but I can't access any files. It does however only complain about the actual file, so I am assuming it finds the directory but not the content. I have configured like this:
> 
> resource.py
>  from fanstatic import Library, Resource
>  library = Library('protoncms', 'static')
> 
> setup.py
>  setup(name='ProtonCMS',
>        [snip]
>        entry_points={'fanstatic.libraries': ['protoncms = protoncms.resource:library']},
>        [snip]
> 
> configure.zcml
>  <include package="zope.fanstatic" />
> 
> 
> then when I try
> 
>  tal:attributes="href static/mystyling.css"
> 
> it won't find it the file, and I can't access from the browser using
> 
>  localhost:8080/test/@@/protoncms/mystyling.css
> 
> either.
> 
> Am I doing anything obviously wrong?
> 
> Mvh Sebastian
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list