def json_response():
    jsonitems = []
    repo = Repository()
    items = repo.getAllItems()
    for item in items:
        jsonitems.append({
            'id': item.id,
            'name': item.name,
            'description': item.description,
            'category': item.categoryid
        })
    return jsonify(jsonitems)
def home_page():
    repo = Repository()
    items = repo.getAllItems()
    return render_template('home.html', WebPage=SetWebPageVM(), items=items)