[Twisted-web] Sessions with LivePage?

Chris (FeedTagger) chris.were at gmail.com
Fri Jul 22 01:38:56 MDT 2005

I'm having an issue with sessions and livepage - I can't seem to get
the two working together. If I replace livepage.LivePage with
rend.Page the session works as expected... I keep refreshing and the
same uid appears. Why is this not the case with LivePage and how can I
use sessions? Neither of the examples; chatola and liveanimal use
sessions with livepage.

Thanks in advance,


from nevow import rend, loaders, appserver
from nevow import tags as T
from nevow import inevow, static
from nevow import livepage

class Page(livepage.LivePage):
#class Page(rend.Page):
    addSlash = True
    docFactory = loaders.xmlfile('core.xhtml')
    def __init__(self):
        print '*'*22
    def child_search(self,ctx):
        return SearchPage()
    def render_body(self, ctx, data):
        session = inevow.ISession(ctx)
        return ctx.tag
class SearchPage(livepage.LivePage):
from twisted.application import service, internet
application = service.Application("liveweb")

More information about the Twisted-web mailing list