Skip to content
💬 webmention for Django projects
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/webmention
tests
.gitignore
.travis.yml
LICENSE
README.md
conftest.py
manage.py
pyproject.toml
setup.cfg
setup.py

README.md

django-webmention PyPI version Build Status

webmention for Django projects.

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
You can’t perform that action at this time.