Using Enamel class as a session of sorts
A trivail example.
class Index(pages.Standard): def body(self): return self.enamel.helloicator class Test(enamel.Enamel): indexPage = Index anonymousAccess = True helloicator = "Hello" server = servers.TwistedWeb port = 8080
You can extend this with any object. You can also instantiate the object whenever you like
def Helloicator(name): return "Hello %s" % name class Index(pages.Standard): def body(self): self.enamel.helloicator = Helloicator("person") return self.enamel.helloicator class Test(enamel.Enamel): indexPage = Index anonymousAccess = True helloicator = None server = servers.TwistedWeb port = 8080
So long as the person viewing the page lands on the index, helloicator is set to result of Helloicator. This value will not be unique though for each person viewing the page.
