Example #1
0
        "description":"Oh, here we go with the colors again..",
        "post_date":datetime.datetime(2016, 1, 1, 13, 00),
        "user_id":random.randint(1,10) },
    24: {"title":"Rooster Potatoes by the Pound",
        "category":"Vegetable",
        "price":"3.00",
        "price_type":"each",
        "description":"Way to mix it up.",
        "post_date":datetime.datetime(2016, 1, 1, 13, 00),
        "user_id":random.randint(1,10) } }

for i in range(0, 25):
    item = Item(item_dict[i]["title"], item_dict[i]["category"], \
        item_dict[i]["price"], item_dict[i]["price_type"], \
        item_dict[i]["description"], item_dict[i]["user_id"])
    item.post_date = item_dict[i]["post_date"]
    db.session.add(item)
    db.session.commit()



"""        
    25: {"title" = "Eggs Are Good",
        "category" = "Protein",
        "price" = ".15",
        "price_type" = "each",
        "description" = "Some good eggs here, folks",
        "post_date" = datetime.datetime(2016, 1, 1, 13, 00),
        "user_id" = random.randint(0,9) },
    26: {"title" = "Eggs Are Good",
        "category" = "Protein",