{ "info": { "author": "Observer Media", "author_email": "jsternberg@observer.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "django-wordpress-rest\n=====================\n\n\n.. image:: https://img.shields.io/badge/django--wordpress--rest-0.1.4-brightgreen.svg\n :target: https://pypi.python.org/pypi/django-wordpress-rest/\n\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg\n :target: https://pypi.python.org/pypi/django-wordpress-rest/\n\n.. image:: https://circleci.com/gh/observermedia/django-wordpress-rest/tree/master.svg?style=shield&circle-token=d6ff8ea2fbb65de69536e1bacf6ce27fb95a533e\n :target: https://circleci.com/gh/observermedia/django-wordpress-rest/tree/master\n\n.. image:: https://readthedocs.org/projects/django-wordpress-rest/badge/?badge=latest\n :target: http://django-wordpress-rest.readthedocs.org/en/latest/\n :alt: Documentation Status\n\n\nWelcome to django-wordpress-rest!\n\n\nSummary\n-------\n\nDjango-wordpress-rest is a Django application that syncs content from a WordPress.com site to a Django site.\n\nThis is done using the `WordPress.com REST API `_.\nA separate copy of the content data is stored on the Django side, which allows for loose coupling and extensability.\n\nFull documentation is available on `Read The Docs `_.\n\n\nQuickstart\n----------\n\nInstall the module:\n\n::\n\n pip install django-wordpress-rest\n\n\nAdd ``\"wordpress\"`` to your ``INSTALLED_APPS`` setting:\n\n::\n\n INSTALLED_APPS = (\n # ...\n \"wordpress\",\n # ...\n )\n\n\nCreate the database tables that will persist the sync'd WordPress content:\n\n::\n\n $ python manage.py migrate\n\n\nSync WordPress content using the management command. The ```` can be found using the `/me/sites WordPress API call `_. This is useful for periodically updating the content with cron.\n\n::\n\n $ python manage.py load_wp_api \n\n\nAuthentication\n--------------\n\nIf you'd like to synchronize private content, create an OAuth2 access token using the instructions provided by WordPress:\nhttps://developer.wordpress.com/docs/oauth2/\n\nAdd this token to your Django ``settings.py`` file. Use an environment variable to keep things secure:\n\n::\n\n WP_API_AUTH_TOKEN = os.getenv(\"WP_API_AUTH_TOKEN\")\n\n\nLoad Options\n------------\n\nBring the site content up to date:\n\n::\n\n # first run gets everything\n $ python manage.py load_wp_api \n\n # second run gets content modified since previous run\n $ python manage.py load_wp_api \n\n\nDo a full sweep of the site content, inserting and updating as needed:\n\n::\n\n # first run gets everything\n $ python manage.py load_wp_api \n\n # second run gets/updates all content again\n $ python manage.py load_wp_api --full\n\n\nLoad everything modified after a given date:\n\n::\n\n $ python manage.py load_wp_api --modified_after=2015-01-01\n\n\nJust load posts, not pages, attachments, or reference data:\n\n::\n\n $ python manage.py load_wp_api --type=post\n\n\nLoad posts with a specific status (note this requires authentication):\n\n::\n\n $ python manage.py load_wp_api --status=draft\n\n\nPurge local content before loading -- careful!\n\n::\n\n $ python manage.py load_wp_api --purge --full\n\n\n\nWebhook\n-------\n\nIf you'd like to use the webhook to sync a post immediately after it's updated, include the ``urls`` into your project's ``urls.py``, like so:\n\n::\n\n from django.conf.urls import include\n\n urlpatterns = [\n url(r'^wordpress/', include('wordpress.urls'))\n ]\n\n\nAdd ``\"after_response\"`` to your ``INSTALLED_APPS`` setting (this allows asynchronous processing):\n\n::\n\n INSTALLED_APPS = (\n # ...\n \"after_response\",\n \"wordpress\",\n # ...\n )\n\n\nThe webhook looks for your ```` in Django settings. So add this your ``settings.py``, and use an environment variable to keep things secure:\n\n::\n\n WP_API_SITE_ID = os.getenv(\"WP_API_SITE_ID\")\n\n\nFinally from your WordPress.com site, submit a POST request with an ``ID`` data element in the body to trigger a sync of a single post. Note this should be the WordPress Post ID, not the Django one!\n\n::\n\n $ curl -X POST --data \"ID=123456\" http://mydjangosite.com/wordpress/load_post\n\n\n\nRunning the Tests\n-----------------\n\n::\n\n $ pip install detox\n $ detox", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/observermedia/django-wordpress-rest", "keywords": "django wordpress wordpress.com REST API", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-wordpress-rest", "package_url": "https://pypi.org/project/django-wordpress-rest/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-wordpress-rest/", "project_urls": { "Homepage": "https://github.com/observermedia/django-wordpress-rest" }, "release_url": "https://pypi.org/project/django-wordpress-rest/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "Sync a WordPress site to Django via the WordPress.com REST API", "version": "0.1.4" }, "last_serial": 1759127, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "feca380edf37f31308663698d699fdcd", "sha256": "bfc1c0a3f8b667423b0b7a5beb75f3d808f05830248ebb0446701953bdef89ac" }, "downloads": -1, "filename": "django_wordpress_rest-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "feca380edf37f31308663698d699fdcd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20491, "upload_time": "2015-08-10T18:25:10", "url": "https://files.pythonhosted.org/packages/1c/77/b90c378d49af657f140dabbee4ecab52ae3e6ca66f042c42b998e4cdaec8/django_wordpress_rest-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2c57df2b5ea30478b57943403815615", "sha256": "c5111d5a4edc6e880c9376527bf97b9cd4504d13a47ee8b2c8f9d14e892474a4" }, "downloads": -1, "filename": "django-wordpress-rest-0.1.tar.gz", "has_sig": false, "md5_digest": "e2c57df2b5ea30478b57943403815615", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16371, "upload_time": "2015-08-10T18:25:07", "url": "https://files.pythonhosted.org/packages/ac/e8/a79a30429fb5b0d68b1411601987bd45b6374f2dc4907d58240597ce06db/django-wordpress-rest-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "fa765c02a09e574848f8a7f6c30999d2", "sha256": "aac0b9c1f93d0084b995a6bbb8fe96120adb8c12722da3e3ae7d1692e9b4cee0" }, "downloads": -1, "filename": "django_wordpress_rest-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fa765c02a09e574848f8a7f6c30999d2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20704, "upload_time": "2015-08-10T21:26:47", "url": "https://files.pythonhosted.org/packages/5c/4a/cc335f7355acc825f3c1b8d9c09417979626a9637b89d07ea54d3114dae2/django_wordpress_rest-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "85291264065295acca691dd27d56b878", "sha256": "e974e26f4dd55548235b8cd829cee47149e1797246aec36c295fc22d0857e153" }, "downloads": -1, "filename": "django-wordpress-rest-0.1.1.tar.gz", "has_sig": false, "md5_digest": "85291264065295acca691dd27d56b878", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16484, "upload_time": "2015-08-10T21:24:48", "url": "https://files.pythonhosted.org/packages/7e/72/2feb52e7dcb18d51eed17261d99c97ac7140e42763ed35e58231f1be2a4c/django-wordpress-rest-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "aacf92b967cfff17cf2e52536ac732ba", "sha256": "4eb87230d0e1c8c508cd5ec9f069d4bc052a564111862e3febe140cef90daa24" }, "downloads": -1, "filename": "django_wordpress_rest-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "aacf92b967cfff17cf2e52536ac732ba", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21026, "upload_time": "2015-08-30T16:50:57", "url": "https://files.pythonhosted.org/packages/32/71/ec309ace359b665e4ed08cd933891143432f2ac4c2ca11fa655b466866df/django_wordpress_rest-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a1377ace65ac67f1afe2d94b6a6ee0e", "sha256": "6d1de0ce1f94ac1991aa4ba582414a2203e7bdb4805525dc56add927a13fe3b6" }, "downloads": -1, "filename": "django-wordpress-rest-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3a1377ace65ac67f1afe2d94b6a6ee0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16680, "upload_time": "2015-08-30T16:50:54", "url": "https://files.pythonhosted.org/packages/99/53/ab5a8562772e7b95a954ccbe5f214c3d20ceed2333c64d5e74f56226b9f0/django-wordpress-rest-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "9230366da672dc2acc6126328248ca4d", "sha256": "9e91c57ea245dc5501f61eff33caf5a88a2a947ac030e19383a962df061c3887" }, "downloads": -1, "filename": "django_wordpress_rest-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9230366da672dc2acc6126328248ca4d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21468, "upload_time": "2015-10-08T19:56:46", "url": "https://files.pythonhosted.org/packages/4c/3d/b15266d4c58e4b8c43eebb71fce35b42101f9a8ecd0d5a5ab4b3568b094c/django_wordpress_rest-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0a1daad8925e0d761a08be557dc029e0", "sha256": "253ab7f440584ed79e4203ff46b0d7f2258aaa65d235e92312588fe5dfcfc62e" }, "downloads": -1, "filename": "django-wordpress-rest-0.1.3.tar.gz", "has_sig": false, "md5_digest": "0a1daad8925e0d761a08be557dc029e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17049, "upload_time": "2015-10-08T19:56:42", "url": "https://files.pythonhosted.org/packages/b0/45/2269e9415a2d1d006d082c34f3b73f72fb0c005d9f688fef025833a1bbe7/django-wordpress-rest-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "d8350898e58e6129d3f0a1e25d6d53da", "sha256": "026b85c910f3194c21f467cb3bfc87711aa24cc2ab702aad963fe84dc4eda556" }, "downloads": -1, "filename": "django_wordpress_rest-0.1.4.whitespacefix-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d8350898e58e6129d3f0a1e25d6d53da", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21785, "upload_time": "2015-10-08T22:52:29", "url": "https://files.pythonhosted.org/packages/de/87/e9158f40d74e2b17db7cdd128dfa52e94086af6649fc01ee07fc96498307/django_wordpress_rest-0.1.4.whitespacefix-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b596076bac6d1c96dcd5cf2dd66ecaaf", "sha256": "e497ebd92c6835949cc249ce6ada4c47af643e18f5354d6cdb0312dba8d1d045" }, "downloads": -1, "filename": "django-wordpress-rest-0.1.4.whitespacefix.tar.gz", "has_sig": false, "md5_digest": "b596076bac6d1c96dcd5cf2dd66ecaaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17399, "upload_time": "2015-10-08T22:51:16", "url": "https://files.pythonhosted.org/packages/d5/f0/558863746345b133c8c8ac82f19b0289b3d5c20521d22ab9fb83dff23fcd/django-wordpress-rest-0.1.4.whitespacefix.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d8350898e58e6129d3f0a1e25d6d53da", "sha256": "026b85c910f3194c21f467cb3bfc87711aa24cc2ab702aad963fe84dc4eda556" }, "downloads": -1, "filename": "django_wordpress_rest-0.1.4.whitespacefix-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d8350898e58e6129d3f0a1e25d6d53da", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21785, "upload_time": "2015-10-08T22:52:29", "url": "https://files.pythonhosted.org/packages/de/87/e9158f40d74e2b17db7cdd128dfa52e94086af6649fc01ee07fc96498307/django_wordpress_rest-0.1.4.whitespacefix-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b596076bac6d1c96dcd5cf2dd66ecaaf", "sha256": "e497ebd92c6835949cc249ce6ada4c47af643e18f5354d6cdb0312dba8d1d045" }, "downloads": -1, "filename": "django-wordpress-rest-0.1.4.whitespacefix.tar.gz", "has_sig": false, "md5_digest": "b596076bac6d1c96dcd5cf2dd66ecaaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17399, "upload_time": "2015-10-08T22:51:16", "url": "https://files.pythonhosted.org/packages/d5/f0/558863746345b133c8c8ac82f19b0289b3d5c20521d22ab9fb83dff23fcd/django-wordpress-rest-0.1.4.whitespacefix.tar.gz" } ] }