def login_authentication(): data = request.form if UserService().authenticate_user(data) == True: return render_template('home_page.html') else: return render_template('login_page.html', error="Name or Password incorrect")
def search_user(): if request.method == 'POST': data = request.form search_res = UserService().search_user(data) '''for it in search_res: print(it)''' return render_template('search_result.html', title="Search", segment_details=search_res) return "Not found!"
def create_user(): if request.method == 'POST': data = request.form print(data['Name']) if UserService().create_user(data): return render_template('index.html', title="User Created", user=data) else: return "User not created"
def login(): return render_template('login_page.html')
def search(): return render_template('search_page.html')
def delete(): return render_template('delete_page.html')
def update(): return render_template('update_page.html')
def create(): return render_template('create_page.html')
def signup_user(): data = request.form if UserService().signup_user(data): return render_template('home_page.html') else: return render_template('login_page.html')
def signup(): return render_template('signup_page.html')