def delete(): if session.get('role') != 'admin': return redirect('/') id = request.args.get('id') db.deluser(id) return render_template('userlist.html', users=db.userlist(), username=session.get('name'))
def deluser(email, token): if (token != app_token): abort(404) if (db.deluser(email)): return "Deleted User" else: return "User doesn't Exist"
def unsubscribe(email): if (db.deluser(email)): return render_template('unsubscribed.html') else: text = 'You are not subscribed to this newsletter.' return render_template('error.html', text=text, again=False)
def delete(): if session.get('role') != 'admin': return redirect('/') name = request.args.get('name') db.deluser(name) return redirect('/user')
def delete(): id = request.args.get('id') db.deluser(id) return render_template('userlist.html',users = db.userlist())
def delete(): id = request.args.get('id') db.deluser(id) return render_template('userlist.html', users=db.userlist())
def delete(): if session.get('role') != 'admin': return redirect('/login') id = request.form.get('id') db.deluser(id) return json.dumps({'code': 0, 'result': 'delete success!'})
def delete(): if session.get('role') != 'admin': return redirect('/') id = request.args.get('id') db.deluser(id) return render_template('userlist.html',users = db.userlist(),username = session.get('name'))