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 = Flask(__name__)
|
||||||
|
app.secret_key = "HURENSOHN"
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def hello_world(): # put application's code here
|
def hello_world(): # put application's code here
|
||||||
return render_template("index.html")
|
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__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=True)
|
app.run(debug=True)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ".:/app"
|
- ".:/app"
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5001:5000"
|
||||||
environment:
|
environment:
|
||||||
- FLASK_APP=app.py
|
- FLASK_APP=app.py
|
||||||
- FLASK_ENV=development
|
- FLASK_ENV=development
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
flask
|
flask
|
||||||
psycopg2-binary
|
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