Exemplo n.º 1
0
def add():
    word = request.form['wort']
    mean = request.form['bedeutung']
    examp = request.form['beispiel']
    src = request.form['quelle']
    qu_id = manage.new_pack(word, mean, examp, src)
    table = manage.fetch(qu_id)
    return render_template("table.html", table=table[0], que=table[1])
Exemplo n.º 2
0
def download():
    src = request.args.get('welche')
    table = manage.fetch(src)
    html = render_template("pdf_table.html", table=table[0], que=table[1], date=datetime.datetime.now().strftime("%d-%m-%y:::%H:%M"))
    file_class = Pdf()
    pdf = file_class.render_pdf('vokabeln', html)
    headers = {
        'content-type': 'application.pdf',
        'content-disposition': 'attachment; filename=vokabeln.pdf'}
    return pdf, 200, headers
Exemplo n.º 3
0
def download():
    src = request.args.get('welche')
    table = manage.fetch(src)
    data = table[0]
    gene(data)
    return redirect(url_for('load'))
Exemplo n.º 4
0
def quelle():
    src = request.args.get('welche')
    table = manage.fetch(src)
    return render_template("table.html", table=table[0], que=table[1])