Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from flask import Flask, render_template
- import psycopg2
- app = Flask(__name__)
- @app.route('/')
- def main():
- conn = psycopg2.connect(dbname='kursDB', user='postgres', password='13001', host='127.0.0.1')
- cursor = conn.cursor()
- cursor.execute('SELECT * FROM CAR')
- return render_template('login.html')
- @app.route('/login')
- def login():
- return render_template('login.html')
- @app.route('/newUser')
- def newUser():
- return render_template("newUser.html")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement