A forum app with some basic forum stuff:
- Authentication and session management
- Create boards, threads, and posts
- Write and edit posts in Markdown
Most of the forum code is contained in its own folder, and it's pretty easy to move it to other projects and use it as a blueprint or whatever else you have in mind. If you're new to Flask, this project is also a pretty good illustration of how to use a variety of common and especially useful extensions.
- Flask-Admin for database management
- Flask-Assets for asset management
- Flask-DebugToolbar for debugging and profiling.
- Flask-Markdown for forum posts
- Flask-Script for basic commands
- Flask-Security for authentication
- Flask-SQLAlchemy for database queries
- Flask-WTF for forms
flask-forum uses bcrypt for password hashing. If you're using Ubuntu, you can install it with the necessary headers by running the following commands:
sudo apt-get install python-dev libffi-dev
sudo pip install bcrypt
The rest of the setup is more conventional:
pip install -r requirements.txt
python manage.py create_db
python manage.py create_user -e <email> -p <password>
python manage.py create_role -n admin
python manage.py add_role -u <email> -r admin
python runserver.py
By default the site is hosted at localhost:5000
.