django-wm: 2.0.0
Breaking Changes
Migrations are now included. If you are upgrading from any
1.x.xversion please follow these instructions to avoid data loss. Thanks to @GriceTurrble for providing these instructions.requirements.txtceleryversion updated to5.2.2due to CVE-2021-23727. If you are upgrading from4.xplease follow the upgrade instructions provided by Celery.
Web API changes:
/getendpoint:- Removed
statusfrom JSON object - now uses HTTP response codes200if the target url was resolved correctly or404otherwise. - Missing HCards are now serialized as null instead of an empty dict
- Removed
// https://example.org/webmention/get?url=my-article
// Old 1.x.x response
{
"status": 1,
"target_url": "https://example.org/my-article",
"mentions": [
{
"hcard": {},
"quote": null,
"source_url": "https://another-example.org/their-article",
"published": "2020-01-17T21:45:24.542Z"
}
]
}
// https://example.org/webmention/get?url=my-article
// New 2.0.0 response with HTTP status 200 (or 404 if target_url does not exist)
{
"target_url": "https://example.org/my-article",
"mentions": [
{
"hcard": null,
"quote": null,
"source_url": "https://another-example.org/their-article",
"published": "2020-01-17T21:45:24.542Z"
}
]
}
New
Use
{% webmention_endpoint %}template tag to include your Webmentions endpoint in your Django template to help other sites find it easily.{% load webmention_endpoint %} <!-- my-template.html --> ... <head> <!-- Rendered as <link rel="webmention" href="/webmention/" /> --> {% webmention_endpoint %} </head> ...