Fields¶
-
plata.fields.
CurrencyField
(*moreargs, **morekwargs) Field offering all defined currencies
-
class
plata.fields.
JSONField
(verbose_name=None, name=None, primary_key=False, max_length=None, unique=False, blank=False, null=False, db_index=False, rel=None, default=<class django.db.models.fields.NOT_PROVIDED>, editable=True, serialize=True, unique_for_date=None, unique_for_month=None, unique_for_year=None, choices=None, help_text=u'', db_column=None, db_tablespace=None, auto_created=False, validators=[], error_messages=None)[source] TextField which transparently serializes/unserializes JSON objects
See: http://www.djangosnippets.org/snippets/1478/
-
from_db_value
(value, expression, connection, context)[source] Convert the input JSON value into python structures, raises django.core.exceptions.ValidationError if the data can’t be converted.
-
get_prep_value
(value)[source] Convert our JSON object to a string before we save
-
to_python
(value)[source] Convert our string value to JSON after we load it from the DB
-
value_to_string
(obj)[source] Extract our value from the passed object and return it in string form
-