{ "info": { "author": "CFPB", "author_email": "tech@cfpb.gov", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Framework :: Django :: 2.0", "Framework :: Wagtail", "Framework :: Wagtail :: 1", "Framework :: Wagtail :: 2", "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", "License :: Public Domain", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": ".. image:: https://travis-ci.org/cfpb/wagtail-sharing.svg?branch=master\n :alt: Build Status\n :target: https://travis-ci.org/cfpb/wagtail-sharing\n.. image:: https://coveralls.io/repos/github/cfpb/wagtail-sharing/badge.svg?branch=master\n :alt: Coverage Status\n :target: https://coveralls.io/github/cfpb/wagtail-sharing?branch=master\n\nwagtail-sharing\n===============\n\nEasier sharing of `Wagtail `_ drafts.\n\nWagtail Sharing makes it easier to share Wagtail draft content for review by users who don't have access to the Wagtail admin site. It allows you to define an alternate hostname and/or port on which to expose the latest revision of all of your Wagtail pages.\n\nFor example, let's say your Wagtail site is running on http://mysite.com. You've created a draft page at slug ``/path/to/draft``, but haven't yet published it. Wagtail Sharing lets you expose that draft page at some other domain, for example http://sharing.mysite.com/path/to/draft.\n\nIn another use case, you might have a published page at http://mysite.com/already/published/page, and you've made some draft changes. Wagtail Sharing lets you expose those draft changes at http://sharing.mysite.com/already/published/page while still keeping the same published content at your regular domain.\n\nThese examples obviously work best when you have some method of restricting access to http://sharing.mysite.com, for example by only exposing that subdomain on a private network.\n\nWagtail Sharing lets you create separate sharing sites for each Wagtail Site you have defined. It also supports a configurable visual banner on shared pages to remind reviewers that content may differ from your published site.\n\nThis new logic only applies to ``GET`` requests. Other HTTP methods like ``POST`` defer to standard Wagtail handling.\n\nSetup\n-----\n\nInstall the package using pip:\n\n.. code-block:: bash\n\n $ pip install wagtail-sharing\n\nAdd ``wagtailsharing`` as an installed app in your Django settings:\n\n.. code-block:: python\n\n # in settings.py\n INSTALLED_APPS = (\n ...\n 'wagtailsharing',\n ...\n )\n\n``wagtail.contrib.modeladmin`` is also required and must be included in your list of installed apps.\n\nRun migrations to create required database tables:\n\n.. code-block:: bash\n\n $ manage.py migrate wagtailsharing\n\nReplace use of Wagtail's catch-all URL pattern:\n\n.. code-block:: diff\n\n # in urls.py\n -from wagtail.core import urls as wagtail_urls\n +from wagtailsharing import urls as wagtailsharing_urls\n\n ...\n\n -urlpatterns.append(url(r'', include(wagtail_urls)))\n +urlpatterns.append(url(r'', include(wagtailsharing_urls)))\n\nSharing sites\n-------------\n\nThe Wagtail admin now contains a new section under Settings called Sharing Sites that allows users to define how they would like to expose latest page revisions. \n\n.. image:: https://raw.githubusercontent.com/cfpb/wagtail-sharing/master/docs/images/sharing-sites.png\n :width: 200px\n :height: 100px\n :alt: Sharing sites\n\nNo sharing sites exist by default. A sharing site must be manually created for each Wagtail Site to make its latest revisions shareable. Each sharing site is defined by a unique hostname and port number. **Important: configuring your sharing sites improperly could expose draft/private content publicly. Be careful when setting them up!**\n\nCreating a new sharing site\n---------------------------\n\nAfter following the setup steps above, you should be able to create a new sharing site to use this functionality in a local Django development server. Let's assume that you are running your local development server on the default port 8000, and that pages there are being served at http://localhost:8000. We want to create a new sharing site at http://sharing.localhost:8000 at which latest page revisions will be exposed.\n\nTo simulate accessing your site on a different hostname, you'll need to loosen `Django's default security settings `_ that only allow access on `localhost`. Edit your settings file (e.g. ``myproject/settings/local.py``) to add the following:\n\n.. code-block:: python\n\n ALLOWED_HOSTS = ['*']\n\nVerify that you can access your local server at http://sharing.localhost:8000. You should see the same content there as on http://localhost:8000, as you haven't enabled wagtail-sharing for the default site yet.\n\nTo do so, in the Wagtail admin, under Settings, Sharing Sites, create a new sharing site for the default site, with hostname ``sharing.localhost`` and port ``8000``.\n\n.. image:: https://raw.githubusercontent.com/cfpb/wagtail-sharing/master/docs/images/new-sharing-site.png\n :width: 200px\n :height: 100px\n :alt: New sharing site with site: \"localhost [default]\", hostname: \"sharing.localhost\", port: \"8000\"\n\nYour latest page revisions (including drafts) should now be available at http://sharing.localhost:8000.\n\nBanners\n-------\n\nPages viewed on a wagtail-sharing shared site have a simple banner added to them to remind reviewers that the current published content may differ from the content they are viewing.\n\n.. image:: https://raw.githubusercontent.com/cfpb/wagtail-sharing/master/docs/images/banner.png\n :alt: Banner\n\nThis behavior can be disabled by setting ``settings.WAGTAILSHARING_BANNER = False``. The banner template can be overridden by providing an alternate template file at ``wagtailsharing/banner.html`` similar to how `wagtailadmin template overrides `_ are supported.\n\nSharing links\n-------------\n\nA page's sharing URL can be retrieved by passing its ``Page`` instance to ``wagtailsharing.helpers.get_sharing_url``. This method returns ``None`` if no shared sites are configured or if the specified page is not routable to a shared site.\n\nShared pages will also have a new dropdown menu option that links to this sharing URL from the Wagtail page explorer.\n\n.. image:: https://raw.githubusercontent.com/cfpb/wagtail-sharing/master/docs/images/dropdown.png\n :alt: Dropdown with sharing link\n\nHooks\n-----\n\n .. |before_serve_page| replace:: ``before_serve_page``\n .. _before_serve_page: http://docs.wagtail.io/en/latest/reference/hooks.html#before-serve-page\n\nAs with normal page serving, the serving of shared pages continues to respect Wagtail's built-in |before_serve_page|_ hook.\n\nThis project adds these additional hooks:\n\n``before_serve_shared_page``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCalled before the latest revision of the page is about to be served, just before its ``serve()`` method is called. Like ``before_serve_page`` this hook is passed the page object, the request object, and the ``args`` and ``kwargs`` that will be passed to the page's ``serve()`` method. If the callable returns an ``HttpResponse``, that response will be returned immediately to the user.\n\nThis hook could be useful for limiting sharing to only certain page types or for modifying a page's contents when it is shared.\n\n.. code-block:: python\n\n from wagtail.core import hooks\n\n @hooks.register('before_serve_shared_page')\n def modify_shared_title(page, request, args, kwargs):\n page.title += ' (Shared)'\n\n``after_serve_shared_page``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCalled after the page's ``serve()`` method is called but before the response is returned to the user. This hook is passed the page object and the response object returned by ``serve()``. If the callable returns an ``HttpResponse``, that response will be returned immediately to the user.\n\nThis hook could be useful for directly modifying the response content, for example by adding custom headers or altering the generated HTML. This hook is used to implement the notification banner described above.\n\n.. code-block:: python\n\n from wagtail.core import hooks\n\n @hooks.register('after_serve_shared_page')\n def add_custom_header(page, response):\n response['Wagtail-Is-Shared'] = '1'\n\nCompatibility\n-------------\n\nThis project has been tested for compatibility with:\n\n* Python 2.7, 3.5, 3.6\n* Django 1.8-1.11, 2.0\n* Wagtail 1.6-1.13, 2.0\n\nOpen source licensing info\n--------------------------\n\n#. `TERMS `_\n#. `LICENSE `_\n#. `CFPB Source Code Policy `_\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cfpb/wagtail-sharing", "keywords": "", "license": "CCO", "maintainer": "", "maintainer_email": "", "name": "wagtail-sharing", "package_url": "https://pypi.org/project/wagtail-sharing/", "platform": "", "project_url": "https://pypi.org/project/wagtail-sharing/", "project_urls": { "Homepage": "https://github.com/cfpb/wagtail-sharing" }, "release_url": "https://pypi.org/project/wagtail-sharing/0.8/", "requires_dist": [ "Django (<2.1,>=1.8)", "wagtail (<2.1,>=1.6)", "coverage (>=3.7.0) ; extra == 'testing'", "flake8 (>=2.2.0) ; extra == 'testing'", "mock (>=1.0.0) ; extra == 'testing'" ], "requires_python": "", "summary": "Easier sharing of Wagtail drafts", "version": "0.8" }, "last_serial": 5601022, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "4d9e32136f196a5811217ac086b7b46d", "sha256": "3ee228031677638632c6cc49132c3cca24c634e8d32ee975d814df48b0bd6207" }, "downloads": -1, "filename": "wagtail-sharing-0.3.tar.gz", "has_sig": false, "md5_digest": "4d9e32136f196a5811217ac086b7b46d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 130031, "upload_time": "2017-03-02T22:22:35", "url": "https://files.pythonhosted.org/packages/6d/3d/14ff32932eac3e39f61af2b936f54d483f1d48a248b06960d89859ab3e56/wagtail-sharing-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "2554e02c60deedad3fd116124fefd080", "sha256": "cc172fc683ce334ddee21df91b45e4e243b2dad838c83be46865decbc7a2d0aa" }, "downloads": -1, "filename": "wagtail-sharing-0.4.tar.gz", "has_sig": false, "md5_digest": "2554e02c60deedad3fd116124fefd080", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12249, "upload_time": "2017-03-28T01:25:17", "url": "https://files.pythonhosted.org/packages/c5/2e/95293b9834db52107ea9650b21be601e400c0fdfa0ae7b93f71ad485ebc6/wagtail-sharing-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "c02aa60424f177832fbd49b55742e52b", "sha256": "a00f92f746589d05b9afdc89d487d51bf2363c32d5c8f87f75d9712068e5b690" }, "downloads": -1, "filename": "wagtail-sharing-0.5.tar.gz", "has_sig": false, "md5_digest": "c02aa60424f177832fbd49b55742e52b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12547, "upload_time": "2017-04-04T18:51:41", "url": "https://files.pythonhosted.org/packages/6d/8d/7199da630c74cac8fff7533dfd5498b4c6533d074377382879824e1d3847/wagtail-sharing-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "6552fea5d29a59f1d634f09ff115a709", "sha256": "74534fe8db16ed42cb11fadd40979d9da8ff5b42fe8625bb6497546dd19138d4" }, "downloads": -1, "filename": "wagtail_sharing-0.5.1-py2-none-any.whl", "has_sig": false, "md5_digest": "6552fea5d29a59f1d634f09ff115a709", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 17524, "upload_time": "2017-10-31T14:16:21", "url": "https://files.pythonhosted.org/packages/00/53/c50bc13d3c491c3d59ec38d76163c632f23203a6acde976655914bad39ca/wagtail_sharing-0.5.1-py2-none-any.whl" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "d908c1061c3f0519fef10f194436a29c", "sha256": "1ffc6c2da814f344a49973caf9e203a4d73afb73fba4275fc05b6a3ef0d9762d" }, "downloads": -1, "filename": "wagtail_sharing-0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "d908c1061c3f0519fef10f194436a29c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18898, "upload_time": "2017-11-27T14:59:27", "url": "https://files.pythonhosted.org/packages/a7/fa/810edccbebf9edea154342b635dcb02c00f2330d840ad96812056315473d/wagtail_sharing-0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aafc3241325cea8fe5d4b5782e08886c", "sha256": "bd6de714dd6db71259b0bcfef94ac86c2a5bacc6673d23b9d7b6d8d64c862a12" }, "downloads": -1, "filename": "wagtail-sharing-0.6.tar.gz", "has_sig": false, "md5_digest": "aafc3241325cea8fe5d4b5782e08886c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13651, "upload_time": "2017-11-27T14:59:32", "url": "https://files.pythonhosted.org/packages/85/83/763abb0957840ecdea475d8fd0998dfe1584dcc1c0cd730173296b124abc/wagtail-sharing-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "7b53fa6dddbe67ae2491a3e925e9de99", "sha256": "2836457e2225f5218649d6df2be8c982141a4fc269dfec0c1f13e16f429dae70" }, "downloads": -1, "filename": "wagtail_sharing-0.6.1-py2-none-any.whl", "has_sig": false, "md5_digest": "7b53fa6dddbe67ae2491a3e925e9de99", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 18980, "upload_time": "2018-02-09T12:01:53", "url": "https://files.pythonhosted.org/packages/49/33/f18c857535bfd6044ecc3887593e84db8338556104d8a1a4a68a8e515049/wagtail_sharing-0.6.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c2ea0aa166fb2246862731477af45cd", "sha256": "f957789746f356d59ee25116ec9561ca1e9f493d7e5e83dd5e303b0c3d6211a0" }, "downloads": -1, "filename": "wagtail-sharing-0.6.1.tar.gz", "has_sig": false, "md5_digest": "4c2ea0aa166fb2246862731477af45cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13691, "upload_time": "2018-02-09T12:01:54", "url": "https://files.pythonhosted.org/packages/99/b7/33620cc76ae7201211e49ba78fcecad5185c7128c45ad92ac636b12dd7fc/wagtail-sharing-0.6.1.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "cee70087000359ae5c822813023a3266", "sha256": "25b2b933ab8bd61ac5f3368d7878b0b3656196b40e7566c9e607c7b087addf53" }, "downloads": -1, "filename": "wagtail_sharing-0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cee70087000359ae5c822813023a3266", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21195, "upload_time": "2018-05-11T16:10:34", "url": "https://files.pythonhosted.org/packages/ee/d5/09664c7ed8d7eab4dcaca1442043437fc5b10fb4b7f69f757598513e1e9b/wagtail_sharing-0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e04cc34ffb9b6d7d144420ca5dde2699", "sha256": "3c5f456ad23e3c1d2251000475e50d384a9d14e94fa0a501fc936b8006d8888b" }, "downloads": -1, "filename": "wagtail-sharing-0.7.tar.gz", "has_sig": false, "md5_digest": "e04cc34ffb9b6d7d144420ca5dde2699", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14444, "upload_time": "2018-05-11T16:10:35", "url": "https://files.pythonhosted.org/packages/34/5a/2ebf5c11d718651e9473026313f07aefe6028d42177e74c97363cfb45077/wagtail-sharing-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "635233501774cd6c915659c11e0cdb5e", "sha256": "e7082a0e4f513d72083d94ee7904192c620383d83d57749cc46d24d00f87ecfc" }, "downloads": -1, "filename": "wagtail_sharing-0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "635233501774cd6c915659c11e0cdb5e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21434, "upload_time": "2019-07-29T18:29:41", "url": "https://files.pythonhosted.org/packages/26/fb/675892ccc8d11c440ebbedcc41e5ba29992e11211735734f7f016003f961/wagtail_sharing-0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "73e6e73ba476a6e6097308def4b03eb4", "sha256": "947c6365b51c305aefd6aeb8a050adb60992ccf72f2e535c113dac7f2d85292a" }, "downloads": -1, "filename": "wagtail-sharing-0.8.tar.gz", "has_sig": false, "md5_digest": "73e6e73ba476a6e6097308def4b03eb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15334, "upload_time": "2019-07-29T18:29:42", "url": "https://files.pythonhosted.org/packages/43/39/491ce6a23343b0e738a847d2d711e4746d315f27dded19d3ee45f8d3125e/wagtail-sharing-0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "635233501774cd6c915659c11e0cdb5e", "sha256": "e7082a0e4f513d72083d94ee7904192c620383d83d57749cc46d24d00f87ecfc" }, "downloads": -1, "filename": "wagtail_sharing-0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "635233501774cd6c915659c11e0cdb5e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21434, "upload_time": "2019-07-29T18:29:41", "url": "https://files.pythonhosted.org/packages/26/fb/675892ccc8d11c440ebbedcc41e5ba29992e11211735734f7f016003f961/wagtail_sharing-0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "73e6e73ba476a6e6097308def4b03eb4", "sha256": "947c6365b51c305aefd6aeb8a050adb60992ccf72f2e535c113dac7f2d85292a" }, "downloads": -1, "filename": "wagtail-sharing-0.8.tar.gz", "has_sig": false, "md5_digest": "73e6e73ba476a6e6097308def4b03eb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15334, "upload_time": "2019-07-29T18:29:42", "url": "https://files.pythonhosted.org/packages/43/39/491ce6a23343b0e738a847d2d711e4746d315f27dded19d3ee45f8d3125e/wagtail-sharing-0.8.tar.gz" } ] }