Started project with initial Flask layout

This commit is contained in:
Gregory Ballantine
2025-11-18 15:30:33 -05:00
parent 75af9c7f96
commit 5db50bc271
5 changed files with 41 additions and 0 deletions

3
app.py Normal file
View File

@@ -0,0 +1,3 @@
import .app
app.create_app()

9
app/__init__.py Normal file
View File

@@ -0,0 +1,9 @@
from flask import Flask
from .controllers.top import top_bp
def create_app():
app = Flask(__name__)
app.register_blueprint(top_bp)
return app

7
app/controllers/top.py Normal file
View File

@@ -0,0 +1,7 @@
from flask import Blueprint, render_template
top_bp = Blueprint('top', __name__, url_prefix='/')
@top_bp.route('/')
def profile():
return render_template('top/dashboard.jinja')

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %} | Muspah</title>
</head>
<body>
<header>
<h1>Muspah</h1>
</header>
<main>
{% block content %}{% endblock %}
</main>
</body>
</html>

View File

@@ -0,0 +1,7 @@
{% extends 'layout.jinja' %}
{% block title %}Dashboard{% endblock %}
{% block content %}
<p>Welcome to the Muspah dashboard!</p>
{% endblock %}