This doesn't look right:  the if clause sets self.content, the else clause returns?  Also, no return value is used from self.render().  Why is there even a self.render() at all?  It doesn't seem to be overridden from a base class, and it's only called from a two-line method just above it.  I probably missed something.