Beispiel #1
0
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={})
Beispiel #2
0
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)
Beispiel #3
0
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")
Beispiel #4
0
from lib import users

myobj = users.Users()

#myobj.update("sree1", 2)
print myobj.getUsers()
Beispiel #5
0
def homepage():
    user = users.Users()
    return render_template("homepage.html")
Beispiel #6
0
def edit_users(id):
    user_obj = users.Users()
    one_user = user_obj.getUser(id)
    return render_template("edit_users.html", data=one_user)
Beispiel #7
0
def render_users():
    user_obj = users.Users()
    all_users = user_obj.getUsers()
    return render_template("users.html", data=all_users)
Beispiel #8
0
def index():
    user_obj = users.Users()
    return render_template("index.html")