A blog app written in Flask
Python CSS JavaScript
Latest commit a8ce0e0 Jan 3, 2015 Matt Copperwaite does not need exec permissions
Failed to load latest commit information.
apps changed storage of user object on client to storage of username Jul 31, 2013
models post order now descends (might need to look at tests) Aug 11, 2013
static does not need exec permissions Jan 3, 2015
templates Merge branch 'master' of github.com:yamatt/flask-blog Apr 8, 2013
tests now correctly pulling published messages Jul 31, 2013
.gitignore needs gitignore Jan 3, 2015
LICENSE Upgraded to GPLv3 Mar 25, 2013
README.md Updated README with new to-dos Apr 8, 2013
__init__.py empty init exposes more stuff in the mean time Mar 24, 2013
create_db.py Changed creation script Apr 7, 2013
decorators.py missed a detection of user in session Aug 11, 2013
enums.py Lots of work done Aug 29, 2012
favicon.svg Lots of work done Aug 29, 2012
logo.svg Lots of work done Aug 29, 2012
main.py changed storage of user object on client to storage of username Jul 31, 2013
runtests.py added more tests Jul 30, 2013
template.xhtml Lots of work done Aug 29, 2012



This is a blog I built to run in Python using the Flask micro-web framework.


  • Python >=2.6
  • python-flask >=0.8 (maybe 0.7 too)
  • python-wtforms
  • flask-WTF (from PyPI)
  • python-sqlite (if you're using sqlite)
  • python-bcrypt (for password hashes)


Copy the settings.py.defaults file to settings.py and open it to set your preferences. Change the SECRET_KEY to be anything non-guessable.

The easiest way to get started is to first create a database with an administrator account. Run create_db.py to setup the database like so:

./create_db.py Administrator

Where matt is the username for the administrative account you want to known by. It can be your own name if you prefer. You will then be asked to set up a password for this account.

To run the blog as a demonstration do:


And follow the directions to access the site from your browser.

However if you want to run the blog on a public website please follow instructions on setting it up with a proper HTTP server such as Apace or Nginx and uWSGI.


  1. Going to /accounts/login will allow the admin account that was created to login.
  2. Going to /new will allow you to create a new page. Pages are not posts. Pages are like the about page. If you create an about page the content will be displayed in the sidebar.
  3. Going to /posts/new will allow you to create a new post.
  4. /list and /posts/list will give you a list of pages and posts that have been created (even ones that weren't published).
  5. A lot of configuration is stored in the settings.py file.

Still to do

  • Upload app
  • Commenting
  • User registration
  • User editing
  • Generic theme
  • Mobile themes
  • Redo login part to use Flask-Login
  • Tests
  • Page titles
  • WAI testing