Skip to content
WordPress models and views for Django.
Python HTML
Branch: master
Clone or download
Latest commit 285c10c Jan 25, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
wordpress v0.11 Jan 24, 2018
.gitignore initial commit Mar 27, 2009 bugfix, right after pushing new version. attachment view referred to … Mar 14, 2014
LICENSE update docs and increment version Oct 10, 2012 more work on export commands Jan 15, 2013
README.rst v0.11 Jan 24, 2018 increment version and update changelog Jan 16, 2013



Models and views for reading a WordPress database. Compatible with WordPress version 3.5+.

django-wordpress is a project of ISL and the Sunlight Foundation.


Read-only models to protect your content

This package is designed to be read-only. Writing is enabled by adding WP_READ_ONLY = False to None of the WordPress specific logic is included while writing to the database so there is a good chance you will break your WordPress install if you enable writing.

WordPress table prefix

The default table prefix is wp. To change the table prefix, add WP_TABLE_PREFIX = 'yourprefix' to

Multiple database support

Added the ability to specify which database the WordPress content is coming from. Set it using the WP_DATABASE setting. Defaults to "default".

Database routers need be set to:

DATABASE_ROUTERS = ['wordpress.router.WordpressRouter']

Default templates

Default templates are provided only for development purposes so you can see content in your browser! Please override these with customized templates for your application.

Export Management Commands

  • wpexport Dump published posts in WXR format.
  • wpexportauthors Export authors as CSV.

Working With WordPress Models

Ten most recent published posts:


Posts tagged wordpress:


Post attachments:

for attachment in post.attachments():

Post tags:



pip install the-real-django-wordpress



Include the following in

url(r'^path/to/blog/', include('wordpress.urls')),
You can’t perform that action at this time.