webmention for Django projects.
$ pip install django-webmention
- Add
'webmention'toINSTALLED_APPS - Run
python manage.py migrate webmention - Add the URL patterns to your top-level
urls.pypath('webmention/', include(webmention.urls))for Django >= 2.0url(r'^webmention', include('webmention.urls', namespace='webmention'))for Django < 2.0
- Include webmention information by either:
- Installing the middleware in
settings.py(affects all views)- Use
webmention.middleware.webmention_middlewareinMIDDLEWAREfor Django >= 1.10 - Use
webmention.middleware.WebMentionMiddlewareinMIDDLEWARE_CLASSESfor older projects
- Use
- Decorating a specific view with
webmention.middleware.include_webmention_information
- Installing the middleware in
- View webmention responses in the Django admin interface and mark them as reviewed as needed
- Install tox
You can run tests using tox:
$ tox --parallel=auto