Home > flask-forum

flask-forum

Flask-forum is a project mainly written in Python, based on the View license.

flask-form is very simple web forum written with Python (language), Flask (web framework), SQLite (database), and WTForms (HTML forms frameword). It is being written as a learning exercise, and includes documentation and configuration for running on Ubuntu.

How to run in a development server on Ubuntu 11.04

Install dependencies: sudo apt-get install python-flask sqlite3 python-bcrypt python-flaskext.wtf

Create the database: sqlite3 flask-forum.db < schema.sql

Run the development server: python app.py

Visit localhost:5000 in a browser.

How to run in nginx with fastcgi on Ubuntu 11.04

Install dependencies for deployment: sudo apt-get install python-flup nginx

Remove default nginx site: sudo rm /etc/nginx/sites-enabled/default

Add a new nginx site and enable it: sudo cp flask-forum.nginx /etc/nginx/sites-available/ sudo ln -s /etc/nginx/sites-available/flask-forum.nginx /etc/nginx/sites-enabled/flask-forum.nginx

Start nginx: sudo service nginx start

Make the database and containing folder writeable by the user running the app server: chmod 666 flask-forum.db chmod 777 .

Start the fcgi server (as the same user as nginx): sudo -u www-data ./app.fcgi

Visit localhost in a browser.

Previous:tui