Posted:
Edited:
Check out
The Flask Mega-Tutorial
by Miguel Grinberg. This tutorial highlights the flexibility of the Flask
micro framework
.
With assistance from the above this site includes:
Flask-SqlAlchemy
's database object-relational mapping. This is a good fit for object-oriented programming, and databases can run under SQLite, and PostgreSQL (with psycopg2). Using Flask-SqlAlchemy, after using Python's native sqlite3, it is easy to see why this would be the one to roll with. Those used to working with queries in the SQL console might find a preference for the
str
methodology that sqlite3 incorporates, however, seeing as SQLite is not appropriate as a persistent production-grade database SQLAlchemy is the pick.
current_user
instance.
Flask as a micro framework:
In contrast to Django (these two frameworks being Python's most used web frameworks by far), Flask is un-opinionated, meaning there is no right way to do any one task. Instead, Flask functions through an ecosystem of extensions. Authorization for example can be handled by Flask-Login, Flask-Security, Flask-User, to name a few. This can be a good and a bad thing. The options can be daunting, and some projects have been abandoned (or close to). Flask is ideal for learning application development at a finer level, whereas Django has many aspects of web development included out of the box, such as an admin dashboard interface. An admin dashboard can be achieved with Flask, but only if the user requires it (see Flask-Admin).
See me on Github
commit cad6a56
: feat: Adds support for background tasks
Resource:
The Flask Mega-Tutorial Part XXII: Background Jobs
Introduces:
Redis
.
rq
commit afaeffe
: feat: Adds private messaging feature
Resource:
The Flask Mega-Tutorial Part XXI: User Notifications
commit 655cd08
: add: Adds syntax highlighting
Introduces:
highlight.js
commit 94a0e87
: change: Adds
Flask-Moment
for displaying timestamps
Resource:
The Flask Mega-Tutorial Part XII: Dates and Times
Introduces:
Flask-Moment
(Flask implementation of
moment.js
)
commit 7bc2771
: feat: Adds pagination to posts
Resource:
The Flask Mega-Tutorial Part IX: Pagination
commit 20ea7e0
: add: Adds
Flask-Bootstrap
Resource:
The Flask Mega-Tutorial Part XI: Facelift
Introduces:
Flask-Bootstrap
(Flask implementation of
Bootstrap
)
commit 3861349
: add: Adds support for markdown
Introduces:
Flask-PageDown
,
Flask-Misaka
(Flask implementation of
misaka
)
commit a8a6dd3
: add: Adds followers functionality
Resource:
The Flask Mega-Tutorial Part VIII: Followers
commit edd1135
: add: Adds edit profile page
commit eb393db
: add: Records last login time for user
commit 7bd9dfb
: add: Adds user profiles
commit 88ab80c
: add: Adds user avatars
Resource:
The Flask Mega-Tutorial Part VI: Profile Page and Avatars
commit 4774391
: add: Adds error logging email handler
Resource:
The Flask Mega-Tutorial Part X: Email Support
commit bac8824
: feat: Adds reset password functionality
Resource:
The Flask Mega-Tutorial Part X: Email Support
Introduces:
pyjwt
(Python implementation of
JSON Web Tokens
)
commit c356764
: feat: Adds email verification
Resource:
Handling Email Confirmation During Registration in Flask
Introduces:
itsdangerous
commit 8c9c72f
: change: Adds
Flask-WTF
for handling forms
Resource:
The Flask Mega-Tutorial Part III: Web Forms
Introduces:
Flask-WTF
(Flask implementation of
WTForms
)
commit aeaf4f1
: change: Adds
Flask-Login
for handling logins
Resource:
The Flask Mega-Tutorial Part V: User Logins
Introduces:
Flask-Login
commit 67a9e12
: add: Adds
app.mail
Resource:
The Flask Mega-Tutorial Part X: Email Support
Introduces:
Flask-Mail
commit 70acb5f
: change: moves database over to
SQLAlchemy
Resource:
The Flask Mega-Tutorial Part IV: Database
Introduces:
Flask-Sqlalchemy
,
Flask-Migrate
(Flask implementation of
alembic
)
commit 9c62db7
: Initial commit
Flask's Tutorial: Flaskr
v1.0.0: CHANGELOG.md
Written in Python with
Flask
using
PyCharm
Template Engine:
Jinja
CSS Framework:
Flask-Bootstrap
CSS Dark Mode:
Darkreader
Source:
https://github.com/jshwi/jss
Documentation:
https://jshwi.github.io/jss/
Hosted on Heroku:
https://jshwisolutions.herokuapp.com