Started project with initial Flask layout
This commit is contained in:
9
app/__init__.py
Normal file
9
app/__init__.py
Normal 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
7
app/controllers/top.py
Normal 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')
|
||||
15
app/templates/layout.jinja
Normal file
15
app/templates/layout.jinja
Normal 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>
|
||||
7
app/templates/top/dashboard.jinja
Normal file
7
app/templates/top/dashboard.jinja
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends 'layout.jinja' %}
|
||||
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>Welcome to the Muspah dashboard!</p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user