Untitled

Anonymous
plain_text
10/10/2022 10:59 PM
700 B
16
Indexable
@app.route('/post-update', methods=['POST'])
def postup():
  # dagsetning
  now = datetime.now()
  datestr = now
  isdate = datestr.strftime('%d/%m, %Y. Kl. %H:%M)

  if request.method == 'POST':
    db.child('pistlar').child( request.form['id'] ).update({
      'Fyrirsögn':request.form['Fyrirsögn'],
      'Pistill':request.form['Pistill'],
      'Höfundur':request.form['Höfundur'],
      'Dagsetning':isdate
      })
    return redirect('/secure')
  else:
    return render_template('error405.html')
Editor is loading...