A blog app written in Flask
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
apps
models
parsers
static
templates
tests
.gitignore
LICENSE
README.md Updated README with new to-dos Apr 8, 2013
__init__.py
create_db.py
decorators.py missed a detection of user in session Aug 11, 2013
enums.py
favicon.svg Lots of work done Aug 29, 2012
logo.svg
main.py changed storage of user object on client to storage of username Jul 31, 2013
runtests.py
settings.py.defaults
template.xhtml

README.md

Flask-Blog

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

Requirements

  • 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)

Setup

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:

./main.py

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.

Tips

  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