← Back to Projects
MkViewer - Upgraded Blog v2 [Read-Only]
Initializing MkViewer...
README.md

Flask Blog Application - Project 67

README GENERATED BY AI

A simple blogging platform built with Flask, Flask-Bootstrap, SQLAlchemy, Flask-WTF, and Flask-CKEditor. Users can create, edit, view, and delete blog posts through a web interface.


Features

  • View all blog posts on the home page.
  • View individual blog posts.
  • Create new blog posts with a title, subtitle, author, image, and body content.
  • Edit existing blog posts.
  • Delete blog posts.
  • Rich text editor for blog content using CKEditor.
  • Responsive design powered by Bootstrap 5.

  1. Install required packages:

On Windows:

bash python -m pip install -r requirements.txt

On macOS / Linux:

bash pip3 install -r requirements.txt


Usage

  1. Run the application:

bash python app.py

or on macOS/Linux:

bash python3 app.py

  1. Open your browser and go to:

http://127.0.0.1:5003/

  1. Routes:

| Route | Description | | ------------------- | -------------------------------- | | / | Home page showing all blog posts | | /posts/<post_id> | View a single blog post | | /new | Create a new blog post | | /edit/<post_id> | Edit an existing blog post | | /delete/<post_id> | Delete a blog post | | /about | About page | | /contact | Contact page |


Project Structure

. ├── app.py # Main Flask application ├── templates/ # HTML templates │ ├── index.html │ ├── post.html │ ├── make-post.html │ ├── about.html │ └── contact.html ├── static/ # CSS, JS, images ├── requirements.txt # Python dependencies └── posts.db # SQLite database (auto-created)


Dependencies

  • Flask
  • Flask-Bootstrap
  • Flask-SQLAlchemy
  • Flask-WTF
  • WTForms
  • Flask-CKEditor
  • SQLAlchemy

All dependencies are listed in requirements.txt.


Notes

  • The database posts.db is automatically created on first run.
  • The application uses a random SECRET_KEY generated at runtime.
  • Dates are formatted with suffixes (e.g., January 1st, 2026) using a custom function.

License

This project is licensed under the MIT License.