• Stars
    star
    353
  • Rank 119,591 (Top 3 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created over 15 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WordPress models and views for Django.

django-wordpress

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.

Features

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.objects.published()[:10]

Posts tagged wordpress:

Posts.objects.term("wordpress")

Post attachments:

for attachment in post.attachments():
    pass

Post tags:

post.tags()

Installation

pip install the-real-django-wordpress

Add to INSTALLED_APPS in settings.py:

'wordpress'

Include the following in urls.py:

url(r'^path/to/blog/', include('wordpress.urls')),

More Repositories

1

python-roku

Screw remotes. Control your Roku with Python.
Python
288
star
2

butterfield

A Python Slack bot framework using asyncio and Slack's Real Time Messaging API
Python
61
star
3

python-webfinger

Python WebFinger client
Python
41
star
4

django-blogdor

Yet another blog app for Django
Python
33
star
5

django-cloudmailin

Django client for CloudMailin incoming email service
Python
24
star
6

python-s3file

File-like object for interacting with files stored on Amazon S3.
Python
20
star
7

django-breakroom

A Django implementation of Watercoolr, http://watercoolr.nuklei.com/, a Ruby webhooks application.
Python
14
star
8

django-googleauth

Simplified OAuth + OpenID Connect for authentication via Google
Python
14
star
9

django-webfinger

Django implementation of the webfinger server protocol
Python
12
star
10

django-wellknown

Easy administration of /.well-known/ resources, robots.txt, and crossdomain.xml
Python
12
star
11

geocron-flask

Take action based on your location
Python
10
star
12

cereal

Serialize Python objects, dicts, and Django models to JSON with ease
Python
7
star
13

python-xrd

XRD serializer and deserializer
Python
5
star
14

chrome-huffduffit

Huffduffer extension for Google Chrome
JavaScript
5
star
15

python-serpente

Roman numeral encoder and decoder
Python
4
star
16

pycon-guide

PyCon Guide: a personal PyCon planner
CSS
4
star
17

dcloud

A no-code testing framework
3
star
18

makeitwrk

Learning how to process Cakewalk wrk files without owning Cakewalk
Python
3
star
19

repython

Rebuild a Homebrew-based Python dev environment from scratch
Shell
2
star
20

lafayette

Operant chamber control software
Java
1
star
21

chrome-moretweets

Chrome extension to load more tweets on twitter.com when scrolled to the bottom of the page
JavaScript
1
star
22

konkloin

The Konklone Coin
C++
1
star
23

python-tortilla

A Python library for dipping into Salsa (Labs)
Python
1
star
24

bdcmail

A webmail system for JMU IMAP email circa 2001
PHP
1
star
25

mozilla-508

Archive of Mozilla plugin to test Section 508 accessibility
JavaScript
1
star
26

buckets

S3 manager with permissions
Python
1
star
27

django-humanity

PROVE YOU ARE HUMAN!!!!!
Python
1
star