Ejemplo n.º 1
0
def student_add():
    """Add a student."""
    first_name = request.form.get('fname')
    last_name = request.form.get('lname')
    github = request.form.get('git')
    hackbright.make_new_student(first_name, last_name, github)
    return render_template('add_results.html', github=github)
def student_display():
    """Display success message and link to student account."""

    first_name = request.form.get('fname')
    print(first_name)

    last_name = request.form.get('lname')
    print(last_name)

    github = request.form.get('gitname')
    # QUERY = """
    #     INSERT INTO students (first_name, last_name, github)
    #       VALUES (:fname, :lname, :gitname)
    #     """

    # hackbright.db.session.execute(QUERY, {'fname': first_name,
    #                            'lname': last_name,
    #                            'gitname': github})

    # hackbright.db.session.commit()

    hackbright.make_new_student(first_name, last_name, github)

    print(f"Successfully added student: {first_name} {last_name} {github}")

    return render_template('success_student.html',
                           first=first_name,
                           last=last_name,
                           github=github)
def student_add():
    """Add a student"""
    firstname = request.form.get("firstname")
    lastname = request.form.get("lastname")
    github = request.form.get("github")
    hackbright.make_new_student(firstname, lastname, github)
    return "The student information has been successfully added!"
Ejemplo n.º 4
0
def student_add():
    """Add a student."""
    Fname = request.form.get("fname")
    Lname = request.form.get("lname")
    Github = request.form.get("github")
    hackbright.make_new_student(Fname, Lname, Github)
    return render_template('new_student_confirm.html', fname=Fname, lname=Lname, github=Github)
Ejemplo n.º 5
0
def student_add():
	"""Add a student."""
	first_name = request.form.get('first')
	last_name = request.form.get('last')
	github = request.form.get('github')
	hackbright.make_new_student(first_name, last_name, github)
	return render_template("student_add.html")
Ejemplo n.º 6
0
def add_student():
    first = request.form.get('first_name')
    last = request.form.get('last_name')
    github = request.form.get('github')
    hackbright.make_new_student(first, last, github)

    return render_template("confirmation-page.html")  # first = first,
Ejemplo n.º 7
0
def student_add():
    """Add a student."""
    first_name = request.form.get('firstname')
    last_name = request.form.get('lastname')
    github = request.form.get('github')
    hackbright.make_new_student(first_name, last_name, github)
    return render_template('add_confirmation.html', first=first_name, last=last_name, github=github)
def new_student():
    fname = request.form.get('fname')
    lname = request.form.get('lname')
    github = request.form.get('github')
    hackbright.make_new_student(fname, lname, github)

    return render_template('success.html')
Ejemplo n.º 9
0
def student_added_successfully():

    first = request.form.get('first')
    last = request.form.get('last')
    github = request.form.get('github')
    hackbright.make_new_student(first, last, github)

    return render_template("student_added.html", github=github)
def student_added():
    first_name = request.form.get("first")
    last_name = request.form.get("last")
    github = request.form.get("github")

    hackbright.make_new_student(first_name, last_name, github)

    return render_template("student_added.html",first=first_name, last=last_name, github = github)
Ejemplo n.º 11
0
def student_add():
    """Add a student."""
    first = request.form.get("first")
    last = request.form.get("last")
    github = request.form.get("github")
    hackbright.make_new_student(first, last, github)
    flash(github + ' has been added')
    return redirect("/")	
def add_student_confirmation():
    """Show a confirmation that a student has been added to the DB"""

    fname = request.form.get('given-name')
    lname = request.form.get('surname')
    github = request.form.get('github')
    hackbright.make_new_student(fname, lname, github)
    return render_template("add-student-confirm.html", github = github)
Ejemplo n.º 13
0
def student_add_success():
    """Add a student."""
    first_name = request.form.get("first_name")
    last_name = request.form.get("last_name")
    github = request.form.get("github")

    hackbright.make_new_student(first_name, last_name, github)
    return render_template("student_add_success.html", github=github)
def student_add():
    first_name = request.form.get("firstname")
    last_name = request.form.get("lastname")
    github = request.form.get("github")

    hackbright.make_new_student(first_name, last_name, github)

    return render_template('add-student-confirmation.html', github=github)
def add_student():
    """add student from form data to database, displays confirmation"""
    first_name = request.form.get("first")
    last_name = request.form.get("last")
    github = request.form.get("github")

    hackbright.make_new_student(first_name, last_name, github)
    return render_template("confirm.html", first=first_name, last=last_name, github=github)
Ejemplo n.º 16
0
def add_student():
    """Adds new student to database"""
    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github = request.form.get('github')
    hackbright.make_new_student(first_name=first_name,last_name=last_name, github=github)
    html = render_template('student_info.html', first=first_name, last=last_name, github=github)
    return html
def student_add():
    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github = request.form.get('github')

    hackbright.make_new_student(first_name,last_name,github)

    return "Student added!"
Ejemplo n.º 18
0
def student_add():
    """Add a student."""
    first_name = request.form.get('f_name')
    last_name = request.form.get("l_name")
    github = request.form.get('github_name')

    hackbright.make_new_student(first_name, last_name, github)
    return render_template("acknowledge_student.html")
def student_submit():
    first_name=request.form.get('firstname')
    last_name=request.form.get('lastname')
    git_hub=request.form.get('github')
    hackbright.make_new_student(first_name, last_name, git_hub)
    html = render_template('student_info.html', first=first_name, last=last_name, github=git_hub)

    return html
def student_add_confirmation():
    """Show confirmation page after new student form submitted"""

    fname = request.form.get('fname')
    lname = request.form.get('lname')
    github = request.form.get('github')
    hackbright.make_new_student(fname, lname, github)
    
    return render_template('student_add_confirmation.html', fname=fname, lname=lname, github=github)
Ejemplo n.º 21
0
def student_add():
    """ Adds student to database"""
    fname = request.form.get("fname")
    lname = request.form.get("lname")
    github = request.form.get("github")

    hackbright.make_new_student(fname, lname, github)

    return render_template("added_student.html")
def student_add():

    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github_username = request.form.get('github_username')

    hackbright.make_new_student(first_name, last_name, github_username)

    return redirect("/add_student_form")
def create_new_student():
    """Add a new student."""

    first = request.form.get("first_name")
    last = request.form.get("last_name")
    github = request.form.get("github")
    hackbright.make_new_student(first, last, github)

    return render_template("confirmation.html", github=github)
def complete_add():

    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github = request.form.get('github')

    hackbright.make_new_student(first_name, last_name, github)
    
    return render_template("complete_add.html",first=first_name, last=last_name, github=github)
def confirm_add():
    """ Acknowledge new student was added."""

    first_name = request.form.get('firstname')
    last_name = request.form.get('lastname')
    github = request.form.get('github')

    hackbright.make_new_student(first_name, last_name, github)
    return render_template('student_success.html', first=first_name, last=last_name, github=github)
def add_a_student():
    """Add a student to database."""

    first = request.form.get('first')
    last = request.form.get('last')
    github = request.form.get('github')
    hackbright.make_new_student(first, last, github)

    return render_template("success.html", github=github)
Ejemplo n.º 27
0
def make_new_student():
    first = request.form.get('first')
    last = request.form.get('last')
    github = request.form.get('github')
    hackbright.make_new_student(first, last, github)
    return render_template('new-student.html',
                           first=first,
                           last=last,
                           github=github)
Ejemplo n.º 28
0
def student_add():
    """Adds a new student to the database"""

    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github = request.form.get('github')
    hackbright.make_new_student(first_name, last_name, github)

    return render_template("student_added.html", github=github)
Ejemplo n.º 29
0
def student_added():
    """Add a student Confirmation."""
    first_name = request.form.get("first_name")
    last_name = request.form.get("last_name")
    github = request.form.get("github")

    hackbright.make_new_student(first_name, last_name, github)

    return render_template("student_added.html")
Ejemplo n.º 30
0
def student_add_display():

    first_name = request.form.get("first")
    last_name = request.form.get("last")
    github = request.form.get("github")
    hackbright.make_new_student(first_name, last_name, github)

    return render_template("acknowledgement.html",
                            github=github)
def student_added():
    """Add a student"""
    first_n = request.form.get("first_name")
    last_n = request.form.get("last_name")
    gh = request.form.get("github")

    hackbright.make_new_student(first_n, last_n, gh)

    return render_template("student-added.html", github=gh)
def student_results():
	"""Show form for searching for a student."""

	first = request.form.get('first-name')
	last = request.form.get('last-name')
	github = request.form.get('github')
	hackbright.make_new_student(first, last, github)

	return render_template("new_student_results.html",first=first, last=last, github=github)
Ejemplo n.º 33
0
def student_add():

    first = request.form.get("first_name")
    last = request.form.get("last_name")
    github = request.form.get("github")

    hackbright.make_new_student(first, last, github)
    return render_template("student_added.html", first=first, last=last,
                           github=github)
def student_add():
    """Add a student."""

    first = request.form.get("first")
    last = request.form.get("last")
    github = request.form.get("github")
    hackbright.make_new_student(first, last, github)

    return redirect ("/success")
def successfully_added():

    first_name = request.form.get('fname')
    last_name = request.form.get('lname')
    github = request.form.get('github')

    hackbright.make_new_student(first_name, last_name, github)

    return render_template('successfully-added.html', github=github)
def student_add():
    """Add a student."""

    first_name = request.form.get('firstname')
    last_name = request.form.get('lastname')
    github = request.form.get('github')
    hackbright.make_new_student(first_name, last_name, github)

    return "You succeeded"
Ejemplo n.º 37
0
def student_add():
    """Add a student."""
    fname = request.form.get('fname')
    lname = request.form.get('lname')
    github = request.form.get('github')

    hackbright.make_new_student(fname, lname, github)

    return render_template("successful_add.html", first=fname, last=lname)
Ejemplo n.º 38
0
def student_add():
    """Add a student."""
    github = request.form.get('github')
    first = request.form.get('first')
    last = request.form.get('last')

    hackbright.make_new_student(first, last, github)

    return render_template("student_added.html", github=github)
def send_confirmation():
    '''Confirms student has been added'''

    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github = request.form.get('github')

    hackbright.make_new_student(first_name, last_name, github)

    return render_template('add_confirmation.html', github=github)
Ejemplo n.º 40
0
def add_student():
    """Add student to database and confirmation message for user."""

    first = request.form.get("first")
    last = request.form.get("last")
    github = request.form.get("github")

    hackbright.make_new_student(first, last, github)

    return render_template("student_add_confirm.html", github=github)
Ejemplo n.º 41
0
def student_add():
    """Add a student."""

    fname = request.form.get('fname')
    lname = request.form.get('lname')
    github = request.form.get('github')

    hackbright.make_new_student(fname, lname, github)

    return "Student added! <br><a href='student?github=%s'>Student Info</a>" % github
Ejemplo n.º 42
0
def add_student():
    """Show confirmation for adding a student."""

    github = request.form.get('github')
    fname = request.form.get('fname')
    lname = request.form.get('lname')
    hackbright.make_new_student(fname, lname, github)
    html = render_template("student_added.html", github=github)

    return html
Ejemplo n.º 43
0
def new_student():
    """Show the new student added"""

    fname = request.form.get("fname")
    lname = request.form.get("lname")
    github = request.form.get("github")

    hackbright.make_new_student(fname, lname, github)

    return render_template("student_added.html", github=github)
def add_database():
    """Add a student."""

    github_input = request.form.get('github')
    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')

    hackbright.make_new_student(first_name,last_name,github_input)

    return redirect("/student-search")
Ejemplo n.º 45
0
def student_add():

    first_name = request.form.args("firstname")
    last
    GitHub

    hackbright.make_new_student(first_name, last_name, github)
    """Add a student."""

    return  render_template("success")
def added_student():
    """Confirm a student was added to the database."""

    first = request.form.get("first")
    last = request.form.get("last")
    github = request.form.get("github")

    hackbright.make_new_student(first, last, github)

    return render_template("student_confirmed.html", first=first, last=last, github=github)
def student_add():
    """add a student."""
    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github = request.form.get('github')

    hackbright.make_new_student(first_name, last_name, github)

    flash("New student was added!")
    return redirect(f"/student?github={github}")
Ejemplo n.º 48
0
def display_new_student():
    """Show information about a new student."""

    github = request.form.get('github')
    first = request.form.get('first')
    last = request.form.get('last')

    hackbright.make_new_student(first, last, github)

    return render_template('new_student_confirmation.html', github=github)
Ejemplo n.º 49
0
def student_add():
    """Add a student."""

    github = request.form.get("github")
    first_name = request.form.get("first-name")
    last_name = request.form.get("last-name")
    hackbright.make_new_student(first_name, last_name, github)

    return render_template("user_added.html", first_name=first_name,
                            last_name=last_name, github=github)
def student_display():
    """Confirmation page of added student. """

    fname = request.form.get("first_name")
    lname = request.form.get("last_name")
    github = request.form.get("github")
    html = render_template("student_info.html", first=fname, last=lname, github=github)
    hackbright.make_new_student(fname, lname, github)
    print "%s is the GitHub account for %s %s" % (github, fname, lname)
    return html
def confirm_student():

    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name') 
    github = request.form.get('github')
    hackbright.make_new_student(first_name, last_name, github)
    return render_template("confirmation.html",
                            first_name=first_name,
                            last_name=last_name,
                            github=github)
def add_student():
    """Add a student"""
    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github = request.form.get('github')

    hackbright.make_new_student(first_name, last_name, github)
    flash(f"{first_name} added")

    return redirect("/")
def add_confirm():
    """Takes info user submitted on /student-add, adds to DB, and displays confirmation"""
    fname = request.form.get("firstname")
    lname = request.form.get("lastname")
    ghub = request.form.get("github")

    hackbright.make_new_student(fname, lname, ghub)

    return render_template("add_confirmation.html", firstname=fname,
                            lastname=lname, github=ghub)
def student_add_confirmation():
    """Confirm student has been added."""

    first = request.form.get('firstname')
    last = request.form.get('lastname')
    github = request.form.get('github')
    hackbright.make_new_student(first, last, github)

    return render_template("student_add_confirmation.html",
                            github=github)
def add_student():
    """Using form data, add new student to database."""
    
    new_first = request.form.get("first")
    new_last = request.form.get("last")
    new_github = request.form.get("github")
    hackbright.make_new_student(new_first, new_last, new_github)

    return render_template("new_student_confirmation.html",
                           first=new_first, last=new_last)
def student_confirmation():
    
    first = request.form.get('first')
    last = request.form.get('last')
    github = request.form.get('github')

    hackbright.make_new_student(first, last, github)

    return render_template("student_confirmation.html",
                            github=github)
def display_student():
    """Add new student to database."""

    first_name = request.form.get('first')
    last_name = request.form.get('last')
    github = request.form.get('github')

    hackbright.make_new_student(first_name, last_name, github)

    return render_template("new_student.html", github=github)
def add_student():
    first_name = request.args.get('first_name')
    last_name = request.args.get('last_name')
    github = request.args.get('github')

    hackbright.make_new_student(first_name, last_name, github)

    return render_template("added-student.html",
                            first=first_name,
                            last=last_name,
                            github=github)     
def student_add():
    """Add a student to database."""

    github = request.form.get('github')
    fname = request.form.get('fname')
    lname = request.form.get('lname')
    hackbright.make_new_student(fname, lname, github)
    return render_template("add_confirmation.html",
                           first=fname,
                           last=lname,
                           github=github)
Ejemplo n.º 60
0
def student_added():
    """Student is added"""

    first_name = request.form.get('first_name')
    last_name = request.form.get('last_name')
    github = request.form.get('github')

    hackbright.make_new_student(first_name, last_name, github)

    return render_template("student_added.html",
                            github=github)