[Grok-dev] Why is self.static not available in views on layers?
Sebastian Ware
sebastian at urbantalk.se
Wed Jun 2 10:11:52 EDT 2010
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