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

Sebastian Ware sebastian at urbantalk.se
Tue Jun 1 09:58:30 EDT 2010


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




More information about the Grok-dev mailing list