Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcarbaugh/django-webfinger
Django implementation of the webfinger server protocol
https://github.com/jcarbaugh/django-webfinger
Last synced: 2 months ago
JSON representation
Django implementation of the webfinger server protocol
- Host: GitHub
- URL: https://github.com/jcarbaugh/django-webfinger
- Owner: jcarbaugh
- Created: 2009-11-14T16:28:30.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2013-08-14T14:55:30.000Z (over 11 years ago)
- Last Synced: 2024-04-14T07:57:31.217Z (9 months ago)
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 12
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Initial version... needs some major refactoring
================
django-webfinger
================Provide webfinger service.
http://code.google.com/p/webfinger/wiki/WebFingerProtocol
Requirements
============python >= 2.5
python-xrd
django >= 1.0
django-wellknown
Installation
============Be sure to add ``webfinger`` to ``INSTALLED_APPS`` in settings.py. Additionally, add the following entry to urls.py::
url(r'^webfinger/', include('webfinger.urls')),
Configure the webfinger handler in settings.py::
WEBFINGER_HANDLER = 'path.to.handler.func'
Usage
=====Handler Function
----------------::
from webfinger import rel
import datetime
def handler_func(request, acct, xrd):
# acct.userinfo is the username
# acct.host is the host
xrd.aliases.append('http://example.com/profile/%s/' % acct.userinfo)
xrd.expires = datetime.datetime.utcnow() + datetime.timedelta(0, 10)
xrd.links.append(Link(
rel=rel.AUTHOR,
href='http://jeremy.carbauja.com',
type='text/html',
))