django_auxilium.forms.color module¶
-
class
django_auxilium.forms.color.ColorCharField(*args, **kwargs)[source]¶ Bases:
django.forms.fields.CharFieldCustom django field which is able to validate colors as input.
Parameters: type (str) – The type of the color format. The supported formats are
hex: The hexadecimal notation of the color. Examples is:
ff0000 #00ff00
This type also allows to specify these additional parameters:
- hash_required : bool
If the
#is required in the value (e.g.'#ff0000')- hash_output : bool
If the
#is required in the output validated value into_python
Raises: ValueError– If unsupportedtypecolor type is provided-
default_error_messages= {u'invalid': <django.utils.functional.__proxy__ object at 0x7f7445fdcb50>}¶