Django Fields

class gpp.model.fields.CompressedTextField(*args, **kwargs)[source]

Bases: BinaryField

description = 'LZMA Compressed Text for BinaryFields'
empty_values = [None, b'']
from_db_value(value, *args, **kwargs)[source]
get_prep_value(value)[source]

Perform preliminary non-db specific value checks and conversions.

to_python(value)[source]

Convert the input value into the expected Python data type, raising django.core.exceptions.ValidationError if the data can’t be converted. Return the converted value. Subclasses should override this.

value_to_string(obj)[source]

Binary data is serialized as base64

gpp.model.fields.compress_data(s)[source]

압축

Args:

s:

Returns:

gpp.model.fields.decompress_data(s)[source]

압축 해제

Args:

s:

Returns: