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.
- 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
.
├── 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
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python main.py
The app will run on http://localhost:5001.
See requirements.txt for the full list. Key packages include:
- Flask
- Flask-Bootstrap
- Flask-CKEditor
- Flask-Login
- Flask-WTF
- Flask-Gravatar
- SQLAlchemy
- Register a new user.
- Only the user with
id=1
(admin) can create, edit, or delete posts. - All authenticated users can comment on posts.
- 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.