Skip to content

d-evm/blog-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Blog Site

A simple multi-user blog platform built with Flask, SQLAlchemy, and Bootstrap. Users can register, log in, create posts (admin only), comment on posts, and view posts. The site uses CKEditor for rich text editing and Gravatar for user avatars.

Features

  • User registration and login (with hashed passwords)
  • Admin-only post creation, editing, and deletion
  • Commenting system for authenticated users
  • Rich text editing with CKEditor
  • User avatars via Gravatar
  • Responsive design with Bootstrap

Project Structure

.
├── forms.py
├── main.py
├── requirements.txt
├── static/
│   ├── assets/
│   │   └── img/
│   ├── css/
│   │   └── styles.css
│   └── js/
│       └── scripts.js
├── templates/
│   ├── about.html
│   ├── contact.html
│   ├── footer.html
│   ├── header.html
│   ├── index.html
│   ├── login.html
│   ├── make-post.html
│   ├── post.html
│   └── register.html
└── instance/
    └── posts.db

Setup

  1. Install dependencies

    pip install -r requirements.txt
    
  2. Run the application

    python main.py
    

    The app will run on http://localhost:5001.

Requirements

See requirements.txt for the full list. Key packages include:

  • Flask
  • Flask-Bootstrap
  • Flask-CKEditor
  • Flask-Login
  • Flask-WTF
  • Flask-Gravatar
  • SQLAlchemy

Usage

  • Register a new user.
  • Only the user with id=1 (admin) can create, edit, or delete posts.
  • All authenticated users can comment on posts.

Notes

  • The database is stored in instance/posts.db (SQLite).
  • Static files (CSS, JS, images) are in the static/ directory.
  • Templates are in the templates/ directory.

This project is for educational purposes. Do not use in production without proper security review.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published