Skip to main content

Implements human.json as Django application.

Project description

Django Human.json

This package implements the human.json protocol. The current supported protocol version is 0.1.1. Django admin is setup to create vouchers.

Setup

dj_human_json can be installed via PyPI or you can simply copy the dj_human_json directory in this repository into your Django project.

pip install django-human-json

Once you added dj_human_json to your INSTALLED_APPS, you need to add one new variable to your settings.py with the canonical URL you want to claim ownership for. Port, protocol and subdomain must be an exact match.

DJ_HUMAN_JSON_URL = "https://www.screamingatmyscreen.com"  # replace with your own domain!

Include the dj_human_json view in your projects urls.py. The path does not matter.

from django.contrib import admin
from django.urls import path

from dj_human_json.views import human_json

urlpatterns = [
    path("admin/", admin.site.urls),
    path("human.json", human_json, name="human.json"),
]

Last step is advertising human.json via link in the head section of your HTML template.

<html lang="en">

<head>
    <link rel="human-json" href="/human.json" />
</head>

You likely want to use the URL template tag and not be lazy as I am in this example.

Vouching for sites

Go to Djangos admin interface and create a new entry in the Vouch table or create vouches via shell.

Vouch.objects.create(url="https://www.screamingatmyscreen.com")

CI status

The public repository shows the CI as waiting which is a result of the repository being a push mirror and the actual CI running on our internal Forgejo instance. Releases are tested, pinky promise.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_human_json-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_human_json-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file django_human_json-0.1.0.tar.gz.

File metadata

  • Download URL: django_human_json-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for django_human_json-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3e51d5bf6400f9275668d0f6b1c1280f7d9667d4453a63c96d925ec6900ae292
MD5 779f7a66ecabc30f561cdbf06fa3e9c5
BLAKE2b-256 3f94b10dabd8a99cdd9d364c4f95300e003589bcba7b3fb43c072a4b67cd2735

See more details on using hashes here.

File details

Details for the file django_human_json-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: django_human_json-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for django_human_json-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7fa0f8e613bcd26645ead9c424ad101904d48446e9b8d9469a9ac9a633132fc
MD5 05d30c6c80a08f09a8664087fa2d2655
BLAKE2b-256 5c0c1d1b28ce73a8da945b0bb1b34b5b790d531f0987ba7d8ab733348598e4ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page