forked from Bilgecrank/hindsite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Bilgecrank:development' into development
- Loading branch information
Showing
19 changed files
with
398 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<mxfile host="app.diagrams.net" modified="2024-02-11T19:56:18.954Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" etag="UhBSb376qlTZVYUAoS33" version="23.1.1" type="github"> | ||
<diagram name="Page-1" id="804swjDIFLC3ij7y9A-g"> | ||
<mxGraphModel dx="633" dy="782" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="0" shadow="0"> | ||
<root> | ||
<mxCell id="0" /> | ||
<mxCell id="1" parent="0" /> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-13" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-1" target="Dt7J_ap_PFdbIPsA8fPm-6" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="245" y="230" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-28" value="db" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-13" vertex="1" connectable="0"> | ||
<mxGeometry x="0.1091" y="4" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-14" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-1" target="Dt7J_ap_PFdbIPsA8fPm-8" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="200" y="250" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="_2fDIvIG2nEXkmLHzcHr-1" value="login_manager" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" vertex="1" connectable="0" parent="Dt7J_ap_PFdbIPsA8fPm-14"> | ||
<mxGeometry x="0.2907" y="9" relative="1" as="geometry"> | ||
<mxPoint x="-13" y="35" as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-15" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-1" target="Dt7J_ap_PFdbIPsA8fPm-2" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="110" y="290" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-30" value="app" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-15" vertex="1" connectable="0"> | ||
<mxGeometry x="0.0669" y="20" relative="1" as="geometry"> | ||
<mxPoint y="-1" as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-16" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-1" target="Dt7J_ap_PFdbIPsA8fPm-5" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="280" y="200" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-27" value="db" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-16" vertex="1" connectable="0"> | ||
<mxGeometry x="0.1486" y="4" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-17" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-1" target="Dt7J_ap_PFdbIPsA8fPm-4" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="320" y="160" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-26" value="db" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-17" vertex="1" connectable="0"> | ||
<mxGeometry x="0.1075" y="8" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-18" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-1" target="Dt7J_ap_PFdbIPsA8fPm-3" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<mxPoint x="220" y="100" as="targetPoint" /> | ||
<Array as="points"> | ||
<mxPoint x="160" y="120" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-25" value="app" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-18" vertex="1" connectable="0"> | ||
<mxGeometry x="0.0217" y="1" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-1" value="db_setup.py" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1"> | ||
<mxGeometry x="170" y="20" width="110" height="40" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-2" value="routes.py" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1"> | ||
<mxGeometry x="80" y="460" width="110" height="40" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-3" value="main.py" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1"> | ||
<mxGeometry x="30" y="130" width="110" height="40" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-19" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-4" target="Dt7J_ap_PFdbIPsA8fPm-5" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="420" y="240" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-31" value="Table Models" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-19" vertex="1" connectable="0"> | ||
<mxGeometry x="-0.0373" y="-3" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-20" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-4" target="Dt7J_ap_PFdbIPsA8fPm-6" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="540" y="350" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-33" value="Table Models" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-20" vertex="1" connectable="0"> | ||
<mxGeometry x="-0.3984" y="-27" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-4" value="/tables" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1"> | ||
<mxGeometry x="400" y="80" width="110" height="40" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-22" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-5" target="Dt7J_ap_PFdbIPsA8fPm-6" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="370" y="330" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-35" value="import" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-22" vertex="1" connectable="0"> | ||
<mxGeometry x="-0.2089" y="-6" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-23" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;exitX=1;exitY=1;exitDx=0;exitDy=0;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-5" target="Dt7J_ap_PFdbIPsA8fPm-8" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="420" y="460" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-34" value="import" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-23" vertex="1" connectable="0"> | ||
<mxGeometry x="-0.2227" y="-23" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-5" value="sql_query.py" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1"> | ||
<mxGeometry x="300" y="240" width="110" height="40" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-21" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-6" target="Dt7J_ap_PFdbIPsA8fPm-8" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="350" y="410" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-37" value="import" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-21" vertex="1" connectable="0"> | ||
<mxGeometry x="-0.5001" y="-5" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-6" value="sql_update.py" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1"> | ||
<mxGeometry x="230" y="330" width="110" height="40" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-24" style="edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=12;startSize=8;endSize=8;" parent="1" source="Dt7J_ap_PFdbIPsA8fPm-8" target="Dt7J_ap_PFdbIPsA8fPm-2" edge="1"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="270" y="500" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-36" value="import" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="Dt7J_ap_PFdbIPsA8fPm-24" vertex="1" connectable="0"> | ||
<mxGeometry x="0.3032" y="-12" relative="1" as="geometry"> | ||
<mxPoint as="offset" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="Dt7J_ap_PFdbIPsA8fPm-8" value="authenticate.py" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1"> | ||
<mxGeometry x="160" y="395" width="130" height="40" as="geometry" /> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Inits variables for the application | ||
""" | ||
import os | ||
from dotenv import load_dotenv | ||
from flask import Flask | ||
from hindsite.db_setup import Base | ||
from hindsite.extensions import db, login_manager | ||
|
||
load_dotenv() | ||
database_uri = ("mysql+pymysql://" | ||
+ os.environ['MYSQLUSER'] + ":" | ||
+ os.environ['MYSQL_ROOT_PASSWORD'] + "@" | ||
+ os.environ['MYSQLHOST'] + ":" | ||
+ os.environ['MYSQLPORT'] + "/" | ||
+ os.environ['MYSQL_DATABASE']) | ||
|
||
app = Flask(__name__) | ||
app.config['SECRET_KEY'] = os.environ['SECRET_KEY'] # Session secret key | ||
app.config['SQLALCHEMY_DATABASE_URI'] = database_uri | ||
app.config['SQLALCHEMY_TRACK_NOTIFICATIONS'] = False | ||
|
||
login_manager.init_app(app) | ||
db.Model = Base | ||
db.init_app(app) | ||
from hindsite.routes import routes # pylint disable=wrong-import-position | ||
app.register_blueprint(routes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.