One of the challenges that administrators of an application have is the control of the comments that users post. Being able to moderate users' comments is a very important feature of a website. This application shows how you can create a custom comment moderation feature in a Flask application.
- Comment Moderation
- User Management
- Database Management
- Flask framework
- Flask Bootstrap (CSS framework)
- Flask-WTF (Forms)
- Flask-SQLAlchemy (Database)
- Flask-Login (User Authentication)
- Flask-Migrate (Database Migration)
- Email Validator (Email Validation)
- Python for programming
- Post a comment in the home page
- Register for an admin account if you are new
- Login to your admin account to see all comments
- View all comments in the admin dashboard
- You can allow or delete the posted comments.
- Navigate back to the home page to see all "allowed" comments.
- Clone this repo:
git clone git@github.com:GitauHarrison/user-comment-moderation-in-flask.git`
- Change directory to the new repo:
cd user-comment-moderation-in-flask
- Create and activate a virtual environment:
$ mkvirtualenv comment_moderation
- Install dependencies:
(comment_moderation)$ pip3 install -r requirements.txt
- Run the server:
(comment_moderation)$ flask run
Flask is very unopinionated. You can pretty much build whatever feature you want. If you would like to know how I was able to integrate comment moderation into this application, check out the tutorial below: