def createProductHandle(self, userId, productName, description, expireDate, unity, price, categoria, delivery=None): newProduct = Product(userId, productName, description, expireDate, unity, price, categoria, delivery) tmpl = env.get_template('produtos.html') productsList = Product.getProductsList() if productsList is None : productsList = [] return tmpl.render(products=productsList,title = 'Produtos Listados')
def createUserHandle(self,userId,idForUser,email,name,mobile,interests=None,onLogStatus=None): tmpl = env.get_template('produtos.html') if(userId == "cpf"): newUser = Person(idForUser,email,mobile,interests) else: newUser = Company(idForUser,email,mobile) productsList = Product.getProductsList() if productsList is None : productsList = [] print onLogStatus return tmpl.render(products=productsList,title = 'Produtos Listados')
def produtos(self): tmpl = env.get_template('produtos.html') productsList = Product.getProductsList() if productsList is None : productsList = [] return tmpl.render(products=productsList,title = 'Produtos Listados')