Skip to main content

A pluggable implementation of webmention for Django projects

Project description

django-webmention PyPI version Build Status

webmention for Django projects.

What this project is

This package provides a way to integrate webmention endpoint discovery and webmention receipts into your project. Once you follow the installation instructions, you should be able to use something like webmention.rocks to generate a test webmention and see it in the Django admin panel.

Once you receive a webmention, you can click through to the page the webmention was sent from and see what people are saying about your site. Afterward, you can mark the webmention as reviewed in the Django admin so you can more easily see the latest webmentions you receive.

Once you verify that you're receiving webmentions successfully, you can use the webmention information as you like. As an example, you could query the webmentions that are responses to a specific page and display them on that page.

What this project isn't

This package does not currently provide functionality for sending webmentions.

Installation

$ pip install django-webmention

  • Add 'webmention' to INSTALLED_APPS
  • Run python manage.py migrate webmention
  • Add the URL patterns to your top-level urls.py
    • path('webmention/', include('webmention.urls')) for Django >= 2.0
    • url(r'^webmention', include('webmention.urls', namespace='webmention')) for Django < 2.0

Usage

  • Include webmention information by either:
    • Installing the middleware in settings.py (affects all views)
      • Use webmention.middleware.webmention_middleware in MIDDLEWARE for Django >= 1.10
      • Use webmention.middleware.WebMentionMiddleware in MIDDLEWARE_CLASSES for older projects
    • Decorating a specific view with webmention.middleware.include_webmention_information
  • View webmention responses in the Django admin interface and mark them as reviewed as needed

Development

Setup

Running Tests

You can run tests using tox:

$ tox --parallel=auto

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-webmention-2.0.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

django_webmention-2.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file django-webmention-2.0.2.tar.gz.

File metadata

  • Download URL: django-webmention-2.0.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.7

File hashes

Hashes for django-webmention-2.0.2.tar.gz
Algorithm Hash digest
SHA256 f08168e4b5898fdb1819054eef4a503ef009dc39e8f769861b6fa746f757b683
MD5 f7c4dc445e9f9e7edb3274496753d393
BLAKE2b-256 3103228e7ebe134725fed15b96d92e902a040c6326c02bc8dd7b8b08be89be4b

See more details on using hashes here.

File details

Details for the file django_webmention-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: django_webmention-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.7

File hashes

Hashes for django_webmention-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a94742d2095805654b0a1fe154f91793469de4d5fb668a722620082d4df20b37
MD5 f902a4efcfa451efa57a7b47cc7b9178
BLAKE2b-256 86091390f4019bec627892ef0371ae9cf9a945960bc94139f7c66cc26b204bee

See more details on using hashes here.

Supported by

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