예제 #1
0
파일: web.py 프로젝트: jglamine/proverbity
def quote_page(quote_id=None):
    if quote_id is None:
        return redirect(str(db.get_quote()['id']))
    else:
        quote = db.get_quote(quote_id)
        return render_template('quote_page.html', quote_text=quote['text'],
                               quote_author=quote['author'])
예제 #2
0
파일: web.py 프로젝트: jglamine/proverbity
def quote_page(quote_id=None):
    if quote_id is None:
        return redirect(str(db.get_quote()['id']))
    else:
        quote = db.get_quote(quote_id)
        return render_template('quote_page.html',
                               quote_text=quote['text'],
                               quote_author=quote['author'])
예제 #3
0
파일: web.py 프로젝트: jglamine/proverbity
def ajax_quote():
    json_data = json.dumps(db.get_quote())
    return Response(json_data, mimetype='application/json')
예제 #4
0
파일: web.py 프로젝트: jglamine/proverbity
def ajax_quote():
    json_data = json.dumps(db.get_quote())
    return Response(json_data, mimetype='application/json')