hallo
This commit is contained in:
15
app.py
15
app.py
@@ -1,12 +1,23 @@
|
||||
from flask import Flask, render_template, request
|
||||
from flask import Flask, render_template, request, url_for, redirect, session
|
||||
from sqlalchemy import create_engine, Column, Integer, String
|
||||
from sqlalchemy.orm import declarative_base, sessionmaker
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
app.secret_key = "HURENSOHN"
|
||||
|
||||
@app.route('/')
|
||||
def hello_world(): # put application's code here
|
||||
return render_template("index.html")
|
||||
|
||||
|
||||
@app.route('/login', methods=['GET', 'POST'])
|
||||
def login():
|
||||
return render_template("login.html")
|
||||
|
||||
@app.route('/register', methods=['GET', 'POST'])
|
||||
def register():
|
||||
return render_template("register.html")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
|
||||
@@ -8,7 +8,7 @@ services:
|
||||
volumes:
|
||||
- ".:/app"
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "5001:5000"
|
||||
environment:
|
||||
- FLASK_APP=app.py
|
||||
- FLASK_ENV=development
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
flask
|
||||
psycopg2-binary
|
||||
sqlalchemy
|
||||
0
templates/login.html
Normal file
0
templates/login.html
Normal file
0
templates/register.html
Normal file
0
templates/register.html
Normal file
Reference in New Issue
Block a user