Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 1051:a0c7df67dd9c
Allow a page request to include a :contentonly variable.
If it exists, we only render the content of the page, and not the
surrounding "page" template.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 05 Sep 2002 01:27:42 +0000 |
| parents | c28603c9f831 |
| children | b28393def972 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Thu Sep 05 00:38:11 2002 +0000 +++ b/roundup/cgi/client.py Thu Sep 05 01:27:42 2002 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.11 2002-09-04 04:31:51 richard Exp $ +# $Id: client.py,v 1.12 2002-09-05 01:27:42 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -114,8 +114,14 @@ # self.classname and self.template) self.handle_action() # now render the page - self.write(self.renderTemplate('page', '', ok_message=self.ok_message, - error_message=self.error_message)) + if self.form.has_key(':contentonly'): + # just the content + self.write(self.content()) + else: + # render the content inside the page template + self.write(self.renderTemplate('page', '', + ok_message=self.ok_message, + error_message=self.error_message)) except Redirect, url: # let's redirect - if the url isn't None, then we need to do # the headers, otherwise the headers have been set before the
