def json_dict(self, user): ret = {} ret['id'] = self.id ret['uid'] = escape_path(self.name) ret['name'] = self.name ret['count'] = self.count return ret
def path(self): return '/tag/%s' % escape_path(self.name)