def get(self): whereclause = ' AND '.join(['%s = FALSE' % m.lower() for m in allmonths()]) logging.debug(whereclause) q = Recipe.gql('WHERE ' + whereclause) templatevalues = RequestContext(self.request, { 'recipes' : [r for r in q] }) path = os.path.join(os.path.dirname(__file__), 'no_season.html') self.response.out.write(template.render(path, templatevalues))
def get(self): months = [newMonthStruct(m) for m in helpers.allmonths()] months[0].cls += " tl" months[-1].cls += " tr" seasons = [ newSeasonStruct('Winter', 'bl two-col', '.winter'), newSeasonStruct('Spring', 'three-col', ''), newSeasonStruct('Summer', 'three-col', ''), newSeasonStruct('Fall', 'three-col', ''), newSeasonStruct('Winter', 'br one-col', '.winter'), ] template_values = RequestContext(self.request, { 'months' : months, 'seasons' : seasons, }) path = os.path.join(os.path.dirname(__file__), 'index.html') self.response.out.write(template.render(path, template_values))