Skip to content

solygambas/flask-blogging-platform

Repository files navigation

Blogging Platform

A blogging platform using Flask, Jinja2 and Flask-SQLAlchemy.

Demo

See Demo deployed on Railway

See Demo deployed on Railway

Flask basics

  • handling routes, request hooks and view functions with Flask.
  • working with Jinja2 template engine, Flask-Bootstrap and Flask-Moment.
  • creating web forms with Flask-WTF.
  • displaying user-friendly messages with flash().
  • managing the database with Flask-SQLAlchemy.
  • updating the database model with Flask-Migrate.
  • sending emails with Flask-Mail.
  • using packages and modules to structure a large application that scales.

Blogging Platform

  • implementing user authentication with Flask-Login and Werkzeug.
  • registering new users and generating confirmation tokens with itsdangerous.
  • managing roles and permissions for users, moderators and administrators.
  • handling user profiles and displaying user avatars with Gravatar.
  • building a blogging feature by reusing templates.
  • paginating item lists and creating fake blog post data with Faker.
  • enabling rich-text posts with Markdown and Flask-PageDown.
  • displaying followers on the profile page.
  • showing followed posts on the home page.
  • handling comment moderation.

RESTful API

  • using a Flask-based RESTful API to expose app functionality to smartphones, tablets and other third-party clients.
  • managing user authentication with Flask-HTTPAuth and generating tokens.
  • serializing resources to and from JSON.
  • handling pagination of large resource collections.
  • testing web services with HTTPie.

Testing

  • learning how to run unit tests with Coverage, Flask test client and Selenium.
  • enhancing application performance by logging slow database performance and high CPU consumption.

Deployment

  • deploying on Railway with a PostgreSQL database.

Based on Flask Web Development by Miguel Grinberg (2nd edition, 2018)