Python Paste


Notify

This allows you to queue messages to be displayed to the user on the next page the user reads.

This allows you to give messages in response to POST requests,

then redirect to a another page and display that message (e.g, 'event added').

Usage:

class SitePage(Servlet):
    message = Notify()

class MyPage(SitePage):
    def setup(self):
        if something_done:
            self.message.write('All good!')
            self.redirect(...)
    def respond(self):
        write header...
        if self.message:
            self.write('<div class="message">%s</div>

System Message: WARNING/2 (wareweb.notify.Notify, line 19)

Definition list ends without a blank line; unexpected unindent.
'
% self.message.html)

Methods

f __init__(...) ...

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

f __addtoclass__(self, attr, cls) ...

f servlet_event(self, name, servlet, *args, **kw) ...

See the source for more information.