Example #1
0
    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')        
Example #2
0
    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')
Example #3
0
 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')