Ejemplo n.º 1
0
def addData():
    if request.method=='POST':
        newData=Register(name=request.form['name'],
            surname=request.form['surname'],
            mobile=request.form['mobile'],
            email=request.form['email'],
            branch=request.form['branch'],
            roll=request.form['roll'])
Ejemplo n.º 2
0
def addData():
    if request.method == 'POST':
        newData = Register(name=request.form['name'],
                           surname=request.form['surname'],
                           email=request.form['email'],
                           branch=request.form['branch'],
                           mobile=request.form['mobile'])
        session.add(newData)
        session.commit()
        return redirect(url_for('showData'))
    else:
        return render_template('add.html')
Ejemplo n.º 3
0
def adddata():
	if request.method=='POST':
		newdata=Register(name=request.form['name'],
			surname=request.form['surname'],
			email=request.form['email'],
			branch=request.form['branch'])
		session.add(newdata)
		session.commit()
		flash("successfully added new data")
		return redirect(url_for('showdata'))
	else:
		return render_template('add.html')
Ejemplo n.º 4
0
def addData():
    if request.method == 'POST':
        newData = Register(name=request.form['name'],
                           surname=request.form['surname'],
                           mobile=request.form['mobile'],
                           branch=request.form['branch'],
                           role=request.form['role'])
        session.add(newData)
        session.commit()
        flash("Data added....")
        return redirect(url_for('showdb'))
    else:
        return render_template("new.html")
Ejemplo n.º 5
0
def addData():
	if request.method=="POST":
		newData=Register(name=request.form['name'],
			             surname=request.form['surname'],
			             mobile=request.form['mobile'],
			             email=request.form['email'],
			             branch=request.form['branch'],
			             roll=request.form['roll'])
		session.add(newData)
		session.commit()
		flash("new data added")
		return redirect(url_for("Showdata"))
	else:
		return render_template("form1.html")
Ejemplo n.º 6
0
def form():
    if request.method=='POST':
        newData=Register(name=request.form['name'],
            sur_name=request.form['sur_name'],
            mobile=request.form['mobile'],
            email=request.form['email'],
            branch=request.form['branch'],
            role=request.form['role'])
        session.add(newData)
        session.commit()
        flash("New data added {}".format(editedData.name))
        return redirect(url_for('showData'))
    else:
        return render_template("form.html")
Ejemplo n.º 7
0
def showform():
    if request.method == 'POST':
        newData = Register(name=request.form['name'],
                           surname=request.form['surname'],
                           mobile=request.form['mobile'],
                           email=request.form['email'],
                           branch=request.form['branch'],
                           role=request.form['role'])
        session.add(newData)
        session.commit()
        flash("New Data Added...")
        return redirect(url_for('showData'))
    else:
        return render_template('form.html')