Skip to main content
https://badge.fury.io/py/django-template-obfuscator.svg https://travis-ci.org/rafahuelin/django-template-obfuscator.svg?branch=master https://codecov.io/gh/rafahuelin/django-template-obfuscator/branch/master/graph/badge.svg

Obfuscates desired content in a Django template in order to be difficult to scrape

Documentation

The full documentation is at https://django-template-obfuscator.readthedocs.io.

Quickstart

Install django-template-obfuscator:

pip install django-template-obfuscator

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django_template_obfuscator.apps.DjangoTemplateObfuscatorConfig',
    ...
)

How to use django-template-obfuscator’s template tags:

{% load static %}
{% load obfuscator %}

<!-- Place text to encode in between the {% obfuscate %} and {% endobfuscate %} template
tags, then embed it into an Html element with the "obfuscated" class, that will will be
"deobfuscated" using Javascript  -->

<!-- CSS file that will avoid the user to copy the content in obfuscated class -->
<link rel="stylesheet" href="{% static 'css/django_template_obfuscator.css' %}">

<p class="obfuscated">
    {% obfuscate %}
    Text difficult to scrape.
    {% endobfuscate %}
</p>

<p class="obfuscated">
    {% obfuscate %}
    This text as well.
    {% endobfuscate %}
</p>

<!-- JS in charge of deobfuscation, making the content understandable to the web's user -->
<script src="{% static 'js/django_template_obfuscator.js' %}"></script>

Features

  • TODO

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install selenium
(myenv) $ python django_template_obfuscator/tests.py

Credits

Tools used in rendering this package:

History

0.1.5 (2019-09-17)

  • Tests

  • updated docs

0.1.4 (2019-09-05)

  • Improve docs.

0.1.3 (2019-09-04)

  • Fix small errors.

0.1.2 (2019-09-04)

Improvements -CSS copy prevention

0.1.0 (2019-09-02)

  • First release on PyPI.

Release files for django-template-obfuscator 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-template-obfuscator 0.1.5
File Size Uploaded
django-template-obfuscator-0.1.5.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-template-obfuscator 0.1.5
File Interpreter ABI Platform
django_template_obfuscator-0.1.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 15.5 kB

Release files / django-template-obfuscator-0.1.5.tar.gz

Download URL django-template-obfuscator-0.1.5.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aa3ca29e17af0c5492ff046dcf1e99c88a363a7ddef971458916cfc366bd7005
BLAKE2b-256 checksum
How to use checksums
ef7ee62be5efaced51b8f0f57f9ba2ae44dec9fa871b57d771387536dbe2d308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9

Release files / django_template_obfuscator-0.1.5-py2.py3-none-any.whl

Download URL django_template_obfuscator-0.1.5-py2.py3-none-any.whl
Size 8.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f138fe772cd8bb86b8eea2b0f956ab99ff913747f35192fdb19214db56a12ba7
BLAKE2b-256 checksum
How to use checksums
65490255bc4aad05efb34075589d919e696a28e8260c87b5212839925adafda6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page