webmention for Django projects.
$ pip install django-webmention
- Add
webmention
toINSTALLED_APPS
- Run
manage.py migrate webmention
- Add
url(r'^webmention', include('webmention.urls', namespace='webmention'))
to top-levelurls.py
- Use
path('webmention/', include(webmention.urls))
for newer projects
- Use
- Run
manage.py test webmention
to ensure unit tests all pass
- Include webmention information by either:
- Installing the middleware in
settings.py
(affects all views)- Use
webmention.middleware.webmention_middleware
inMIDDLEWARE
for new projects and projects with Django >= 1.10 - Use
webmention.middleware.WebMentionMiddleware
inMIDDLEWARE_CLASSES
for older projects
- Use
- Decorating a specific view with
webmention.middleware.include_webmention_information
- Installing the middleware in
- View webmention responses in the Django admin tool and mark them as reviewed as needed