This commit is contained in:
2025-09-12 08:27:41 +02:00
parent f59275deea
commit fb60f8582d
5 changed files with 16 additions and 4 deletions

15
app.py
View File

@@ -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)

View File

@@ -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

View File

@@ -1,2 +1,3 @@
flask flask
psycopg2-binary psycopg2-binary
sqlalchemy

0
templates/login.html Normal file
View File

0
templates/register.html Normal file
View File