Exemplo n.º 1
0
 def get(self):
     restrictionList = list()
     
     maxPrice = self.request.get('maxPrice')
     brandName = self.request.get('brand')
     clothingType = self.request.get('clothingType')
     
     if brandName == "":
         brandName = None
     if clothingType == "":
         clothingType = None
     
     try:
         maximumPrice = int(maxPrice)
     except:
         maximumPrice = None
         
     restrictionList.append(maximumPrice)
     restrictionList.append(brandName)
     restrictionList.append(clothingType)
     
     user_id = self.session.get('user_id')
     images = imagesModel.getImages(user_id, restrictionList)
     photosYouLiked = imagesModel.imagesYouLiked(user_id)
     
     
     
     params = {
         user_id: user_id,
         images: images,
         yourLikedPhotos: photosYouLiked
     }
     app_global.render_template(self,'profile.html', params)    
Exemplo n.º 2
0
    def get(self):
        restrictionList = list()

        maxPrice = self.request.get("maxPrice")
        brandName = self.request.get("brand")
        clothingType = self.request.get("clothingType")

        if brandName == "":
            brandName = None
        if clothingType == "":
            clothingType = None

        try:
            maximumPrice = int(maxPrice)
        except:
            maximumPrice = None

        restrictionList.append(maximumPrice)
        restrictionList.append(brandName)
        restrictionList.append(clothingType)

        user_id = self.session.get("user_id")
        images = imagesModel.getImages(user_id, restrictionList)

        params = {user_id: user_id, images: images}
        app_global.render_template(self, "gallery2.html", params)