django-wordpress: Integrate WordPress Content into Django
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
django-wordpress provides a robust solution for integrating WordPress content directly into Django applications. It offers read-only models and views, ensuring the safety of your WordPress database while allowing seamless access to posts, pages, and other data. This package is ideal for developers looking to leverage existing WordPress content within a Django framework.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
django-wordpress is a powerful Django package designed to integrate WordPress content directly into your Django applications. Developed by ISL and the Sunlight Foundation, it provides models and views for reading data from a WordPress database, compatible with WordPress version 3.5 and above.
A key feature is its read-only design by default, protecting your WordPress content from accidental modifications. While writing can be enabled, it's strongly advised against due to the lack of WordPress-specific logic. The package also supports custom WordPress table prefixes and multiple database configurations, offering flexibility for various setups. Default templates are included for development, encouraging users to override them for production.
Installation
To get started with django-wordpress, follow these simple steps:
First, install the package using pip:
pip install the-real-django-wordpress
Next, add 'wordpress' to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = [
# ...
'wordpress',
# ...
]
Finally, include the WordPress URLs in your project's urls.py:
from django.urls import path, include
urlpatterns = [
# ...
path('path/to/blog/', include('wordpress.urls')),
# ...
]
If you are using multiple databases, remember to configure your database routers:
DATABASE_ROUTERS = ['wordpress.router.WordpressRouter']
Examples
Working with WordPress models is straightforward. Here are a few common examples:
Retrieve the ten most recent published posts:
from wordpress.models import Posts
Posts.objects.published()[:10]
Find posts tagged "wordpress":
from wordpress.models import Posts
Posts.objects.term("wordpress")
Access attachments for a specific post:
for attachment in post.attachments():
# Process attachment
pass
Get all tags associated with a post:
post.tags()
Why Use django-wordpress?
django-wordpress offers several compelling reasons for integration:
- Seamless Integration: Easily bring your existing WordPress blog content into a Django application without complex migrations or data duplication.
- Data Safety: Its default read-only mode provides a secure way to access WordPress data, minimizing the risk of unintended changes to your live WordPress site.
- Flexibility: Supports custom table prefixes and multiple database configurations, adapting to diverse WordPress setups.
- Export Capabilities: Includes management commands like
wpexportto dump published posts in WXR format andwpexportauthorsto export authors as CSV. - Developer Friendly: Provides a clear API for querying WordPress data using Django's ORM.
Links
- GitHub Repository: jcarbaugh/django-wordpress
Related repositories
Similar repositories that may be relevant next.

django-storages: Streamlining Cloud Storage for Django Applications
July 26, 2026
django-storages offers a unified library for various storage backends, simplifying how Django applications interact with cloud storage services. It provides a flexible and robust solution for managing static and media files across different providers. This project ensures compatibility with supported Django versions, making it a reliable choice for developers.

Awesome Django: A Curated List of Essential Resources for Developers
July 24, 2026
Awesome Django is a comprehensive, curated list of exceptional resources, packages, and tools for Django web development. It serves as an invaluable guide for developers looking to enhance their projects with the best the Django ecosystem has to offer. With over 11,000 stars, it's a trusted community-maintained collection.

AdventureLog: Your Self-Hostable Travel Tracker and Trip Planner
April 4, 2026
AdventureLog is an open-source, self-hostable application designed for modern explorers. It allows users to log their adventures, track visited locations on a world map, and collaboratively plan future trips. This comprehensive tool offers a user-friendly experience for managing all your travel experiences.

GeoNode: An Open Source Platform for Geospatial Data Management
March 19, 2026
GeoNode is an open source platform designed to facilitate the creation, sharing, and collaborative use of geospatial data. It acts as a geospatial content management system, bringing together mature open-source software projects under an easy-to-use interface. This powerful tool allows users to manage and publish spatial information, create interactive maps, and foster community around geospatial data.
Source repository
Open the original repository on GitHub.