def get(self): filterMethod = self.request.get('filterMethod') lenses = renderClasses.appendStats(lensList, filterMethod = filterMethod) sortMethod = self.request.get('sortMethod') activePill = renderClasses.activePill(sortMethod) self.render('front.html', lenses=sortLenses(lenses, sortMethod), activePill = activePill, homeActive = 'active', filterMethod=filterMethod)
def get(self, lensID): localUser = localUsers.localUser() lens = getLens(lensID) lensStats = renderClasses.lensStats(lensID) sortMethod = self.request.get('sortMethod') activeTab = self.request.get('activeTab') if lens is not None: self.render('lensPage.html', lens = lens, lensStats = renderClasses.lensStats(lensID), userComment = renderClasses.userComment(lensID, localUser), comments = renderClasses.threeColumns(lensID, localUser, sortMethod=sortMethod), activePill = renderClasses.activePill(sortMethod), activeTab = renderClasses.activeTab(activeTab), uses = renderClasses.lensUses(lensID), userUses = renderClasses.userUses(lensID, localUser), lensStatus = userBag.lensStatus(localUser, lensID = lensID)) else: self.redirect('/')