Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


WordPress models and views for Django.

Subscribe to updates I use django-wordpress

Statistics on django-wordpress

Number of watchers on Github 261
Number of open issues 1
Average time to close an issue 20 days
Main language Python
Average time to merge a PR about 1 month
Open pull requests 2+
Closed pull requests 4+
Last commit over 2 years ago
Repo Created about 11 years ago
Repo Last Updated about 2 years ago
Size 91 KB
Organization / Authoristrategylabs
Page Updated
Do you use django-wordpress? Leave a review!
View django-wordpress activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating django-wordpress for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)



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

django-wordpress is a project of ISL <https://isl.co>_ and the Sunlight Foundation <http://sunlightfoundation.com>_.


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 settings.py. 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 settings.py.

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

Add to INSTALLED_APPS in settings.py::


Include the following in urls.py::

url(r'^path/to/blog/', include('wordpress.urls')),
django-wordpress open issues Ask a question     (View All Issues)
  • almost 4 years Querying for Terms can throw MultipleObjectsReturned error in Wordpress 4.2+, after taxonomy term split
  • about 4 years Change IPAddressField to GenericIPAddressField for Django 1.9 Support
django-wordpress open pull requests (View All Pulls)
  • Make user ID field name case explicit
  • GenericIPAddressField for wordpress.Comment.author_ip
django-wordpress questions on Stackoverflow (View All Questions)
  • Django + Wordpress RESTful Api with requests
  • Rewriting urls to cut out one directory level in combined django/wordpress setup
  • Django + Wordpress: Integrating user login
django-wordpress list of languages used
Other projects in Python