Skip to content

A simple Flask blog app where users can create posts with titles, content, and optional images. Uses SQLite, SQLAlchemy, and Flask for routing, form handling, file uploads, and displaying posts with timestamps.

Notifications You must be signed in to change notification settings

RishabhDhawad/BlogPost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Flask Blog Application

Python Badge Flask Badge MIT License


🚀 Overview

Welcome to the Flask Blog Application! This is a simple, clean, and functional blog web app built with Flask, SQLite, and SQLAlchemy. Easily create, edit, and delete blog posts, with optional image uploads and a beautiful, responsive interface.


✨ Features

  • 🖋️ Create, Edit, and Delete Blog Posts
  • 🖼️ Upload and Display Images (JPG, PNG, GIF, etc.)
  • 🔄 Edit Blog Posts with Current Image Display: Users can see the current image when editing and choose to remove it.
  • 🕒 Auto-generated Timestamps (Created & Updated)
  • 💾 SQLite Database with SQLAlchemy ORM
  • Flash Messages for User Feedback
  • 📄 Blog Listing, Detail, and Success Pages
  • 🎨 Modern, Responsive UI (HTML, CSS, Jinja2)

🛠️ Tech Stack

  • Backend: Python, Flask
  • Database: SQLite, SQLAlchemy
  • Frontend: HTML, CSS (Jinja2 Templates)
  • Others: Werkzeug, Jinja2

📂 Project Structure

Flask_Blog/
│
├── static/
│   └── uploads/         # Uploaded images
│
├── templates/
│   ├── base.html        # Base template
│   ├── home.html        # Homepage (blog list)
│   ├── createblog.html  # Create blog form
│   ├── edit.html        # Edit blog form
│   ├── detail.html      # Blog detail page
│   ├── listblogs.html   # List all blogs
│   └── success.html     # Confirmation page
│
├── BlogPost.db          # SQLite database
├── app.py               # Main Flask app
└── README.md            # Project documentation

▶️ Getting Started

1. Clone the Repository

git clone https://github.com/your-username/flask-blog-app.git
cd flask-blog-app

2. Set Up a Virtual Environment

python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

3. Install Dependencies

pip install flask flask_sqlalchemy pytz

4. Run the Application

python app.py

Visit http://127.0.0.1:5000/ in your browser.


📸 Screenshot

HomePage Screenshot Homepage Screenshot

List Blogs Screenshot List Blogs Screenshot

Create Blogs Screenshot Create Blogs Screenshot


📜 License

This project is licensed under the MIT License.


🙌 Acknowledgements


💡 Author

Rishabh Dhawad
GitHub Profile


Crafted with passion for learning and sharing!

If you like this project, feel free to ⭐️ the repo and connect with me on GitHub!

Happy Blogging! 🚀

About

A simple Flask blog app where users can create posts with titles, content, and optional images. Uses SQLite, SQLAlchemy, and Flask for routing, form handling, file uploads, and displaying posts with timestamps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages