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])
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
def download(): src = request.args.get('welche') table = manage.fetch(src) data = table[0] gene(data) return redirect(url_for('load'))
def quelle(): src = request.args.get('welche') table = manage.fetch(src) return render_template("table.html", table=table[0], que=table[1])