def showContent(self): featuredProjects = mProject.getFeaturedProjectsDictionary(self.db) self.template_data['featured_projects'] = dict( data=featuredProjects, json=json.dumps(featuredProjects)) return self.render('cms_content')
def getFeaturedProjects(self): # overkill to get the full dictionary, but it's a small admin-only call projects = mProject.getFeaturedProjectsDictionary(self.db) return self.json(projects)
def showContent(self): featuredProjects = mProject.getFeaturedProjectsDictionary(self.db) self.template_data['featured_projects'] = dict(data = featuredProjects, json = json.dumps(featuredProjects)) return self.render('cms_content')