Custom PumpWood Serializers

class pumpwood_viewutils.serializers.ClassNameField(**kwargs)

Serializer Field that returns model name

class pumpwood_viewutils.serializers.CustomChoiceTypeField(field_name=None, **kwargs)

Serializer field for ChoiceTypeField, returns a tupple with both real value on [0] and get_{field_name}_display on [1]. to_internal_value uses only de first value os the tupple if a tupple, or just the value if not a tupple

class pumpwood_viewutils.serializers.CustomNestedSerializer(nested_serializer, many, **kwargs)

Uses the seriazlizer to create the object representation, but only uses its pk to get object to its internal value.

many = False

Tells if is a many relation or not

nested_serializer = None

Serializer to be used on the model