def render(self, data=None, add_context=None):
template = loader.get_template(self.template)<EOL>if not data:<EOL><INDENT>data = self.context(self.prepare_data())<EOL><DEDENT>if add_context is not None:<EOL><INDENT>for key, value in add_context.iteritems():<EOL><INDENT>if key in self.accepted_keywords:<EOL><INDENT>data[key] = value<EOL><DEDENT><DEDENT><DEDENT>return template.render(data)<EOL>
Renders the widget as HTML.