Server - Contents

Advance Flask

revised: 05-Apr-2025

Prerequisites: The Ubuntu22.04 Server setup and familiarity with the 3-page Flask website setup. Found here: Flask 3pg Site

Note:
1. It is strongly recommended to read through the README.md files as the web-based presentations are found to be out-dated or have errors. The demos below have all been recently up-dated and tested. It is assumed that the demo has been uploaded to a home directory (eg. /home/sammy).
2. Most of the demos rely on the use of Sqlite3. If it is not installed do the following:
sammy@imega:$ sudo apt-get install libsqlite3-dev
sammy@imega:$ sudo apt-get install sqlite3

Demo#1 - Flask Blog Tutorial [Click here]

The full tutorial is found at medium.com - building-a-flask-blog. This simple demo shows how a database can easily be associated with significant ability in a Flask app.

A second excellent Blog demo called Flaskr: A Flask Blog App features register and login ability.

Demo#2 - Flask Roles Tutorial

There are two very interesting Flask app demo dealing with roles. This first one created by Colin Kraczkowsky flask-admin-and-flask-security has but two roles: the admin and the permitted login user. This could be useful for private group sharing info on a website.
This second demo has considerably wider options in its design and roles for user. It is found among the examples given in this git repository: dpgaspar:Flask-AppBuilder

Demo#3 - Other Useful and Tested Flask Apps

Again great thanks to another coder, Ashutosh Krishna, where he has provided very good app that would assist any office seeking to have private web-pages available to its staff. His code is found at here.
Using this as a foundation with some minor corrections, the application has been developed using Flask_Login and Bootstrap5. The demo based on a database (Sqlite3 but easy to re-configure if one wishes to use PostgreSQL) and with Flask-Mail behind a contact page (assuming a tandemn iRedmail setup). All-in-all, it offers a good starting point for an institutional website allowing only new registrations through an administrator.

A few other workable demos are also made available.