Skip to content

Framework Customization

Wakko edited this page Oct 18, 2026 · 4 revisions

This wiki page explains about framework customization using pallets/flask as an example. Have in mind that different tools means different steps, even if the concept is the same.

The tools used in this tutorial are listed right below:

  • Bash
  • Python3 interpreter
  • VSCode
  • Firefox Web Browser

Customizing Framework

First of all, pallets/flask has to be already installed in a VEnv to begin with the steps of this tutorial, i will leave a pallets/flask setting up tutorial on this link.

Adding Custom Blog Title

To add a custom title in the Flask blog home page, in this scenario is located in <flask-cloned-dir>/examples/tutorial/flaskr/templates/base.html, we will have to edit the mentioned file.

<!-- Change this -->
<title>{% block title %}{% endblock %} - Flaskr Blog</title>

<!-- To this -->
<title>{% block title %}{% endblock %} - CUSTOM PAGE TITLE</title>

<!-- Change this -->
<h1><a href="{{ url_for('index') }}">Flaskr Blog</a></h1>

<!-- To this -->
<h1><a href="{{ url_for('index') }}">CUSTOM HEADER TITLE</a></h1>

Testing Customization

Before starting to work with the framework, the customization must be tested to ensure quality and functionality standards are met.

In this demonstration, the Flask Blog is to be initialized and run using the commands shown right below:

<flask-cloned-dir>/.venv/bin/python3 -m flask --app examples/tutorial/flaskr init-db
<flask-cloned-dir>/.venv/bin/python3 -m flask --app examples/tutorial/flaskr run

If everything ran successfully, a CLI message similar to the message shown right below should be printed automatically:

 * Running on http://127.0.0.1:5000

Important Notes

Remember to replace with the actual path (relative or absolute) of cloned pallets/flask repository on your file system.

Clone this wiki locally