Skip to main content

Serve WordPress content with Django

Project description

Wjordpress is a reusable app for Django that allows you to use WordPress as your editing interface and Django for your presentation.

With Wjordpress, you can interact with WordPress content as if it were entered in the Django admin. Wjordpress does not pretend to be WordPress and does not provide any presentation. After the initial link, it’s a “Fire-and-forget” system. The Wjordpress Django admin interface is not something you’ll have to mess with on a daily basis.

WordPress Setup

Once you have a WordPress site setup, you need to make sure it has the JSON REST API plugin installed and activated. That’s it! If you want real-time updates, you’ll need the HookPress plugin TODO.

Django Setup

Install into your environment:

# pip install wjordpress  # TODO
pip install https://github.com/texastribune/wjordpress/archive/master.tar.gz

Install into your Django project:

INSTALLED_APPS = [
    # ... your other installed apps
    'wjordpress',
]

Create the database tables:

# python manage.py migrate wjordpress  # TODO
python manage.py syncdb

Add a WordPress site:

In your Django admin, add a new site in Wjordpress -> Sites:

images/admin.png

Just enter the url to the WordPress blog and save.

Currently, there is no automatic syncing (yet). The easiest workaround is to put manage.py wjordpress_fetch in a cron job.

Scenarios

Easy peasy lemon squeezy:

  1. Setup a link to a WordPress site

  2. Write a view and template to display WordPress content

Bring your own models:

  1. Setup a link to a WordPress site

  2. Create a post_save signal on the Wjordpress models to sync to your own content models

  3. Write a view and template to display your content models


How to pronounce “Wjordpress”: http://youtu.be/tmyGrk99uzM

Project details


Download files

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

Source Distribution

wjordpress-0.1.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

wjordpress-0.1.0-py2-none-any.whl (11.3 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page