Skip to main content

Webmention support for Django.

Project description

django-wm

Tests pypi package

django-wm lets you add Webmention functionality to your Django project with minimal setup.

Upgrading

Please check the changelog before upgrading.

Major versions introduce breaking changes which may require code changes in your application. Please check the upgrade guide for full instructions on how to handle these.

Minor versions may require a database migration for new features - this will be noted in the changelog and the wiki release page when necessary.

Getting started

Setup instructions.

Code for an example project.

All done? You can use the testing tool to make sure it works.

Features

  • 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-article will return any received Webmentions that target /my-article on 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"
          }
        ]
      }
      
  • WebmentionHeadMiddleware adds your /webmention endpoint to the headers of your pages so that it can be discovered by other sites.

  • {% webmentions_endpoint %} template tag to include your /webmention endpoint to your Django templates HTML element.

  • MentionableMixin enables automatic submission of Webmentions to other sites when you mention them in your content.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_wm-4.1.3.tar.gz (60.3 kB view details)

Uploaded Source

Built Distribution

django_wm-4.1.3-py3-none-any.whl (87.6 kB view details)

Uploaded Python 3

File details

Details for the file django_wm-4.1.3.tar.gz.

File metadata

  • Download URL: django_wm-4.1.3.tar.gz
  • Upload date:
  • Size: 60.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for django_wm-4.1.3.tar.gz
Algorithm Hash digest
SHA256 e2f58b6ba44b67862aa1253c8208eee8644572c294e7885460940847c81b9d0c
MD5 9956d0da02eccc531944a4ecdfc8c3c8
BLAKE2b-256 d184a657f84fe87047016b9aebb7a536cc64dd8f03f2275740c7723ba53e0dd6

See more details on using hashes here.

File details

Details for the file django_wm-4.1.3-py3-none-any.whl.

File metadata

  • Download URL: django_wm-4.1.3-py3-none-any.whl
  • Upload date:
  • Size: 87.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for django_wm-4.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48437504b449f639f74768a0a619f2948c46fe23bdfbb41ef3550923346895be
MD5 4b19b7a91bf01cd314ae7c8f5625c6af
BLAKE2b-256 8ae8f0254c24f89e15c2f9457e8f7325377c3d9ff4250b90e7b8c13aef971e90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page