[Grok-dev] Why is self.static not available in views on layers?

Souheil CHELFOUH trollfot at gmail.com
Wed Jun 2 10:28:39 EDT 2010


Sebastian, can you write a test that reproduces it ?
If so, can you make it and I'll have a look ?

2010/6/2 Sebastian Ware <sebastian at urbantalk.se>:
> But the code works if I remove
>
>   grok.layer(SpiderLayer)
>
> don't really know where else to look... isn't static always supposed to be defined in the same way in views?
>
> Mvh Sebastian
>
> 1 jun 2010 kl. 17.05 skrev Souheil CHELFOUH:
>
>> This has nothing to do with layers.
>> I'd recommand you to look for other causes :)
>>
>> 2010/6/1 Sebastian Ware <sebastian at urbantalk.se>:
>>> Why is self.static not available in views on layers?
>>>
>>> class Robots(grok.View):
>>>    grok.name('robots.txt')
>>>    grok.layer(SpiderLayer)
>>>
>>>    def render(self):
>>>        outp = []
>>>        outp.append('User-agent: *')
>>>        s = self.static().split('/')
>>>
>>> The last line fails due to static not being defined.
>>>
>>> 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