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.2.0.tar.gz (60.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_wm-4.2.0-py3-none-any.whl (89.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_wm-4.2.0.tar.gz
  • Upload date:
  • Size: 60.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for django_wm-4.2.0.tar.gz
Algorithm Hash digest
SHA256 5053889009eba506c1411bd2f43fffdb0fda69c7cd9294dd6dc647e1e468eb42
MD5 a367238088e110a7b672d180aa576c20
BLAKE2b-256 c964bd5ec0d07c0c6bda86678f5b6f8ded4e4549de184ed3d0bf2c290b181739

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_wm-4.2.0-py3-none-any.whl
  • Upload date:
  • Size: 89.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for django_wm-4.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9ed42149678edabe710732116bbce6b07b7a8b0044357e880ed4e1ef410ac72
MD5 064d7dbcea09df5717691a97ee955e65
BLAKE2b-256 61a6a7f0b6306a4ac121b2f2bc5d212b99983c86673e866e778eb69521d4784a

See more details on using hashes here.

Supported by

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