Example #1
0
def catalog():
    categories = db_categories(session)
    latest_items = db_latest_items(session)
    return render_template('catalog.html',
                           categories=categories,
                           latest_items=latest_items,
                           is_logged_in=is_already_logged_in(login_session))
def catalog_as_json():
    categories = db_categories(session)
    categories = [c.serialize for c in categories]

    latest_items = db_latest_items(session)
    latest_items = [i.serialize for i in latest_items]

    return json.dumps({ 'categories': categories, 'latest_items': latest_items })
Example #3
0
def catalog_as_json():
    categories = db_categories(session)
    categories = [c.serialize for c in categories]

    latest_items = db_latest_items(session)
    latest_items = [i.serialize for i in latest_items]

    return json.dumps({'categories': categories, 'latest_items': latest_items})
def catalog():
    categories = db_categories(session)
    latest_items = db_latest_items(session)
    return render_template('catalog.html', categories=categories, latest_items=latest_items,
                           is_logged_in=is_already_logged_in(login_session))