mirror of
https://github.com/iritmaximus/timetrials.git
synced 2026-10-12 19:13:48 +03:00
changed the project structure again
This commit is contained in:
+1
-1
@@ -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"]
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
||||||
@@ -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"
|
||||||
@@ -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"
|
||||||
Reference in New Issue
Block a user