We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
application.py `import os
from flask import Flask, render_template, request from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker
app = Flask(name)
engine = create_engine("postgresql://postgres:123@localhost:5432/lecture3") db=scoped_session(sessionmaker(bind=engine))
@app.route("/") def index(): flights = db.execute("SELECT * FROM flights").fetchall() return render_template("index.html", flights=flights)
@app.route("/book", methods=["POST"]) def book(): "Book a flight."
name = request.form.get()
if name == 'main': app.run() `
The text was updated successfully, but these errors were encountered:
this is not related to this repo
Sorry, something went wrong.
No branches or pull requests
application.py
`import os
from flask import Flask, render_template, request
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
app = Flask(name)
engine = create_engine("postgresql://postgres:123@localhost:5432/lecture3")
db=scoped_session(sessionmaker(bind=engine))
@app.route("/")
def index():
flights = db.execute("SELECT * FROM flights").fetchall()
return render_template("index.html", flights=flights)
@app.route("/book", methods=["POST"])
def book():
"Book a flight."
if name == 'main':
app.run()
`
The text was updated successfully, but these errors were encountered: