Skip to content

Commit

Permalink
Add documentation for content_handler
Browse files Browse the repository at this point in the history
closes #6570
  • Loading branch information
pieterlexis committed Apr 30, 2020
1 parent a0fce1f commit 6563722
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/plugin_api/6570.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added support for Distributions to provide non-Artifact content via a content_handler.
1 change: 1 addition & 0 deletions CHANGES/plugin_api/6570.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The :meth:`pulpcore.content.handler.Handler.list_directory` function now returns a set of strings where it returned a string of HTML before.
4 changes: 4 additions & 0 deletions docs/plugins/api-reference/content-app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Making a custom Handler is a two-step process:
2. Add the Handler to a route using aiohttp.server's `add_route() <https://aiohttp.readthedocs.io/en
/stable/web_reference.html#aiohttp.web.UrlDispatcher.add_route>`_ interface.

If content needs to be served from within the :term:`Distribution`'s base_path,
overriding the :meth:`~pulpcore.plugin.models.BaseDistribution.content_handler` and
:meth:`~pulpcore.plugin.models.BaseDistribution.content_handler_directory_listing`
methods in your Distribution is an easier way to serve this content.

Creating your Handler
---------------------
Expand Down

0 comments on commit 6563722

Please sign in to comment.