changed the project structure again

This commit is contained in:
iritmaximus
2023-01-20 22:16:48 +02:00
parent af270ac196
commit e5ebaa0a74
11 changed files with 55 additions and 40 deletions
+1 -1
View File
@@ -7,4 +7,4 @@ RUN pip3 install -r requirements.txt
COPY . . COPY . .
CMD [ "gunicorn", "-w", "4", "flaskr.app:app", "-b", "0.0.0.0:5000"] CMD [ "gunicorn", "-w", "4", "flaskr:app", "-b", "0.0.0.0:5000"]
+12
View File
@@ -0,0 +1,12 @@
from flask import Flask
from flaskr.views import general
from flaskr.views import familytree
from flaskr.views import users
app = Flask(__name__)
app.register_blueprint(general.mod)
app.register_blueprint(familytree.mod)
app.register_blueprint(users.mod)
-12
View File
@@ -1,12 +0,0 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def test():
return "This is the familytree backend"
if __name__ == "__main__":
app.run(debug=True)
-11
View File
@@ -1,11 +0,0 @@
from app import app
@app.route("/familytree")
def familytree():
return "All of the familytree things"
@app.route("/familytree/add")
def add_member_familytree():
return "New member to the familytree"
View File
-16
View File
@@ -1,16 +0,0 @@
from app import app
@app.route("/login")
def login():
return "Login to the site"
@app.route("/user")
def user():
return "Account information"
@app.route("/users/create")
def create_user():
return "New user"
+13
View File
@@ -0,0 +1,13 @@
from flask import Blueprint
mod = Blueprint("familytree", __name__)
@mod.route("/familytree")
def show_familytree():
return "All of the familytree things"
@mod.route("/familytree/add")
def add_member_familytree():
return "New member to the familytree"
+13
View File
@@ -0,0 +1,13 @@
from flask import Blueprint
mod = Blueprint("general", __name__)
@mod.route("/")
def test_backend():
return "This is the working backend"
@mod.route("/login")
def login():
return "Login to the site"
+13
View File
@@ -0,0 +1,13 @@
from flask import Blueprint
mod = Blueprint("users", __name__)
@mod.route("/users/<id>")
def user(_id):
return "Account information"
@mod.route("/users/create")
def create_user():
return "New user"
+3
View File
@@ -0,0 +1,3 @@
from flaskr import app
app.run(debug=True)