Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Blog add on for Websauna

Project description

This is a Python package for, an addon for Websauna framework. You can use it as a simple blog for your site or as an example of Websaunsa design patterns.

Supported Python versions Latest Version License
ci cov  


  • Markdown based editing
  • Disqus based commenting
  • Post description and meta for Google (SEO), Facebook, Twitter. Sitemap support and Google Article metadata support.
  • Blog post management through Websauna admin interface
  • Drafts (admin only visible) and published posts
  • RSS feed
  • Basic unit and functional test suite

Note that this addon is not intended to be used as is, but more of an example. You most likely want to fork it over and modify for your own needs.


Adding to your site

Include addon in your application initializer:

class Initializer(websauna.system.Initializer):

    def include_addons(self):
        """Include this addon in the configuration."""

Example settings:

# Title on blog roll
blog.title = My little Websauna blog

# this is "websauna" part from univeral
# embed link
blog.disqus_id = websauna

# The email appearing in RSS feed
# (It is recommended not to use any real email)
blog.rss_feed_email =

See nav.html example how to add a link to the blog in your site navigation.

Add RSS feed discovery by customizing site/meta.html template:

{# Misc ``<meta>`` tags in ``<head>``. #}

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width" />

{% include "blog/rss_head.html" %}

Create migrations for blog post SQL table for your site:

ws-alembic -c myapp/conf/development.ini -x packages=all revision --auto -m "Adding blog content types"

Run migrations:

ws-alembic -c myapp/conf/development.ini -x packages=all upgrade head

Go to admin, start adding blog posts.

Local development mode

Activate the virtual environment of your Websauna application.


cd blog  # This is the folder with file
pip install -e .

Running the development website

Local development machine

Example (OSX / Homebrew):

psql create blog_dev
ws-sync-db websauna/blog/conf/development.ini
ws-create-user websauna/blog/conf/development.ini mypassword
ws-pserve websauna/blog/conf/development.ini --reload

Running the test suite

First create test database:

# Create database used for unit testing
psql create blog_test

Install test and dev dependencies (run in the folder with

pip install -e ".[dev,test]"

Run test suite using py.test running:


Changelog for Websauna Blog

1.0a2 (2018-04-22)

  • Closes Issue #6: missing ‘namespace_packages’, .

1.0a1 (2018-03-06)

  • Initial Release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for, version 1.0a2
Filename, size File type Python version Upload date Hashes
Filename, size (42.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size (33.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page