Fireblog

A basic blog (in Python)

Download as .zip Download as .tar.gz View on GitHub

Fireblog

A simple blog, written in Python, using the Pyramid web framework. For a live version, see my blog.

Note that this project, whilst being used for my website hasn't been made fully ready to be used on any website. In other words, I hope to make it easier and quicker to setup and manage the website, as well as upgrade it. Hopefully soon.

Getting Started

First make sure there is a running local instance of redis. Then run the following commands:

  git clone https://github.com/ismail-s/fireblog.git
  cd fireblog
  pip install -r requirements.txt
  python setup.py develop
  initialize_fireblog_db development.ini
  mkdir reload-spooler
  uwsgi --ini-paste-logged development.ini

Do note when running those commands that:

  uwsgi --ini-paste-logged production.ini

If you wish to customise stuff, eg use a database like postgres instead of sqlite (the default), then change the .ini file you pass to these commands.

Managing the database

The initialize_fireblog_db script does 4 things when run:

  1. Creates the db with the required tables if they don't exist already
  2. Updates the db to the latest version if necessary
  3. Creates a first post if no posts exist already
  4. Makes sure all required settings are in the settings table, prompting the user of the script to input values if a value doesn't exist or is invalid.

This means that this script doesn't accept any parameters besides the ini file which says where the db is. The script is also safe to run at any point, to either create, update or check the db. So, at the moment, the way the website can be updated is by doing a git pull to get the latest code, taking down the webiste, running the initialize_fireblog_db script and then starting the website again.