Skip to main content

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

Project description

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  -->

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

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

<!-- Javascript file that will deobfuscate the obfuscated text by the template tags -->
<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 tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.1.0 (2019-09-02)

  • First release on PyPI.

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

Built Distribution

django_template_obfuscator-0.1.1-py2.py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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