django-wm lets you add Webmention functionality to your Django project with minimal setup.
Please check the changelog before upgrading, especially between major versions.
After upgrading remember to run the makemigrations and migrate management commands so that any changes in model/mixin definitions can be applied.
All done? You can use the testing tool to make sure it works.
-
Endpoints:
/webmention: Receives incoming Webmentions from other sites./webmention/get: Used to retrieve Webmentions for a page on your site.
e.g./webmention/get?url=/my-articlewill return any received Webmentions that target/my-articleon your site.// /webmention/get?url=/my-article { "target_url": "https://my-site.org/my-article", "mentions": [ { "hcard": { "name": "Jane Bloggs", "avatar": "https://gravatar.com/janebloggs", "homepage": "https://jane-bloggs-example.org" }, "quote": null, "source_url": "https://jane-bloggs-example.org/some-article", "published": "2020-01-17T21:45:24.542Z", "type": "webmention" } ] }
/webmention/dashboard/: a simple overview of recent mentions (accessible with permissionmentions.view_webmention_dashboardor publicly viasettings.WEBMENTIONS_DASHBOARD_PUBLIC)
-
WebmentionHeadMiddlewareadds your/webmentionendpoint to the headers of your pages so that it can be discovered by other sites. -
{% webmentions_endpoint %}template tag to include your/webmentionendpoint to your Django templates HTML element. -
MentionableMixinenables automatic submission of Webmentions to other sites when you mention them in your content.