Skip to content

Commit

Permalink
Merge pull request twisted#50 from twisted/remove-livepage-support
Browse files Browse the repository at this point in the history
Remove unused nevow.livepage support code.
  • Loading branch information
mithrandi committed Feb 16, 2016
2 parents 11e29e2 + 3b52a13 commit eb54fba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
2 changes: 1 addition & 1 deletion doc/listings/interstore/cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Busy(Exception):
class MakeAppointment(Command):
arguments = [("whom", SenderArgument()), ("when", String())]
response = [("appointmentID", Unicode())]
errors = {"busy": Busy}
errors = {Busy: "busy"}


class Appointment(Item, AMPReceiver):
Expand Down
2 changes: 1 addition & 1 deletion xmantissa/test/test_theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def test_publicPage(self):

def test_navPage(self):
"""
Test that L{webapp.GenericNavigationLivePage} supports theming of
Test that L{webapp.GenericNavigationAthenaPage} supports theming of
Athena's unsupported-browser page based on an L{ITemplateNameResolver}
installed on the viewing user's store.
"""
Expand Down
25 changes: 1 addition & 24 deletions xmantissa/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from axiom.userbase import getAccountNames

from nevow.rend import Page
from nevow import livepage, athena
from nevow import athena
from nevow.inevow import IRequest
from nevow import tags as t
from nevow import url
Expand Down Expand Up @@ -331,29 +331,6 @@ def __init__(self, webapp, fragment, pageComponents, username):
_FragmentWrapperMixin.__init__(self, fragment, pageComponents)


class GenericNavigationLivePage(_FragmentWrapperMixin, livepage.LivePage, _ShellRenderingMixin):
def __init__(self, webapp, fragment, pageComponents, username):
livepage.LivePage.__init__(self, docFactory=webapp.getDocFactory('shell'))
_ShellRenderingMixin.__init__(self, webapp, pageComponents, username)
_FragmentWrapperMixin.__init__(self, fragment, pageComponents)

# XXX TODO: support live nav, live fragments somehow
def render_head(self, ctx, data):
ctx.tag[t.invisible(render=t.directive("liveglue"))]
return _FragmentWrapperMixin.render_head(self, ctx, data)

def goingLive(self, ctx, client):
getattr(self.fragment, 'goingLive', lambda x, y: None)(ctx, client)

def locateHandler(self, ctx, path, name):
handler = getattr(self.fragment, 'locateHandler', None)

if handler is None:
return getattr(self.fragment, 'handle_' + name)
else:
return handler(ctx, path, name)



class GenericNavigationAthenaPage(_FragmentWrapperMixin,
MantissaLivePage,
Expand Down

0 comments on commit eb54fba

Please sign in to comment.