def __unicode__(self): if self.template: return template.render(self.template, self.data, WSGIApplication.debug) elif self.mime_type == "json": return simplejson.dumps(self.data) elif self.mime_type == "xml": raise NotImplemented elif self.mime_type == "text": return self.data return self.data
def pagination(self, context): '''Return pagination links''' paginator = self.get_var(context, self.paginator) return template.render('common/pagination.html', {"paginator": paginator})