Exemplo n.º 1
0
def eventAll():
    logger.debug('all event')
    q_event = Event.query
    l_events = list()
    for event in q_event:
        l_events.append(
            dict(id=event.id,
                 time_start=event.time_start,
                 time_end=event.time_end,
                 title=event.title,
                 photo='http://placehold.it/300x200',
                 content=event.content.split('<hr />')[0]))

    return jsonify(l_events)
Exemplo n.º 2
0
def about():
    logger.debug("about")
    q_about = About.query.first()
    return jsonify(content=q_about.content)