A pluggable implementation of webmention for Django projects
Project description
django-webmention
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'
toINSTALLED_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.0url(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
inMIDDLEWARE
for 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 interface and mark them as reviewed as needed
Development
Setup
- Install tox
Running Tests
You can run tests using tox
:
$ tox --parallel=auto
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-webmention-2.0.1.tar.gz
.
File metadata
- Download URL: django-webmention-2.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 767f219775076072097d9c98e021a22553456ef32f4a0b2392129b14df83bec4 |
|
MD5 | 4a4b1da541d46affe1d188c835f505cb |
|
BLAKE2b-256 | ae17b1db1f12a435b76ec280465d99c920ce955139e0f36a16c880f8f9cbd7f5 |
File details
Details for the file django_webmention-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: django_webmention-2.0.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afa6a857028830b2dde1703c8bd2c0c5a294e8376315e4a9e8f89b25664adf85 |
|
MD5 | 768d0b63221d3548ec118032c03d6874 |
|
BLAKE2b-256 | 253e6bf570b173348513dac962798b663877ce44617f107997221fed93f29d59 |