Tools for bleaching text and JSON of HTML
Project description
=====
django-bleachfields
=====
django-bleachfields is a Python module that utilizes existing bleach and HTML parser modules to remove HTML tags and unescape text from a field before saving it to a Django model.
To use, simply call BleachJSONField or BleachTextField in place of a Django text field, such as models.TextField or models.CharField.
Install
--------
.. code-block:: python
pip install bleachfields
Usage
--------
.. code-block:: python
from django.db import models
from bleachfields import BleachJSONField, BleachTextField
class Person(models.Model):
name = BleachTextField(max_length=256)
response = BleachJSONField()
Contact
--------
Email: afrancis@betterworks.com
Changes
--------
None to date.
django-bleachfields
=====
django-bleachfields is a Python module that utilizes existing bleach and HTML parser modules to remove HTML tags and unescape text from a field before saving it to a Django model.
To use, simply call BleachJSONField or BleachTextField in place of a Django text field, such as models.TextField or models.CharField.
Install
--------
.. code-block:: python
pip install bleachfields
Usage
--------
.. code-block:: python
from django.db import models
from bleachfields import BleachJSONField, BleachTextField
class Person(models.Model):
name = BleachTextField(max_length=256)
response = BleachJSONField()
Contact
--------
Email: afrancis@betterworks.com
Changes
--------
None to date.
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
bleachfields-1.0.1.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for bleachfields-1.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f71c72b97c51c4ce379626bcd594447cceeed9369a6cb544d6787cfef6c9c110 |
|
MD5 | e71b9c891b1cfd4a70b0ba02903db5a7 |
|
BLAKE2b-256 | 3ec8020ee0fef232c59a65444b0d2a0cdfde838f5b6a0be9f8463655293b4a2c |