This is a playground repository to test and demo Jacob.
This application is built using Flask, a lightweight WSGI web application framework. It follows a modular structure using Flask Blueprints for organizing routes and templates.
Routes are defined in /app/main/routes.py
using Flask Blueprints. The main blueprint is initialized in /app/main/__init__.py
:
from flask import Blueprint bp = Blueprint('main', name)
Current routes in the application:
Root Route ('/')
index()
index.html
Favicon Route ('/favicon.ico')
favicon()
Templates are stored in the /app/templates/
directory and are rendered using Flask's render_template
function. The application uses Jinja2 templating engine for dynamic content rendering.
Current templates:
index.html
- Main page template404.html
- Not found error page500.html
- Internal server error pageTo add a new route and template to the application:
Create a new template file in /app/templates/
:
{% extends "base.html" %} {% block content %}
{% endblock %}
Add a new route in /app/main/routes.py
:
@bp.route('/new-page', methods=['GET'])
def new_page():
return render_template('new_page.html', title='New Page')
Route Naming
Template Organization
Route Implementation
Error Handling