valuta.contrib.django_integration package

Subpackages

Submodules

valuta.contrib.django_integration.models module

class valuta.contrib.django_integration.models.CurrencyField(*args, amount_fields: Optional[Union[List[str], Tuple[str, ...], Set[str]]] = None, limit_choices_to: Optional[Union[List[str], Tuple[str, ...], Set[str]]] = None, get_choices_func: Callable = <function get_currency_choices_with_code>, cast_to: Optional[Callable] = None, **kwargs)[source]

Bases: django.db.models.fields.CharField

Currency field.

contribute_to_class(cls, name, **kwargs)[source]

Register the field with the model class it belongs to.

If private_only is True, create a separate instance of this field for every subclass of cls, even if cls is not an abstract model.

Module contents