def insert(): if request.form: name = request.form['name'] password = request.form['password'] data = request.form userobj = users.Users() userobj.insert(data) if 'name' != None and 'password' != None: userobj = users.Users() return redirect('/users') return render_template("insert_users.html", data={})
def update_users(): data = request.form user_obj = users.Users() user_obj.updateUser(data) one_user = user_obj.getUser(data['id']) if 'name' != None and 'password' != None: userobj = users.Users() return redirect('/users') return render_template("edit_users.html", data=one_user)
def render_static(): testSession = session.get('username', None) print testSession, "testSession" if request.form: name = request.form['name'] password = request.form['password'] if name != "" and password != "": user = users.Users() user.checkUserLogin(name, password) print name, password session["username"] = name return render_template("webpage.html")
from lib import users myobj = users.Users() #myobj.update("sree1", 2) print myobj.getUsers()
def homepage(): user = users.Users() return render_template("homepage.html")
def edit_users(id): user_obj = users.Users() one_user = user_obj.getUser(id) return render_template("edit_users.html", data=one_user)
def render_users(): user_obj = users.Users() all_users = user_obj.getUsers() return render_template("users.html", data=all_users)
def index(): user_obj = users.Users() return render_template("index.html")