django-click-to-reveal
Reveal an email address on demand in a Django template. The address is stored in the database and is returned by a small JSON endpoint when the link is clicked.
Installation
pip install django-click-to-reveal
Add the app to INSTALLED_APPS and include its URL patterns in your project's
URL configuration:
# settings.py
INSTALLED_APPS = [
# ...
"click_to_reveal",
]
# urls.py
from django.urls import include, path
urlpatterns = [
# ...
path("", include("click_to_reveal.urls")),
]
Apply the app's database migration:
python manage.py migrate
Usage
Load the template tag library and pass it the email address to reveal and the link text to display:
{% load click_to_reveal %}
{% click_to_reveal "person@example.com" "Show email" %}
The link text is optional and defaults to Click to reveal. When clicked, the link fetches the address from the app's JSON endpoint.
The endpoint returns the stored email address to anyone who can access it. This obfuscates the address in the initial page source; it is not an access-control mechanism for confidential email addresses.
Tests
Run the test project from the repository root:
python tests/manage.py test testproject
Run the Python/Django compatibility matrix with tox:
tox
Run the JavaScript tests with Node.js 20 or later:
node --test tests/click-to-reveal.test.js
License
This project is distributed under the BSD 3-Clause License. See LICENCE.
Metadata
Release files for django-click-to-reveal 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_click_to_reveal-1.0.1.tar.gz | 6.5 kB | With provenance | Details for django_click_to_reveal-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_click_to_reveal-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for django_click_to_reveal-1.0.1-py3-none-any.whl |
Total release size: 13.5 kB
Release files / django_click_to_reveal-1.0.1.tar.gz
| Download URL | django_click_to_reveal-1.0.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db48840ee4bc4007515dce59c1c3c4f743a45dc3f0d29deba06dfe6b561c6f59
|
|
BLAKE2b-256 checksum How to use checksums |
4149be1850ac15b3ecb6d844b82cc35f9abe5065aa2d656d077ca6b16954e660
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logRelease files / django_click_to_reveal-1.0.1-py3-none-any.whl
| Download URL | django_click_to_reveal-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a4be49c05dc4028ad9a02e2183b173eaa54b23ed9619eef44a77ac5bef6e357
|
|
BLAKE2b-256 checksum How to use checksums |
65b942fc09fc1766438719be45b59ad5fb941248ed5bf25c652c5cbf787190b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logSecurity for django-click-to-reveal 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for django_click_to_reveal-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.