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:
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:
Setup a link to a WordPress site
Write a view and template to display WordPress content
Bring your own models:
Setup a link to a WordPress site
Create a post_save signal on the Wjordpress models to sync to your own content models
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
Built Distribution
Hashes for wjordpress-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f0d6dca54f31ef04e11b46b31872aca0611c3b5099c820b4712f2e85d18492 |
|
MD5 | 766bef134306d92d21fefaab211689fa |
|
BLAKE2b-256 | fbd6e5c07f7a4b7a2dc0d8631b231b0594d779e9f84416a04d1f34155f1ebeac |